From 8d85304cab145d5a542b5058e5725ecd98afbeda Mon Sep 17 00:00:00 2001 From: ligc Date: Mon, 10 Dec 2012 09:13:39 +0000 Subject: [PATCH] fix for bug 3393278: rflash -p /tmp/test will not output any error git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14601 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/AAAusage.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/AAAusage.pm b/xCAT-server/lib/xcat/plugins/AAAusage.pm index 4ec3005bb..a6d638ce1 100644 --- a/xCAT-server/lib/xcat/plugins/AAAusage.pm +++ b/xCAT-server/lib/xcat/plugins/AAAusage.pm @@ -61,6 +61,16 @@ sub preprocess_request { $exargs[0] = "--help"; # force help if no args } + # rflash: -p flag is to specify a directory, which will be parsed as a node range with regular expression + # stop the rflash command without noderange + # rflash -p /tmp/test --activate disruptive + # where the /tmp/test will be treated as noderange with regular expression + # this is a general issue for the xcatclient commands, if with a flag can be followed by directory + # however, rflash is the only one we can think of for now. + if(!$noderange and $command eq "rflash") { + $exargs[0] = "--help"; + } + my $usage_string=xCAT::Usage->parseCommand($command, @exargs); if ($usage_string) { $callback->({data=>[$usage_string]});