X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fvserver-build;h=1a20bfda36a24446865c880e6975bce7c5c72a75;hb=HEAD;hp=62b69f5e03449d92f791249930f08cd7d14b20c0;hpb=4acd18c430992b7fbc536946067f1bc47bf2022b;p=util-vserver.git diff --git a/scripts/vserver-build b/scripts/vserver-build index 62b69f5..1a20bfd 100755 --- a/scripts/vserver-build +++ b/scripts/vserver-build @@ -37,6 +37,8 @@ $"Usage: $(basename $0) -m -n --force * Options: --force ... remove/rename already existing vservers with the same name + --i-know-its-there + ... allow to finish build even if it exists --keep ... do not delete generated files and directories when build of vserver failed. -m ... use method ; see below for possible values @@ -54,9 +56,10 @@ Possible methods are: apt-rpm ... -- -d ... installs the base-packages of the given distribution with help of 'vapt-get' - yum ... -- -d + yum ... -- -d [-- *] ... installs the base-packages of the given distribution with help of 'vyum' + urpmi ... -- -d -m rpm ... -- [-d ] --empty|([--force] [--nodeps] )+ ... installs lists of rpm-packages skeleton ... -- [ *] @@ -72,8 +75,10 @@ Possible methods are: -n specifies the 'NFS' root explicitly -d specifies the location of the FAI profile the -f option implies -n and -d are relative to the - rsync ... -- [-d ] --source [-o ]* + rsync ... -- [-d ] --source [-- *] ... installs a guest by rsyncing from to the guest root + clone ... -- [-d ] --source [--exclude-from ] + ... clones a guest by linking unified files and copying the rest Please report bugs to $PACKAGE_BUGREPORT" exit 0 @@ -98,7 +103,7 @@ set -e declare -a default_opts=() test -n "$NO_DEFAULT_OPTS" || getFileArray default_opts "$__CONFDIR/.defaults/apps/build/options" || : -tmp=$(getopt -o +m:n: --long keep,force,debug,help,version,rootdir:,pkgbase:,$SETUP_OPTIONS -n "$(basename $0)" -- \ +tmp=$(getopt -o +m:n: --long keep,force,i-know-its-there,debug,help,version,rootdir:,pkgbase:,$SETUP_OPTIONS -n "$(basename $0)" -- \ "${default_opts[@]}" "$@") || exit 1 eval set -- "$tmp" @@ -106,6 +111,7 @@ VSERVER_NAME= OPTION_FORCE= OPTION_DEBUG=0 OPTION_KEEP= +OPTION_SEMIFORCE= while true; do case "$1" in @@ -116,6 +122,8 @@ while true; do (--debug) let ++OPTION_DEBUG; set -x;; (--rootdir) ROOTDIR=$2; shift;; (--pkgbase) PKGCFGBASE=$2; shift;; + (--i-know-its-there) + OPTION_SEMIFORCE=1;; (-m) method=$2; shift;; (-n) VSERVER_NAME=$2; shift;; (--) shift; break;; @@ -134,7 +142,7 @@ setup_setDefaults "$VSERVER_NAME" case x"$method" in (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;; - (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync) + (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xurpmi) . $__PKGLIBDIR/vserver-build.$method ;; (x) panic $"No build-method specified";;