From: Chao Fan <cfan-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: [PATCH] Change the fs_passno of nfs to "0"
Date: Mon, 11 May 2015 05:30:02 -0400 (EDT) [thread overview]
Message-ID: <1214773375.11522755.1431336602566.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1640086230.11520038.1431336300230.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Change the fs_passno of nfs to "0"
Set fs_passno, the sixth variable of fstab to "0" when the device is nfs.
In the fstab,the sixth variable fs_passno stands for that the device need check
ed or not,and dracut set it to "2".But if it is nfs,there's no fsck for nfs uti
lity, e.g fsck.nfs like other file system. Whatever fs_passno 0 or 2 are passed
, no fsck is executed at all for nfs mount.So it should be "0" when the device i
s nfs.So when the third variable of fstab contains "nfs", the sixth variable fs_
passno should be set to "0".The third variable stands for the type of the filesy
stem.
Signed-off-by: Chao Fan <cfan-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
diff --git a/dracut.sh b/dracut.sh
index ab84221..a7a124c 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1517,7 +1517,13 @@ if [[ $kernel_only != yes ]]; then
line=($line)
[ -z "${line[3]}" ] && line[3]="defaults"
[ -z "${line[4]}" ] && line[4]="0"
- [ -z "${line[5]}" ] && line[5]="2"
+ [ -z "${line[5]}" ] && {
+ if strstr "${line[2]}" "nfs";then
+ line[5]="0"
+ else line[5]="2"
+ fi
+ }
+
echo "${line[@]}" >> "${initdir}/etc/fstab"
done
next parent reply other threads:[~2015-05-11 9:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1640086230.11520038.1431336300230.JavaMail.zimbra@redhat.com>
[not found] ` <1640086230.11520038.1431336300230.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-11 9:30 ` Chao Fan [this message]
[not found] ` <1214773375.11522755.1431336602566.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-11 11:32 ` [PATCH] Change the fs_passno of nfs to "0" Minfei Huang
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=1214773375.11522755.1431336602566.JavaMail.zimbra@redhat.com \
--to=cfan-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox