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에 등록을 안해 놓으면 종료 시 뜨질 않는 군요. 이걸로 하루를 보내다니... 쩝...
그럼 수고하십시요.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.