Commit 49bfd954 authored by Stanislav Kinsburskiy's avatar Stanislav Kinsburskiy Committed by Pavel Emelyanov

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: 's avatarStanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 830cb368
...@@ -65,7 +65,7 @@ function check_fs_type { ...@@ -65,7 +65,7 @@ function check_fs_type {
local mnt_id=$(echo $line | awk '{print $1;}') local mnt_id=$(echo $line | awk '{print $1;}')
local mnt_parent_id=$(echo $line | awk '{print $2;}') 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 # Skip mount entry, if not the first one and not a child
[ -n "$top_mount_id" ] && [ "$mnt_parent_id" != "$top_mount_id" ] && continue [ -n "$top_mount_id" ] && [ "$mnt_parent_id" != "$top_mount_id" ] && continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment