From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Victor Lowther <victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 03/16] Clean up some conditional checking when trying to find our config files.
Date: Mon, 16 Aug 2010 10:47:14 +0200 [thread overview]
Message-ID: <4C68FB12.8010504@redhat.com> (raw)
In-Reply-To: <ef5afb56d5b0073885e92a7fbe0bd79dfe84fb77.1281812505.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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???
next prev parent reply other threads:[~2010-08-16 8:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-14 19:23 [PATCH 01/16] Trivial cleanups in dracut-functions Victor Lowther
[not found] ` <170ac6ad6189b7d7d31610a797d059d590807484.1281812505.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-08-14 19:23 ` [PATCH 04/16] Bashify the code that actually sources out config files Victor Lowther
2010-08-14 19:23 ` [PATCH 05/16] Shorten permission checking to ensure we can actually write our initramfs Victor Lowther
[not found] ` <f25afda727e1ff3ddebccc987268b5fdc2d1332b.1281812505.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-08-15 2:03 ` Victor Lowther
2010-08-14 19:23 ` [PATCH 03/16] Clean up some conditional checking when trying to find our config files Victor Lowther
[not found] ` <ef5afb56d5b0073885e92a7fbe0bd79dfe84fb77.1281812505.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-08-16 8:47 ` Harald Hoyer [this message]
2010-08-14 19:23 ` [PATCH 02/16] Get rid of unneeded dirname calls Victor Lowther
[not found] ` <0e55145f49bde182dc7efec5fa8965f31dc5234e.1281812505.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-08-15 9:20 ` Luca Berra
[not found] ` <20100815092037.GB649-hdG+WfPrfN2JmafXlB/IVQ@public.gmane.org>
2010-08-15 18:54 ` Victor Lowther
2010-08-14 19:23 ` [PATCH 10/16] Bashify error() and usage() in mkinitrd-dracut.sh Victor Lowther
2010-08-14 19:23 ` [PATCH 07/16] We have $UID, use it instead of $(id -u) Victor Lowther
2010-08-14 19:23 ` [PATCH 06/16] Flatten our check to ensure that depmod works Victor Lowther
2010-08-14 19:23 ` [PATCH 08/16] Add support for bzip2 and xz compressed initramfs images Victor Lowther
[not found] ` <d23e6d8e5281904090c6a05cecf1576ee7f098f6.1281812506.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-08-15 2:02 ` Victor Lowther
2010-08-14 19:23 ` [PATCH 09/16] Just test the status of the cpio-and-compress pipe directly Victor Lowther
2010-08-14 19:23 ` [PATCH 14/16] Trivial bashification of 00dash/install Victor Lowther
2010-08-14 19:23 ` [PATCH 12/16] Prettify the option setting loop in dracut Victor Lowther
2010-08-14 19:23 ` [PATCH 16/16] Add a PKGBUILD file to make building on Arch Linux from a git checkout easy Victor Lowther
2010-08-14 19:23 ` [PATCH 13/16] Trivial bashification and minor code rearrangement for initramfs compression Victor Lowther
2010-08-14 19:23 ` [PATCH 11/16] Bashify mkinitrd-dracut.sh, introduce read_arg Victor Lowther
2010-08-14 19:23 ` [PATCH 15/16] We are precise about hostonly checking these days Victor Lowther
2010-08-15 9:10 ` [PATCH 01/16] Trivial cleanups in dracut-functions Luca Berra
[not found] ` <20100815091056.GA649-hdG+WfPrfN2JmafXlB/IVQ@public.gmane.org>
2010-08-15 18:49 ` Victor Lowther
2010-08-23 10:41 ` Harald Hoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C68FB12.8010504@redhat.com \
--to=harald-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.