summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaximilian Gass <mxey@ghosthacking.net>2011-05-23 07:58:08 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-05-23 09:49:52 +0200
commitdd5723050dfac40dfbe1d01c9d7e785f165d40a4 (patch)
tree1d8bf9cc3c11db92eff88eab15e934165a56ba3c
parent94c813baab6967dea750699cf6426b33419994e7 (diff)
Invert logic in command existence condition
Conflicts: bin/ssh-forcecommand
-rwxr-xr-xbin/ssh-forcecommand7
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__