Use findFile consistently. Don't fail if a file doesn't exist, these are all optional.
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Tue, 31 Jul 2007 19:43:17 +0000 (19:43 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Tue, 31 Jul 2007 19:43:17 +0000 (19:43 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2574 94cd875c-1c1d-0410-91d2-eb244daf1a30

scripts/vserver-build.debootstrap

index 1036a6c..565d70b 100644 (file)
@@ -31,12 +31,12 @@ function initVariables
        findFile aux "$__CONFDIR"/.distributions/"$DISTRIBUTION"/debootstrap.mirror \
                     "$__CONFDIR"/.defaults/apps/debootstrap/mirror \
                     "$__DISTRIBDIR"/"$DISTRIBUTION"/debootstrap.mirror \
-                    "$__PKGLIBDEFAULTDIR"/debootstrap.mirror
+                    "$__PKGLIBDEFAULTDIR"/debootstrap.mirror ''
        test -z "$aux" || read MIRROR <"$aux"
     }
     local file
     findFile file "$__CONFDIR"/.distributions/"$DISTRIBUTION"/debootstrap.options \
-                 "$__CONFDIR"/.defaults/apps/debootstrap/options
+                 "$__CONFDIR"/.defaults/apps/debootstrap/options ''
     test -z "$file" || read options <"$file"
 }
 
@@ -155,14 +155,8 @@ setup_writeInitialFstab
 findDebootstrap
 
 if test -z "$script"; then
-    for s in "$__CONFDIR/.distributions/$DISTRIBUTION/debootstrap.script"
-            "$__DISTRIBDIR/$DISTRIBUTION/debootstrap.script"
-    do
-       if test -e "$s"; then
-           script="$s"
-           break
-       fi
-    done
+    findFile script "$__CONFDIR/.distributions/$DISTRIBUTION/debootstrap.script" \
+                   "$__DISTRIBDIR/$DISTRIBUTION/debootstrap.script" ''
 fi
 
 export MIRROR