From 15c1a6e1a9ab63fd8e1a49174acccfb8a2e4efc4 Mon Sep 17 00:00:00 2001 From: vallard Date: Mon, 18 Jan 2010 23:01:23 +0000 Subject: [PATCH] fixed hex error git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4969 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/tools/rmblade | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xCAT-server/share/xcat/tools/rmblade b/xCAT-server/share/xcat/tools/rmblade index 397d6dc4c..4c3f6ba99 100755 --- a/xCAT-server/share/xcat/tools/rmblade +++ b/xCAT-server/share/xcat/tools/rmblade @@ -22,14 +22,17 @@ sub rmblade { my $blade = shift; my $hex = ip2hex($blade); print FILE "Running: nodech $blade chain.currstate='' chain.currchain=''\n"; - `nodech $blade chain.currstate='' chain.currchain=''`; + `nodech $blade chain.currstate= chain.currchain=`; print FILE "Running: chtab -d node=$blade mac\n"; `chtab -d node=$blade mac`; print FILE "Running: makedhcp -d $blade\n"; `makedhcp -d $blade`; print FILE "Running: rm /tftpboot/pxelinux.cfg/$blade\n"; `rm /tftpboot/pxelinux.cfg/$blade`; - print FILE "Running: rm /tftpboot/pxelinux.cfg/$hex\n"; + if($hex){ + print FILE "Running: rm /tftpboot/pxelinux.cfg/$hex\n"; + `rm /tftpboot/pxelinux.cfg/$hex`; + } } sub ip2hex { @@ -37,7 +40,6 @@ sub ip2hex { my $ip = ''; my @quad; my $hex = ''; - my $node = $ARGV[0]; my $packed_ip = gethostbyname($node); if(defined $packed_ip){ $ip = inet_ntoa($packed_ip);