Commit 92d8c317 authored by Stanislav Kinsburskiy's avatar Stanislav Kinsburskiy Committed by Pavel Emelyanov

scripts: fix strings comparison in systemd-autofs-restart.sh

Otherwise the following errors can be triggered:

/usr/libexec/criu/scripts/systemd-autofs-restart.sh: line 64: [: =: unary
operator expected
/usr/libexec/criu/scripts/systemd-autofs-restart.sh: line 77: [: =: unary
operator expected
Signed-off-by: 's avatarStanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent d588642d
...@@ -37,7 +37,7 @@ fi ...@@ -37,7 +37,7 @@ fi
JOIN_CT="$NS_ENTER -t $CRTOOLS_INIT_PID -m -u -p" JOIN_CT="$NS_ENTER -t $CRTOOLS_INIT_PID -m -u -p"
# Skip container, if it's not systemd based # Skip container, if it's not systemd based
[ $($JOIN_CT basename -- $(readlink /proc/1/exe)) == "systemd" ] || exit 0 [ "$($JOIN_CT basename -- $(readlink /proc/1/exe))" == "systemd" ] || exit 0
AUTOFS_SERVICES="proc-sys-fs-binfmt_misc.automount" AUTOFS_SERVICES="proc-sys-fs-binfmt_misc.automount"
...@@ -61,7 +61,7 @@ function check_fs_type { ...@@ -61,7 +61,7 @@ function check_fs_type {
while IFS='' read -r line || [[ -n "$line" ]]; do while IFS='' read -r line || [[ -n "$line" ]]; do
# Skip those entries which do not match the mountpoint # Skip those entries which do not match the mountpoint
[ $(echo $line | awk '{print $5;}') = $mountpoint ] || continue [ "$(echo $line | awk '{print $5;}')" = "$mountpoint" ] || continue
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;}')
...@@ -74,7 +74,7 @@ function check_fs_type { ...@@ -74,7 +74,7 @@ function check_fs_type {
top_mount_fs_type=$mnt_fs_type top_mount_fs_type=$mnt_fs_type
done < "/proc/$CRTOOLS_INIT_PID/mountinfo" done < "/proc/$CRTOOLS_INIT_PID/mountinfo"
[ $top_mount_fs_type = $fs_type ] [ "$top_mount_fs_type" = "$fs_type" ]
} }
function bind_mount { function bind_mount {
......
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