diff options
author | Maximilian Gass <mxey@ghosthacking.net> | 2011-05-23 07:58:08 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-05-23 09:49:52 +0200 |
commit | dd5723050dfac40dfbe1d01c9d7e785f165d40a4 (patch) | |
tree | 1d8bf9cc3c11db92eff88eab15e934165a56ba3c | |
parent | 94c813baab6967dea750699cf6426b33419994e7 (diff) |
Invert logic in command existence condition
Conflicts:
bin/ssh-forcecommand
-rwxr-xr-x | bin/ssh-forcecommand | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/ssh-forcecommand b/bin/ssh-forcecommand index 93ba1a3..36bc9ef 100755 --- a/bin/ssh-forcecommand +++ b/bin/ssh-forcecommand @@ -19,12 +19,11 @@ while ( my $line = <$conf> ) { } close($conf) or die("Cannot close $conffile: $!\n"); -if ( $command{$input} ) { - exec( $command{$input} ); - exit 1; +if ( not $command{$input} ) { + die("Unknown command\n"); } -die("Unknown command\n"); +exec( $command{$input} ); __END__ |