summaryrefslogtreecommitdiffstats
path: root/hooks
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2014-03-01 22:38:21 +0100
committerDave Reisner <dreisner@archlinux.org>2014-03-01 22:38:21 +0100
commit869c314159497c74aa6cf477862629b05a9fd2b0 (patch)
treeea87c4460db7086ea16ff9e8ae4b6f5a20192cfa /hooks
parented65f93eb4d23aee3129611c90fa2b81e0cb7f42 (diff)
downloadmkinitcpio-869c314159497c74aa6cf477862629b05a9fd2b0.tar.gz
mkinitcpio-869c314159497c74aa6cf477862629b05a9fd2b0.tar.xz
Always use the --target flag with findmnt
Prevents problems with bogusly named filesystems, e.g.: mount -t tmpfs / /mount/point Fixes FS#39090.
Diffstat (limited to 'hooks')
-rw-r--r--hooks/usr6
1 files changed, 3 insertions, 3 deletions
diff --git a/hooks/usr b/hooks/usr
index f45ca7f..44aebb2 100644
--- a/hooks/usr
+++ b/hooks/usr
@@ -4,12 +4,12 @@ run_latehook() {
local usr_source mountopts passno realtab=/new_root/etc/fstab
if [ -f "$realtab" ]; then
- if usr_source=$(findmnt -snero source --tab-file="$realtab" /usr); then
- mountopts=$(findmnt -snero options --tab-file="$realtab" /usr)
+ if usr_source=$(findmnt -snero source --tab-file="$realtab" -T /usr); then
+ mountopts=$(findmnt -snero options --tab-file="$realtab" -T /usr)
# returning the passno column requires util-linux >= 2.23. for
# older versions which do not support this column, always fsck.
- passno=$(findmnt -snero passno --tab-file="$realtab" /usr 2>/dev/null)
+ passno=$(findmnt -snero passno --tab-file="$realtab" -T /usr 2>/dev/null)
if [ -z "$passno" ] || [ "$passno" -gt 0 ]; then
fsck_device "$usr_source"
fi