Skip to content

Commit

Permalink
plamo: Improve template for lxc-stop
Browse files Browse the repository at this point in the history
patch /etc/inittab in plamo container to shutdown when it receives SIGPWR.
(By default, plamo shutdowns to single user mode after 5minutes)

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
  • Loading branch information
tenforward authored and stgraber committed Dec 25, 2013
1 parent 1c1c60e commit db821c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions templates/lxc-plamo.in
Expand Up @@ -178,6 +178,12 @@ configure_plamo() {
EOF
# /etc/inittab
cat <<- "EOF" | patch $rootfs/etc/inittab
32,33c32,33
< # What to do when power fails (shutdown to single user).
< pf::powerfail:/sbin/shutdown -f +5 "THE POWER IS FAILING"
---
> # What to do when power fails (shutdown).
> pf::powerfail:/sbin/shutdown -h +0 "THE POWER IS FAILING"
47a48
> 1:1235:respawn:/sbin/agetty 38400 console
52,53d52
Expand Down

0 comments on commit db821c3

Please sign in to comment.