From dd5723050dfac40dfbe1d01c9d7e785f165d40a4 Mon Sep 17 00:00:00 2001 From: Maximilian Gass Date: Mon, 23 May 2011 07:58:08 +0200 Subject: Invert logic in command existence condition Conflicts: bin/ssh-forcecommand --- bin/ssh-forcecommand | 7 +++---- 1 file 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__ -- cgit v1.2.3