Darren J Moffat wrote:
William James wrote:
Writing a script for /etc/init.d FORCES me to use /bin/sh
On OpenSolaris, the rc scripts are invoked via a shell-agnostic mechanism:
for f in /etc/rc0.d/S*; do
if [ -s $f ]; then
case $f in
*.sh) /lib/svc/bin/lsvcrun -s $f start;;
*) /lib/svc/bin/lsvcrun $f start ;;
esac
fi
done
On earlier versions of Solaris, the code used to be /sbin/sh specific:
for f in /etc/rc0.d/S*; do
if [ -s $f ]; then
case $f in
*.sh) . $f ;;
*) /sbin/sh $f start ;;
esac
fi
done
Note that this is a /OpenSolaris/ alias, so the behavior of
older Sun Solaris releases is somewhat out of scope...
-John
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code