From cc205c1d5899353df66835eca962988062005b59 Mon Sep 17 00:00:00 2001 From: sakolish Date: Wed, 30 Apr 2008 12:50:30 +0000 Subject: [PATCH] Test slp_query is runnable - Line #1183 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1229 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/lsslp.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xCAT-server-2.0/lib/xcat/plugins/lsslp.pm b/xCAT-server-2.0/lib/xcat/plugins/lsslp.pm index abeee3fe5..273f3fe3c 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/lsslp.pm @@ -1169,11 +1169,23 @@ sub slp_query { WILDCARD_SERVICE ); + ############################################# + # slp_query not installed + ############################################# if ( !-x $slpcmd ) { send_msg( $request, 1, "Command not installed: $slpcmd" ); return(1); } ############################################# + # slp_query runnable - dependent on libstdc++ + # Test for usage statement. + ############################################# + my $output = `$slpcmd 2>&1`; + if ( $output !~ /slp_query --type=service-type-string/ ) { + send_msg( $request, 1, $output ); + return(1); + } + ############################################# # Query specific service; otherwise, # query all hardware/software services #############################################