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=994e3cd20481aa9afe49b868c15ca173d57e40f9;hpb=614afad7353403e2f3bfc43177e7ab292c2ea82d;p=util-vserver.git diff --git a/util-vserver/scripts/vserver-build b/util-vserver/scripts/vserver-build index 994e3cd..d64c98e 100755 --- a/util-vserver/scripts/vserver-build +++ b/util-vserver/scripts/vserver-build @@ -83,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 @@ -105,16 +105,14 @@ 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" @@ -123,10 +121,6 @@ case x"$method" in (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