From: Harald Hoyer Date: Mon, 20 Feb 2012 16:27:32 +0000 (+0100) Subject: 98usrmount/mount-usr.sh: honor fs_passno in /etc/fstab X-Git-Tag: 017~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd9592385d4154fce355e463204e6ac5a7eb2f27;p=platform%2Fupstream%2Fdracut.git 98usrmount/mount-usr.sh: honor fs_passno in /etc/fstab If the sixth field in /etc/fstab is "0" or not present for /usr, do not run fsck. This prevents fsck for nfs /usr also. --- diff --git a/modules.d/98usrmount/mount-usr.sh b/modules.d/98usrmount/mount-usr.sh index 9998624..8042d3a 100755 --- a/modules.d/98usrmount/mount-usr.sh +++ b/modules.d/98usrmount/mount-usr.sh @@ -7,9 +7,9 @@ type fsck_single >/dev/null 2>&1 || . /lib/fs-lib.sh mount_usr() { - local _dev _mp _fs _opts _rest _usr_found _ret + local _dev _mp _fs _opts _rest _usr_found _ret _freq _passno # check, if we have to mount the /usr filesystem - while read _dev _mp _fs _opts _rest; do + while read _dev _mp _fs _opts _freq _passno; do if [ "$_mp" = "/usr" ]; then case "$_dev" in LABEL=*) @@ -21,7 +21,7 @@ mount_usr() _dev="/dev/disk/by-uuid/${_dev#UUID=}" ;; esac - echo "$_dev ${NEWROOT}${_mp} $_fs ${_opts} $_rest" + echo "$_dev ${NEWROOT}${_mp} $_fs ${_opts} $_freq $_passno" _usr_found="1" break fi @@ -29,7 +29,11 @@ mount_usr() if [ "x$_usr_found" != "x" ]; then # we have to mount /usr - fsck_single "$_dev" "$_fs" + if [ "x0" != "x${_passno:-0}" ]; then + fsck_single "$_dev" "$_fs" + else + : + fi _ret=$? echo $_ret >/run/initramfs/usr-fsck if [ $_ret -ne 255 ]; then