[Q] Solaris boot up ignore "#!/bin/ksh" on autostart file ????

From: bbb bb (mccux1@hotmail.com)
Date: Fri Jun 04 2004 - 10:55:52 EDT


i have a "KSH" program put on /etc/rc3.d/S99test (Solaris 9). This program
first line has "#!/bin/ksh" in it. If I run it use "./S99test start", it
work fine withour error message. If I reboot server and I get error message
when system bootup. Look like system boot up ignore "#!/bin/ksh" and still
run it use "/bin/sh".

E.g.

# ./S99test start

case "$1" in
'start')
A=`ping 172.29.21.15|grep alive|wc -l`

echo $A
if ((A == 1))
then
        echo "Network UP"
else
        echo "Network DOWN"
        exit
fi
;;
'stop')
;;
esac
1
Network UP

===================================================
When system boot up:

case "$1" in
'start')
A=`ping 172.29.21.15|grep alive|wc -l`

echo $A
if ((A == 1))
then
        echo "Network UP"
else
        echo "Network DOWN"
        exit
fi
;;
'stop')
;;
esac
1
/etc/rc3.d/S99test: A: not found
Network DOWN

=======================================

Anyone has ideal, why system boot up ignore /bin/ksh????

Thanks.

_________________________________________________________________
Getting married? Find great tips, tools and the latest trends at MSN Life
Events. http://lifeevents.msn.com/category.aspx?cid=married
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:28:48 EDT