add a new optional --script for confignics
This commit is contained in:
parent
b8f9d57194
commit
aaed135c1e
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
|
||||
str_dir_name=`dirname $0`
|
||||
. $str_dir_name/xcatlib.sh
|
||||
@ -59,6 +59,22 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
boot_myscript=0
|
||||
if [ $# -eq 2 ]
|
||||
then
|
||||
if [ "$1" = "--script" ]
|
||||
then
|
||||
if [ $bool_cfg_inst_nic -eq 1 -o $bool_remove -eq 1 -o ! -z "$num_iba_ports" ]
|
||||
then
|
||||
logger -t xcat -p local4.info "confignics --script <myscript> could Not be used with other options"
|
||||
echo "confignics --script <myscript> could Not be used with other options"
|
||||
exit -1
|
||||
fi
|
||||
boot_myscript=1
|
||||
myscript=$2;
|
||||
fi
|
||||
fi
|
||||
|
||||
logger -t xcat -p local4.info "confignics is called: config install nic:$bool_cfg_inst_nic, remove: $bool_remove, iba ports: $num_iba_ports"
|
||||
echo "confignics on $NODE: config install nic:$bool_cfg_inst_nic, remove: $bool_remove, iba ports: $num_iba_ports"
|
||||
|
||||
@ -132,6 +148,14 @@ splitconfig $NICTYPES
|
||||
splitconfig $NICNETWORKS
|
||||
splitconfig $NICCUSTOMSCRIPTS
|
||||
|
||||
if [ $boot_myscript -eq 1 ];then
|
||||
. $str_dir_name/$myscript
|
||||
if [ $? -ne 0 ];then
|
||||
exit -1
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#get state of nic in "UP" status
|
||||
#If bonded redhat then "SLAVE" or "MASTER" will be in the first line of stanza
|
||||
#do not configure the loopback nic
|
||||
|
Loading…
Reference in New Issue
Block a user