From 49bfd9540df2a010fc06f434211bbfd2a0da5acb Mon Sep 17 00:00:00 2001 From: Stanislav Kinsburskiy Date: Tue, 10 May 2016 14:13:00 +0300 Subject: [PATCH] scripts: fix mountinfo parsing in systemd-autofs-restart.sh Fily system type is not necessarily located in the column number 9. But look like we can rely on " - " pattern: it's always located immediately after dash. Signed-off-by: Stanislav Kinsburskiy Signed-off-by: Pavel Emelyanov --- scripts/systemd-autofs-restart.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/systemd-autofs-restart.sh b/scripts/systemd-autofs-restart.sh index e12a5c949..a4eca0fd7 100755 --- a/scripts/systemd-autofs-restart.sh +++ b/scripts/systemd-autofs-restart.sh @@ -65,7 +65,7 @@ function check_fs_type { local mnt_id=$(echo $line | awk '{print $1;}') local mnt_parent_id=$(echo $line | awk '{print $2;}') - local mnt_fs_type=$(echo $line | awk '{print $9;}') + local mnt_fs_type=$(echo $line | sed 's/.* - //g' | awk '{print $1;}') # Skip mount entry, if not the first one and not a child [ -n "$top_mount_id" ] && [ "$mnt_parent_id" != "$top_mount_id" ] && continue