Power cuts are becoming a way of life for many people and here in Blarney we get our fair share of them unfortunately. The second in as many weeks happened this morning and before I could rig up a network cable between my laptop and desktop the UPS powered down and my big noisy desktop died with it. Thankfully without filesystem corruption.
Normally when you press the magic combo of ctrl-alt-delete the machine reboots but in this case it would be much better if the machine did a shutdown. In previous versions of Linux I had to edit /etc/inittab to get the desired effect but that file doesn’t exist in Ubuntu Edgy. Instead you must look at /etc/event.d/control-alt-delete. That file is fairly self explanatory which is all well and good because there’s very little information if you don’t know what to look for.
According to a post here, “Ubuntu replaced init with upstart event daemon”. It’s simple to change it to shutodown. Replace “-r” with “-h” in the following line:
exec /sbin/shutdown/ -r now "Control-Alt-Delete pressed"
No need to run inittab, just hit the magic combo to halt the computer!
PS. thanks so much for all the comments yesterday and the day before. I was bowled over by the response to both posts, especially the Daffodil Day one which struck a chord with many people
You might also like
- Linux Ubuntu Dapper to Edgy – no problem
I upgraded my Ubuntu 6.06 install to the new Edgy- InnoDB: Starting shutdown…
Calling all MySQL admins! When you're working with InnoDB tables- Reasons to upgrade your Ubuntu
ubuntu.com is down unfortunately. The release of Ubuntu 9.10, Karmic
If you like this post then please subscribe to my full RSS feed. You can also click here to subscribe by email. There are also my fabulous photos and funny videos to explore too!
Donncha. I love the daf but can you not bring the robin back in there somehow? It’s almost as if you had more important things to think about than fans of your previous header!
Ah! The three finger salute. It was a laughable way of shutting down your Linux box in the last 5 years or so but is becoming more and more of a mainstream thing with Linux fans using Ubuntu, Knoppix etc.
I missed my Linux OS. Had uninstalled it when my pc crashed. Never did re-install it anymore since then.
[...] weekend go? Last weekend was "getting the baby stuff together" weekend, but it was also buy another UPS time too as Blarney was hit by another couple of power cuts. It was also Ken’s stag and I was [...]