[CRIU] [PATCH] scripts: fix mountinfo parsing in systemd-autofs-restart.sh
Stanislav Kinsburskiy
skinsbursky at virtuozzo.com
Tue May 10 04:13:37 PDT 2016
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 <skinsbursky at virtuozzo.com>
---
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 af4ad8f..58c0bf4 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
More information about the CRIU
mailing list