Hi guys, hope you scripting gurus here can help me out, the logic in my script somehow not working the way it should, this script part of a bigger backup script suppose to do some checking on the cluster prior to bringing up the package on MC/SG after backend cloning operation, this portion is suppose to check switching parameter if it is disabled, if so then turn it on with command "cmmodpkg -v -e -n hostname package_name", somehow it's not working.
when I run it the output is like this
# ./ccc
enabled <<<--- from echo $PRISTAT
cmmodpkg -v -e -n PRIMARY PACKAGE_NAME <<<--- this is wrong output
enabled <<<-- from echo $SECSTAT
cmmodpkg -v -e -n SECONDARY PACKAGE_NAME <<< -- this also wrong output
which is wrong.
the output from cmviewcl
# /usr/sbin/cmviewcl -v | grep -i current | awk '{ print $3 }'
enabled
# /usr/sbin/cmviewcl -v | grep -i alterna | awk '{ print $3 }'
enabled
can somebody pls help me.