2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

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 <skinsbursky@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Stanislav Kinsburskiy
2016-05-10 14:13:00 +03:00
committed by Pavel Emelyanov
parent 830cb36876
commit 49bfd9540d

View File

@@ -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