On old systems (e.g. RHEL6) with /sbin/mount.tmpfs the mtab file is
modified although our in-tree mount does not support mtab file. We
need to call umount --fake to be sure that we remove unwanted lines
from the test.
Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
ts_log "OK"
fi
$TS_CMD_UMOUNT $MNT &> /dev/null
-[ "$?" = "0" ] || ts_log "error: umount $MNT"
+if [ "$?" = "0" ]; then
+ # for old systems with mtab and /sbin/mount.tmpfs
+ /bin/umount --fake "$MNT" &> /dev/null
+else
+ ts_log "error: umount $MNT"
+fi
ts_finalize_subtest
ts_log "OK"
fi
$TS_CMD_UMOUNT $MNT &> /dev/null
-[ "$?" = "0" ] || ts_log "error: umount $MNT"
+if [ "$?" = "0" ]; then
+ # for old systems with mtab and /sbin/mount.tmpfs
+ /bin/umount --fake $MNT &> /dev/null
+else
+ ts_log "error: umount $MNT"
+fi
ts_finalize_subtest
ts_fstab_clean
$TS_CMD_UMOUNT $TS_MOUNTPOINT || ts_die "Cannot umount $TS_MOUNTPOINT"
+# for old systems with mtab and /sbin/mount.tmpfs
+/bin/umount --fake "$TS_MOUNTPOINT" &> /dev/null
+
ts_fstab_clean
ts_log "Success"