Created a korn shell script, everything is is working except this section, the variable $SYSINFO is being set, but the NASIP & NASDEV are failing, it appears to be treating the config.xml file config directory and xml as the file. Need a second set of eyes to tell me where I am messing up.
# Start NAS Interface Config
SYSINFO="/vm/$zonename/root/var/sysinfo"
echo $SYSINFO
NASIP="`/bin/sed -n -e 's/.*<nasip>\(.*\)<\/nasip>.*/\1/p' $SYSINFO/config.xml`"
NASDEV="`/bin/sed -n -e 's/.*<nasdevice>\(.*\)<\/nasdevice>.*/\1/p' $SYSINFO/config.xml`"
echo $NASDEV
zonecfg -z $zonename 'add net; set address=$NASIP; set physical=$NASDEV;end'
This is the output from this section of the script.
/vm/server04z1/root/var/sysinfo ----> echo $SYSINFO
Can't open /vm/server04z1/root/var/sysinfo/config ---> should be parsing config.xml
Can't open xml
Can't open /vm/server04z1/root/var/sysinfo/config ---> should be parsing config.xml
Can't open xml