[CRIU] [PATCH] systemd-autofs-restart.sh: fix issue with removed check_fs_type reference

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Wed Feb 22 08:52:16 PST 2017


"Check_fs_type" helper was repalce by "get_fs_type".
This reference is a silly mistake.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 scripts/systemd-autofs-restart.sh |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/scripts/systemd-autofs-restart.sh b/scripts/systemd-autofs-restart.sh
index 95f1d0b..c7eb7ed 100755
--- a/scripts/systemd-autofs-restart.sh
+++ b/scripts/systemd-autofs-restart.sh
@@ -123,7 +123,14 @@ function restore_mountpoint {
 	[ -n "$bindmount" ] || return
 
 	# Umount file system, remounted by systemd, if any
-	if ! check_fs_type $mountpoint "autofs"; then
+	top_mount_fs_type=$(get_fs_type $mountpoint)
+	if [ $? -ne 0 ]; then
+		echo "$top_mount_fs_type"
+		return
+	fi
+
+	# Nothing to do, if no file system is on top of autofs
+	if [ "$top_mount_fs_type" != "autofs" ]; then
 		$JOIN_CT umount $mountpoint || echo "Failed to umount $mountpoint"
 	fi
 



More information about the CRIU mailing list