X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Fscripts%2Fvserver-build.functions;h=fcde3fa52392d6b646909a639f003b66a7be47ef;hb=552047c69c293485ce2401ae8bc0c0894b2fb410;hp=8ee505188e3f3c9de38e1761bf7a6e1c0a859f31;hpb=4b4c50c0c4aae131a3326974fe1ab94536033da6;p=util-vserver.git diff --git a/util-vserver/scripts/vserver-build.functions b/util-vserver/scripts/vserver-build.functions index 8ee5051..fcde3fa 100644 --- a/util-vserver/scripts/vserver-build.functions +++ b/util-vserver/scripts/vserver-build.functions @@ -79,7 +79,7 @@ function _setRootDir done test -d "$ROOTDIR" || { - echo "Root-directory '$ROOTDIR' does not exist or is invalid" + echo "Root-directory '$ROOTDIR' does not exist or is invalid" >&2 exit 1 } } @@ -127,9 +127,13 @@ function getDistribution elif test -e /etc/debian_version; then set -- $(cat /etc/debian_version) DISTRIBUTION=deb$1 + elif test -e /etc/SuSE-release; then + set -- $(cat /etc/SuSE-release) + DISTRIBUTION=suse$3 else - echo "Can not determine distribution; please specify it manually" - echo "with the '-d' option" + echo \ +"Can not determine distribution; please specify it manually +with the '-d' option" >&2 exit 1 fi >&2 } @@ -139,8 +143,10 @@ function base.initFilesystem { test -z "$1" || _renameVserverCfg test ! -d "$VDIR" -a ! -d "$SETUP_CONFDIR" || { - echo "vserver-topdirectory and/or configuration exist already; " - echo "please try to use '--force', or remove them manually" + echo \ +"vserver-topdirectory '$VDIR' and/or configuration at '$SETUP_CONFDIR' +exist already; please try to use '--force', or remove them manually" +>&2 exit 1 } >&2 @@ -155,6 +161,7 @@ function base.initFilesystem makeDevEntry "$VDIR"/dev $spec done <$_DEV_FILE + mkdir -p "$VDIR"/proc findAndCopy "$VDIR"/etc/hosts "$CONFDIR"/.defaults/files/hosts "$CONFDIR/.distributions/$DISTRIBUTION"/files/hosts \ "$DISTRIBDIR/$DISTRIBUTION"/files/hosts "$DISTRIBDIR"/defaults/files/hosts ""