From c521e801aefb54ccaddd1f12aaccb98e36525761 Mon Sep 17 00:00:00 2001 From: Chris Allen Date: Mon, 10 Mar 2014 13:06:09 -0700 Subject: [PATCH] Fixed command substitution and output redirection in Istgt module to work in csh - the default shell in FreeBSD. Changed Istgt "restart" to "onerestart". This way a running istgt daemon will always restart whether or not it is enabled in rc.conf. Signed-off-by: Chris Allen --- PVE/Storage/LunCmd/Istgt.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/Storage/LunCmd/Istgt.pm b/PVE/Storage/LunCmd/Istgt.pm index b386b5d..2d59ef3 100644 --- a/PVE/Storage/LunCmd/Istgt.pm +++ b/PVE/Storage/LunCmd/Istgt.pm @@ -430,14 +430,14 @@ my $add_view = sub { my $cmdmap; if (@params && $params[0] eq 'restart') { - @params = ('restart', '1>&2', '>', '/dev/null'); + @params = ('onerestart', '>&', '/dev/null'); $cmdmap = { cmd => 'ssh', method => $DAEMON, params => \@params, }; } else { - @params = ('-HUP', '$(cat '. "$SETTINGS->{pidfile})"); + @params = ('-HUP', '`cat '. "$SETTINGS->{pidfile}`"); $cmdmap = { cmd => 'ssh', method => 'kill', -- 2.39.2