From: Victor Lowther Date: Sat, 14 Aug 2010 19:23:24 +0000 (-0500) Subject: Clean up some conditional checking when trying to find our config files. X-Git-Tag: 008~166 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eebc929abb66b2affe407c3e1c2255f2c3e2ca28;p=thirdparty%2Fdracut.git Clean up some conditional checking when trying to find our config files. No point in checking the same condition twice when compound commands will do. --- diff --git a/dracut b/dracut index 541bfc0bc..a65398104 100755 --- a/dracut +++ b/dracut @@ -131,13 +131,13 @@ export PATH # if we were not passed a config file, try the default one if [[ ! -f $conffile ]]; then - [[ $allowlocal ]] || conffile="/etc/dracut.conf" - [[ $allowlocal ]] && conffile="$dracutbasedir/dracut.conf" + [[ $allowlocal ]] && conffile="$dracutbasedir/dracut.conf" || \ + conffile="/etc/dracut.conf" fi if [[ ! -d $confdir ]]; then - [[ $allowlocal ]] || confdir="/etc/dracut.conf.d" - [[ $allowlocal ]] && confdir="$dracutbasedir/dracut.conf.d" + [[ $allowlocal ]] && confdir="$dracutbasedir/dracut.conf.d" \ + confdir="/etc/dracut.conf.d" fi # source our config file