Commit 00f8b63b authored by Eugene Kolomeetz's avatar Eugene Kolomeetz Committed by Pavel Emelyanov

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-44207Signed-off-by: 's avatarEugene Kolomeetz <klm@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent e9283213
......@@ -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
......
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