All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] add default values in fstab_lines
Date: Wed, 26 Feb 2014 15:08:25 +0100	[thread overview]
Message-ID: <530DF559.70404@redhat.com> (raw)
In-Reply-To: <20140224015457.GA4043-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>

On 02/24/2014 02:54 AM, Dave Young wrote:
> On 02/14/14 at 04:49pm, Dave Young wrote:
>> It's useful for passing a full fstab line including like fs_passno so fsck
>> can take effect.
>>
>> Previously it's assumed that there's no fs_freq and fs_passno in fstab lines
>> so original code just append "0 0" at the end of each fstab lines.
>>
>> Improve this issue by assign default value in case they are not passed in.
>> Three field are handled here:
>> fs_mntops: default to "defaults"
>> fs_freq: default to "0"
>> fs_passno: default to "0" 
>>
>> Signed-off-by: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> ---
>>  dracut.8.asc |    8 ++++++--
>>  dracut.sh    |    6 +++++-
>>  2 files changed, 11 insertions(+), 3 deletions(-)
>>
>> --- dracut.orig/dracut.sh
>> +++ dracut/dracut.sh
>> @@ -1222,7 +1222,11 @@ if [[ $kernel_only != yes ]]; then
>>      [[ $kernel_cmdline ]] && printf "%s\n" "$kernel_cmdline" >> "${initdir}/etc/cmdline.d/01-default.conf"
>>  
>>      while pop fstab_lines line; do
>> -        printf "%s\n" "$line 0 0" >> "${initdir}/etc/fstab"
>> +        line=($line)
>> +        [ -z "${line[3]}" ] && line[3]="defaults"
>> +        [ -z "${line[4]}" ] && line[4]="0"
>> +        [ -z "${line[5]}" ] && line[5]="0"
>> +        echo "${line[@]}" >> "${initdir}/etc/fstab"
>>      done
>>  
>>      for f in $add_fstab; do
>> --- dracut.orig/dracut.8.asc
>> +++ dracut/dracut.8.asc
>> @@ -311,9 +311,13 @@ provide a valid _/etc/fstab_.
>>  **--add-fstab** _<filename>_::
>>      Add entries of _<filename>_ to the initramfs /etc/fstab.
>>  
>> -**--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ _<filesystem options>_"::
>> +**--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ _<filesystem options>_ _<dump options>_ _<fsck order>_"::
>>      Mount _<device>_ on _<mountpoint>_ with _<filesystem type>_ and _<filesystem
>> -    options>_ in the initramfs
>> +    options>_ in the initramfs. _<dump options>_ and _<fsck order>_ can also be
>> +    specified, see fstab manpage for the details.
>> +    The default _<filesystem options>_ is "defaults".
>> +    The default _<dump options>_ is "0".
>> +    the default _<fsck order>_ is "2".
>>  
>>  **--add-device** _<device>_ ::
>>      Bring up _<device>_ in initramfs, _<device>_ should be the device name.
> 
> Hi, Harald
> 
> What's your opinion about this? Could you review it?
> 
> Thanks
> Dave

Looks good.. So what should be the default fsck order? 0 or 2?

  parent reply	other threads:[~2014-02-26 14:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14  8:49 [PATCH] add default values in fstab_lines Dave Young
     [not found] ` <20140214084921.GA30064-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2014-02-17 15:55   ` Vivek Goyal
     [not found]     ` <20140217155512.GG11670-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-02-18  5:19       ` Dave Young
     [not found]         ` <20140218051946.GB3123-je1gSBvt1Tc/CGXRbJeUwh/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2014-02-18 13:29           ` Vivek Goyal
2014-02-24  1:54   ` Dave Young
     [not found]     ` <20140224015457.GA4043-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2014-02-26 14:08       ` Harald Hoyer [this message]
     [not found]         ` <530DF559.70404-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-02-26 14:09           ` Harald Hoyer
     [not found]             ` <530DF5B6.6070309-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-02-27  1:41               ` Dave Young
2014-02-27  1:40           ` Dave Young
     [not found]             ` <20140227014032.GA2338-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2014-02-27  2:23               ` Dave Young

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=530DF559.70404@redhat.com \
    --to=harald-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=vgoyal-H+wXaHxf7aLQT0dZR+AlfA@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.