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 <Chris Allen>
This commit is contained in:
Chris Allen
2014-03-10 13:06:09 -07:00
committed by Dietmar Maurer
parent 70986fd9e4
commit c521e801ae

View File

@ -430,14 +430,14 @@ my $add_view = sub {
my $cmdmap; my $cmdmap;
if (@params && $params[0] eq 'restart') { if (@params && $params[0] eq 'restart') {
@params = ('restart', '1>&2', '>', '/dev/null'); @params = ('onerestart', '>&', '/dev/null');
$cmdmap = { $cmdmap = {
cmd => 'ssh', cmd => 'ssh',
method => $DAEMON, method => $DAEMON,
params => \@params, params => \@params,
}; };
} else { } else {
@params = ('-HUP', '$(cat '. "$SETTINGS->{pidfile})"); @params = ('-HUP', '`cat '. "$SETTINGS->{pidfile}`");
$cmdmap = { $cmdmap = {
cmd => 'ssh', cmd => 'ssh',
method => 'kill', method => 'kill',