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

scripts: remove bogus command substitution in systemd-autofs-restart.sh

When we want to just execute command (without capturing output), we must
not do it via $(cmd). With such form, shell first gets output of 'cmd',
and then evaluates it. If this is empty string, it is successfully
executed. If not empty, all breaks down.
https://jira.sw.ru/browse/PSBM-44207

Signed-off-by: Eugene Kolomeetz <klm@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Eugene Kolomeetz
2016-06-07 18:06:05 +03:00
committed by Pavel Emelyanov
parent e928321399
commit 00f8b63b22

View File

@@ -81,7 +81,7 @@ function bind_mount {
local from=$1
local to=$2
$($JOIN_CT mount --bind $from $to) && return 0
$JOIN_CT mount --bind $from $to && return 0
echo "Failed to bind mount $from to $to"
return 1
@@ -111,7 +111,7 @@ function restore_mountpoint {
# Umount file system, remounted by systemd, if any
if ! check_fs_type $mountpoint "autofs"; then
$($JOIN_CT umount $mountpoint) || echo "Failed to umount $mountpoint"
$JOIN_CT umount $mountpoint || echo "Failed to umount $mountpoint"
fi
# Restore origin file system even if we failed to unmount the new one