From 3c261f238b500d5d17a60ea2c5063c4706f28020 Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Tue, 31 Jul 2007 19:43:17 +0000 Subject: [PATCH] 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 --- scripts/vserver-build.debootstrap | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) 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 -- 1.8.1.5