From db821c3a4168c9c1072a433340e6009892e26cf2 Mon Sep 17 00:00:00 2001 From: KATOH Yasufumi Date: Wed, 25 Dec 2013 13:45:24 +0900 Subject: [PATCH] plamo: Improve template for lxc-stop MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- templates/lxc-plamo.in | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.47.2