-Add nbroot facility to request server rewrite of fru on completion of bmcsetup

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2225 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-09-22 23:40:33 +00:00
parent 2c1d5a3bcb
commit e25a09e4ba
2 changed files with 31 additions and 0 deletions

View File

@ -59,6 +59,11 @@ ipmitool raw 0xc 0x21 0x1 0x1 0x1
echo "Enabling SOL for user 2"
ipmitool raw 6 0x4c 1 2 2 0 0 0
allowcred.awk &
CREDPID=$!
frume.awk
kill $CREDPID
echo "Lighting Identify Light"
ipmitool raw 0 4 0xff

View File

@ -0,0 +1,26 @@
#!/usr/bin/awk -f
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
BEGIN {
localport = ARGV[1]
ns = "/inet/tcp/0/127.0.0.1/" localport
canexit = 0
print "<xcatrequest>" |& ns
print "<command>rewritemyfru</command>" |& ns
print "</xcatrequest>" |& ns
while (1) {
if ((ns |& getline) > 0) {
print $0 > "/tmp/fru.status"
if ($0 ~ /<\/serverdone>/)
canexit = 1
if (canexit == 1 && $0 == "</xcatresponse>")
break
} else {
close(ns)
exit 1
}
}
close(ns)
exit 0
}