added some doc
[util-vserver.git] / util-vserver / scripts / vserver-build
index 83aee84..c2e30e3 100755 (executable)
@@ -16,9 +16,9 @@
 # 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:=$(dirname $0)/util-vserver-vars}
+: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
 test -e "$UTIL_VSERVER_VARS" || {
-    echo "Can not find util-vserver installation; aborting..."
+    echo "Can not find util-vserver installation; aborting..." >&2
     exit 1
 }
 . "$UTIL_VSERVER_VARS"
@@ -38,9 +38,9 @@ Options:
     --force     ...  remove/rename already existing vservers with the same name
     -m <method> ...  use method <method>; see below for possible values
     --rootdir <dir>
-                ...  [default: /vservers]
+                ...  [default: $DEFAULT_VSERVERDIR]
     --pkgcfgbase <dir>
-                ...  [default: <rootdir>/.pkg]
+                ...  [default: $DEFAULT_VSERVERPKGDIR]
       
 cfg-options are: $SETUP_HELPMSG
 
@@ -50,9 +50,14 @@ Possible methods are:
                     cfg-options will be ignored
     copy        ...  the copy-all-from-host method which uses the recent
                      configuration scheme
-    apt-rpm -d <distribution>
+    apt-rpm ... -- -d <distribution>
                 ...  installs the base-packages of the given distribution with
                     help of 'vapt-get'
+    skeleton ... -- [<cmd> <args>*]
+                ...  installs a minimal skeleton filesystem, creates the
+                    configuration file and calls an optional command then
+    debootstrap ... -- -d <distribution> [-m <mirror>]
+                     bootstraps the vserver with Debian's 'debootstrap' package
 
 Please report bugs to $PACKAGE_BUGREPORT"
     exit 0
@@ -97,7 +102,7 @@ while true; do
        --)        shift; break;;
        *)
            { setup_setOption2 "$1" "$2" && shift; } || \
-           { echo $"vserver-build: internal error."; exit 1; }
+           { echo $"vserver-build: internal error."; exit 1; } >&2
            ;;
     esac
     shift
@@ -106,13 +111,13 @@ done
 test "$VSERVER_NAME" || {
     echo $"Name of vserver not specified"
     exit 1
-}
+} >&2
 
 setup_setDefaults "$VSERVER_NAME"
 
 case x"$method" in
     xlegacy)   exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
-    xapt-rpm|xcopy)
+    xapt-rpm|xcopy|xskeleton|xdebootstrap)
                . $PKGLIBDIR/vserver-build.$method
                ;;
     x)         echo $"No build-method specified" >&2