Hi!大師們,
我install了woody在2部PC.
把某相同的一個scrip放在/etc/init.d/myscrypt
也都ln -s到
rc0.S/K02myscrypt rc1.S/K02myscrypt rc2.S/K02myscrypt
rc3.S/S98myscrypt rc4.S/S98myscrypt rc5.S/S98myscrypt
百思不解的是,在PC1,myscript有被啟動;在PC2,myscript沒有被啟動!
在PC2的bash prompt下指令:
/etc/init.d/myscript
也正確啟動.
另一個script - httpd,不在PC1,只在PC2, 也沒有被啟動!
請教大師們,我是否遺漏了甚麼,使PC2這麼刁鑽?
多謝指點!
#!/bin/bash
# script name: "/etc/init.d/httpd"
#
# If Apache is not available stop now.
[ -x /opt/apache/bin/apachectl ] || exit 0
APACHECTL=/opt/apache/bin/apachectl
case "$1" in
start)
echo -n $"Starting httpd: "
$APACHECTL start
;;
stop)
echo -n $"Stopping httpd: "
$APACHECTL stop
;;
restart)
echo -n $"Restarting httpd: "
$APACHECTL restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0