From: Daniel Hokka Zakrisson Date: Tue, 31 Jul 2007 19:43:17 +0000 (+0000) Subject: Use findFile consistently. Don't fail if a file doesn't exist, these are all optional. X-Git-Tag: release-0.30.214~31 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c261f238b500d5d17a60ea2c5063c4706f28020;p=util-vserver.git Use findFile consistently. Don't fail if a file doesn't exist, these are all optional. git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2574 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/scripts/vserver-build.debootstrap b/scripts/vserver-build.debootstrap index 1036a6c..565d70b 100644 --- a/scripts/vserver-build.debootstrap +++ b/scripts/vserver-build.debootstrap @@ -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