X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Fscripts%2Fvserver-build;h=d64c98ecd7441af912829d8a0f023e4939ee98ce;hb=7bd540af89c36e0fc25d167f6c4893451b3331a3;hp=980ca5aa4841bb209576fc59764e662fd1e0b3d3;hpb=da3d3725ce471cc67208d51e40f7a0a56d6a33a1;p=util-vserver.git diff --git a/util-vserver/scripts/vserver-build b/util-vserver/scripts/vserver-build index 980ca5a..d64c98e 100755 --- a/util-vserver/scripts/vserver-build +++ b/util-vserver/scripts/vserver-build @@ -32,14 +32,14 @@ function showHelp() { echo \ $"Usage: $(basename $0) -m -n --force * - --rootdir --pkgcfgbase [--] * + --rootdir --pkgbase [--] * Options: --force ... remove/rename already existing vservers with the same name -m ... use method ; see below for possible values --rootdir ... [default: $DEFAULT_VSERVERDIR] - --pkgcfgbase + --pkgbase ... [default: $DEFAULT_VSERVERPKGDIR] cfg-options are: $SETUP_HELPMSG @@ -53,10 +53,13 @@ Possible methods are: 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' skeleton ... -- [ *] ... installs a minimal skeleton filesystem, creates the configuration file and calls an optional command then - debootstrap ... -- -d [-m ] + debootstrap ... -- -d [-m ] [-- *] bootstraps the vserver with Debian's 'debootstrap' package Please report bugs to $PACKAGE_BUGREPORT" @@ -80,7 +83,7 @@ the GNU General Public License. This program has absolutely no warranty." set -e declare -a default_opts=() -test "$NO_DEFAULT_OPTS" || getFileArray default_opts "$CONFDIR/.defaults/apps/build/options" || : +test -n "$NO_DEFAULT_OPTS" || getFileArray default_opts "$CONFDIR/.defaults/apps/build/options" || : tmp=$(getopt -o +m:n: --long force,debug,help,version,rootdir:,pkgbase:,$SETUP_OPTIONS -n "$(basename $0)" -- \ "${default_opts[@]}" "$@") || exit 1 @@ -102,28 +105,22 @@ while true; do (--) shift; break;; (*) { setup_setOption2 "$1" "$2" && shift; } || \ - { echo $"vserver-build: internal error."; exit 1; } >&2 + panic $"vserver-build: internal error." ;; esac shift done -test "$VSERVER_NAME" || { - echo $"Name of vserver not specified" - exit 1 -} >&2 +test -n "$VSERVER_NAME" || + panic $"Name of vserver not specified" setup_setDefaults "$VSERVER_NAME" case x"$method" in (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;; - (xapt-rpm|xcopy|xskeleton|xdebootstrap) + (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum) . $PKGLIBDIR/vserver-build.$method ;; - (x) echo $"No build-method specified" >&2 - exit 1 - ;; - (*) echo $"Unknown build-method '$method'" >&2 - exit 1 - ;; + (x) panic $"No build-method specified";; + (*) panic $"Unknown build-method '$method'";; esac