From: KATOH Yasufumi Date: Wed, 25 Dec 2013 04:45:24 +0000 (+0900) Subject: plamo: Improve template for lxc-stop X-Git-Tag: lxc-1.0.0.beta2~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db821c3a4168c9c1072a433340e6009892e26cf2;p=thirdparty%2Flxc.git plamo: Improve template for lxc-stop 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 Acked-by: Stéphane Graber --- diff --git a/templates/lxc-plamo.in b/templates/lxc-plamo.in index b133da306..485f36304 100644 --- a/templates/lxc-plamo.in +++ b/templates/lxc-plamo.in @@ -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