start the vserver with the '--rescue' option and execute operations
[util-vserver.git] / util-vserver / scripts / vserver-build.skeleton
index 4cc2626..90ddd3b 100644 (file)
@@ -20,6 +20,7 @@ eval set -- "$tmp"
 
 . "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
 
+DISTRIBUTION=:
 use_pkgmgmt=
 while true; do
     case "$1" in
@@ -27,16 +28,16 @@ while true; do
        --debug)        set -x;;
        --pkgmgmt)      use_pkgmgmt=1;;
        --)             shift; break ;;
-       *)              echo "vserver-build.skeleton: internal error: unrecognized option '$1'"
+       *)              echo "vserver-build.skeleton: internal error: unrecognized option '$1'" >&2
                        exit 1
                        ;;
     esac
     shift
 done
 
-getDistribution
+getDistribution '' 1
 
-base.initVariables
+base.init
 test -z "$use_pkgmgmt" || pkgmgmt.initVariables
 
 base.initFilesystem "$OPTION_FORCE"
@@ -49,3 +50,5 @@ setup_writeInitialFstab
 test -z "$BUILD_INITPRE"  || "$BUILD_INITPRE" "$SETUP_CONFDIR"  "$UTIL_VSERVER_VARS"
 test -z "$1" || "$@"
 test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
+
+base.setSuccess