init 0 일때는 echo "System down"
init 6 일때에는 echo "System reboot" 이라는 메시지를 찍어 주고 싶습니다.
어떻게 구분이 가능한지.. 검색해도 잘 안나오네요.. 고수분들 답변 부탁드립니다.
gentoo라면
zirize@zirize ~ $ cat /etc/inittab | grep ^l l0:0:wait:/sbin/rc shutdown l1:S1:wait:/sbin/rc single l2:2:wait:/sbin/rc nonetwork l3:3:wait:/sbin/rc default l4:4:wait:/sbin/rc default l5:5:wait:/sbin/rc default l6:6:wait:/sbin/rc reboot zirize@zirize ~ $ file /sbin/rc /sbin/rc: a /sbin/runscript script text executable
centos라면
[zirize@zirize ~]$ cat /etc/inittab | grep ^l l0:0:wait:/etc/rc.d/rc 0 l1:1:wait:/etc/rc.d/rc 1 l2:2:wait:/etc/rc.d/rc 2 l3:3:wait:/etc/rc.d/rc 3 l4:4:wait:/etc/rc.d/rc 4 l5:5:wait:/etc/rc.d/rc 5 l6:6:wait:/etc/rc.d/rc 6 [zirize@ns ~]$ file /etc/rc.d/rc /etc/rc.d/rc: Bourne-Again shell script text executable
There is no spoon. Neo from the Matrix 1999.
runlevel이나 who -r 같은걸 원하시는건가요?
[darchon@linux ~]$ runlevel N 3 [darchon@linux ~]$ who -r run-level 3 2008-03-17 13:12 last=S [darchon@linux ~]$
http://star4u.org
http://mirror.star4u.org
언제 어느 타이밍에 하실려는지 모르겠지만...
gentoo라면
centos라면
There is no spoon. Neo from the Matrix 1999.
There is no spoon. Neo from the Matrix 1999.
runlevel이나 who -r
runlevel이나 who -r 같은걸 원하시는건가요?
[darchon@linux ~]$ runlevel N 3 [darchon@linux ~]$ who -r run-level 3 2008-03-17 13:12 last=S [darchon@linux ~]$http://star4u.org
http://mirror.star4u.org