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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html