s!/etc/slackware-release!/etc/slackware-version! (reported by bubulak)
[util-vserver.git] / util-vserver / scripts / functions
index 4b8e4c8..32afcd3 100644 (file)
@@ -96,7 +96,7 @@ function isDirectoryEmpty
        
        for i in "$1"/*; do
            case "$i" in
-               (lost+found)
+               ($1/lost+found)
                    test "$ignore_lostfound" || exit 1
                    ;;
                (*)     echo "$i"; exit 1
@@ -203,14 +203,21 @@ function colorize
          esac
        fi
            
-       "$@"
+       ( "$@" )
        echo -ne "\e[m"
     fi
 }
 
 function colpanic
 {
-    colorize error   panic     "$@"
+    if test -n "$_VS_ERRFILE"; then
+       echo "$@" >>"$_VS_ERRFILE"
+    else
+       colorize error echo -n "$@" >&2
+    fi
+    echo
+
+    exit 1
 }
 
 function colwarning