From mboxrd@z Thu Jan 1 00:00:00 1970 From: Harald Hoyer Subject: Re: [PATCH] add default values in fstab_lines Date: Wed, 26 Feb 2014 15:08:25 +0100 Message-ID: <530DF559.70404@redhat.com> References: <20140214084921.GA30064@dhcp-16-126.nay.redhat.com> <20140224015457.GA4043@dhcp-16-126.nay.redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140224015457.GA4043-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org> Sender: initramfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Dave Young , vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, initramfs-u79uwXL29TY76Z2rM5mHXA@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 >> --- >> 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** __:: >> Add entries of __ to the initramfs /etc/fstab. >> >> -**--mount** "__ __ __ __":: >> +**--mount** "__ __ __ __ __ __":: >> Mount __ on __ with __ and _> - options>_ in the initramfs >> + options>_ in the initramfs. __ and __ can also be >> + specified, see fstab manpage for the details. >> + The default __ is "defaults". >> + The default __ is "0". >> + the default __ is "2". >> >> **--add-device** __ :: >> Bring up __ in initramfs, __ 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?