#! /bin/bash # $Id: vserver-build 2644 2007-12-19 14:28:40Z dhozac $ # Copyright (C) 2003,2004,2005 Enrico Scholz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} test -e "$UTIL_VSERVER_VARS" || { echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2 exit 1 } . "$UTIL_VSERVER_VARS" . "$_LIB_FUNCTIONS" . "$_LIB_VSERVER_SETUP_FUNCTIONS" . "$_LIB_VSERVER_BUILD_FUNCTIONS" ### Some local functions function showHelp() { echo \ $"Usage: $(basename $0) -m -n --force * --rootdir --pkgbase [--] * Options: --force ... remove/rename already existing vservers with the same name --keep ... do not delete generated files and directories when build of vserver failed. -m ... use method ; see below for possible values --rootdir ... [default: $__DEFAULT_VSERVERDIR] --pkgbase ... [default: $__DEFAULT_VSERVERPKGDIR] cfg-options are: $SETUP_HELPMSG Possible methods are: legacy ... the \"old\" copy-all-from-host method, which requires the old legacy vserver-legacy script; with this method the cfg-options will be ignored apt-rpm ... -- -d ... installs the base-packages of the given distribution with help of 'vapt-get' yum ... -- -d ... installs the base-packages of the given distribution with help of 'vyum' rpm ... -- [-d ] --empty|([--force] [--nodeps] )+ ... installs lists of rpm-packages skeleton ... -- [ *] ... installs a minimal skeleton filesystem, creates the configuration file and calls an optional command then debootstrap ... -- -d [-m ] [-s