From 118d62047e18fa99e796d9aee9c64f5583030da0 Mon Sep 17 00:00:00 2001 From: XuWei Date: Tue, 12 Sep 2017 02:28:25 -0400 Subject: [PATCH] modified depending on comments --- xCAT-probe/subcmds/discovery | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-probe/subcmds/discovery b/xCAT-probe/subcmds/discovery index b7a6e4cc6..194bbaa33 100755 --- a/xCAT-probe/subcmds/discovery +++ b/xCAT-probe/subcmds/discovery @@ -359,7 +359,7 @@ sub check_pre_defined_node { next; } - if (!(exists($nodecheckrst{$node}{"switchport"})) or $nodecheckrst{$node}{"switchport"} !~ /^\d/ or $valid_nodes !~ $node) { + if (!(exists($nodecheckrst{$node}{"switchport"})) or $nodecheckrst{$node}{"switchport"} !~ /^\d+$/ or $valid_nodes !~ $node) { push @error_attribute, "switchport"; } @@ -640,7 +640,7 @@ sub check_genesis_file { $rst = 1; } - if ($initrd_path =~ /http:\/\/.+:80\/(.+)/) { + if ($initrd_path =~ /http:\/\/.+:80(\/.+)/) { my $initrd_file = $1; my $initrd_time = `stat $initrd_file | grep Modify | cut -d ' ' -f 2-3`; if ($genesis_time and $initrd_time < $genesis_time) {