linux 종료 시 데몬 kill 문제

seraphino의 이미지

안녕하세요. 고수님들의 도움이 필요해 이렇게 글을 올립니다.

아래 bypass_sh 이라는 script를 작성하였습니다.
#################################################
# process name : bypass_sh

#Source function library.
. /etc/rc.d/init.d/functions

PATH=.:$PATH

RETVAL=0
lockfile=/var/lock/subsys/$prog

start()
{
#/root/ywoh/change_2port_std.script -set_bypass eth0 off
echo -n $"====================Starting set bypass off "
#/etc/init.d/change_2port_std.script -set_bypass eth0 off
touch $lockfile
echo
return $RETVAL
}

stop()
{
#/root/ywoh/change_2port_std.script -set_bypass eth0 on
echo -n $"===================set bypass on========================"
#/etc/init.d/change_2port_std.script -set_bypass eth0 on
rm -f $lockfile
echo
return $RETVAL
}

restart()
{
stop
start
}

case "$1" in
start)
start
;;

stop)
stop
;;

restart|reload|force-reload|condrestart|try-restart)
restart
;;

*)
echo $"Usage: $0 {start|stop|restart}"
RETVAL=2

esac

exit 0
####################################################################

runlevel 3인 상태에서 종료 시 호출 되도록 rc0.d rc6.d에

[root@SNIPER rc0.d]# ls -alt
total 8
drwxr-xr-x 10 root root 4096 Oct 30 10:44 ..
drwxr-xr-x 2 root root 4096 Oct 30 09:32 .
lrwxrwxrwx 1 root root 19 Oct 30 09:32 K05bypass_sh -> ../init.d/bypass_sh

위와 같이 추가 하였으나 종료 시 해당 script가 call 되지 않습니다.

아래는 종료 시 출력 메시지 입니다.
##########################################################

Stopping atd: [ OK ]
Stopping sshd: [ OK ]
Stopping crond: [ OK ]
Stopping acpi daemon: [ OK ]
Shutting down system logger: [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
Sending all processes the TERM signal...
Sending all processes the KILL signal...
Saving random seed:
Syncing hardware clock to system time
Unmounting file systems:
Halting systm...
Power down.

흠 혹시 어떤 부분을 살펴봐야 위 문제를 해결할 까요?

조언을 주시면 감사하겠습니다. :)

seraphino의 이미지

ln -s 를 걸어도,,,
ntsysv에 등록을 안해 놓으면 종료 시 뜨질 않는 군요. 이걸로 하루를 보내다니... 쩝...
그럼 수고하십시요.