dracut-kdump.sh: recursively umount fs and its submounts

Certain dracut module will mount fs under real root(/sysroot/ or
$NEWROOT/). Thus root fs can not be umounted by `umount /sysroot/`.

We should use `umount -R /sysroot/` to recursively umount root and
its submounts.

v2: do the same for dump_fs() from Baoquan

Signed-off-by: WANG Chao <chaowang@redhat.com>
Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
WANG Chao 2013-06-21 11:23:59 +08:00 committed by Baoquan He
parent fa0ec28b26
commit 7f59604e41
1 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ dump_fs()
mv $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore
echo "kdump: saving vmcore complete"
umount $_mp || return 1
umount -R $_mp || return 1
return 0
}
@ -121,7 +121,7 @@ dump_to_rootfs()
echo "kdump: saving vmcore complete"
sync
umount $NEWROOT || return 1
umount -R $NEWROOT || return 1
return 0
}