/srv/irclogs.ubuntu.com/2008/03/26/#upstart.txt

keesjhi08:56
keesjhow is halt/shutown to be implemented?09:36
brendan_keesj: here's what i do on rc0/shutdown:14:44
brendan_# rc0 - runlevel 0 compatibility14:44
brendan_#14:44
brendan_# This task runs the old sysv-rc runlevel 0 ("halt/poweroff") scripts with14:44
brendan_# the decision as to whether to halt or power off the system left up to the14:44
brendan_# script (and thus /etc/default/poweroff).14:44
brendan_start on runlevel 014:44
brendan_console output14:44
brendan_script14:44
brendan_  echo "Sending all processes the TERM signal"14:44
brendan_  killall5 -1514:44
brendan_  sleep 514:44
brendan_  echo "Sending all processes the KILL signal"14:44
brendan_  killall5 -914:44
brendan_  sleep 114:44
brendan_  /sbin/halt -f -p14:44
brendan_end script14:44
brendan_you might want a little more in there than that, of course14:45
AlexExtremeif you have that in a script called 'shutdown', you can make other scripts stop before that ones gets to run by putting 'stop on starting shutdown' in them14:55
jdongkeesj: shutdown has to be implemented by you15:09
jdongin short15:09
jdongI do similar to brendan_, hook the sysv shutdown/reboot handlers into shutdown or reboot jobs.15:10
mdalesI'm doing some tests, and just wanted this confirmed if possible - when a job with respawn fails and is restarted, there's no stopped failed signal emitted is there?17:19
mdalesit's only when it's failed a number of times and upstart gives up that the stopped failed is emitted?17:20
keesjjdong: thank , I was afraid of that 19:23
keesjI don't have sysv installed at al , no shutdown etc :p19:26
keesjand the shutdown/halt are booth provided by the upstart sysv compatibility layer19:28
brendan_mdales: i believe so. you could put a sleep in your event script then watch initctl status to see the event status as it's respawning19:45
brendan_keesj: you could just have shutdown and reboot as shell scripts that would call "initctl start shutdown" "initctl start restart" and just write event scripts for those19:47
keesjbut what command would perform the "real" shudown/reboot19:51
keesjI guess I really need to understand how that works. thanks for the help19:52
brendan_oh right, you'd be missing halt20:05
brendan_duh20:05
brendan_doing too many things at once, sorry :)20:06
=== cdahlin is now known as sadmac2
keesj:p20:43
=== keesj is now known as k-way

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!