]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Clean up some conditional checking when trying to find our config files.
authorVictor Lowther <victor.lowther@gmail.com>
Sat, 14 Aug 2010 19:23:24 +0000 (14:23 -0500)
committerHarald Hoyer <harald@redhat.com>
Mon, 23 Aug 2010 09:51:33 +0000 (11:51 +0200)
No point in checking the same condition twice when compound commands will do.

dracut

diff --git a/dracut b/dracut
index 541bfc0bc550f38202ad150299bcf9ef4cb8be22..a65398104d6dbbae149c8e4a3d695dab09138e8b 100755 (executable)
--- 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