Re: [PATCH 03/16] Clean up some conditional checking when trying to find our config files.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/14/2010 09:23 PM, Victor Lowther wrote:
No point in checking the same condition twice when compound commands will do.

---
  dracut |    8 ++++----
  1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dracut b/dracut
index 541bfc0..a653981 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


missing "||" in the second block???
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux