fixed 'local VAR=$(ACTION) || ERROR' constructs; the 'local VAR=$(ACTION)'
[util-vserver.git] / util-vserver / scripts / vserver-build.functions
index fcde3fa..af2843e 100644 (file)
@@ -114,6 +114,8 @@ function _renameVserverCfg
     done
 }
 
+
+## Usage: getDistribution [<default>]
 function getDistribution
 {
     test -z "$DISTRIBUTION" || return 0
@@ -130,6 +132,14 @@ function getDistribution
     elif test -e /etc/SuSE-release; then
        set -- $(cat /etc/SuSE-release)
        DISTRIBUTION=suse$3
+    elif test -e /etc/gentoo-release; then
+       set -- $(cat /etc/gentoo-release)
+       DISTRIBUTION=gentoo$5
+    elif test -e /etc/slackware-release; then
+       set -- $(cat /etc/slackware-release)
+       DISTRIBUTION=slackware$2
+    elif test -n "$1"; then
+       DISTRIBUTION=$1
     else
        echo \
 "Can not determine distribution; please specify it manually
@@ -152,7 +162,7 @@ exist already; please try to use '--force', or remove them manually"
 
     mkdir -p -m755 "$VDIR"
     chattr -t "$VDIR"
-    mkdir -p -m755 "$SETUP_CONFDIR"/apps "$VDIR"/{dev/pts,etc} "$SETUP_LOCKREVDIR"
+    mkdir -p -m755 "$SETUP_CONFDIR"/apps "$VDIR"/{dev/pts,etc}
     
     ln -s "$VDIR"       "$SETUP_CONFDIR/vdir"