]> git.proxmox.com Git - mirror_lxc.git/commitdiff
kill -s expects the signal name without SIG
authorStéphane Graber <stgraber@ubuntu.com>
Wed, 2 Jan 2013 18:47:18 +0000 (13:47 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 2 Jan 2013 18:47:18 +0000 (13:47 -0500)
The previous lxc-shutdown change replaced 'kill SIG<name>' by
'kill -s SIG<name>'. Although this works with busybox where it was tested,
this doesn't actually work with all kill implementations. Some requiring just
the signal name without the prefix.

This changes "-s SIG<name>" by just "-s <name>". Tested with busybox and
standard kill.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxc-shutdown.in

index ad8395be76cc1b024d4c9eb8f50fb48190d936cb..edf735e54647dc0252a39b95f8d067c541657624 100644 (file)
@@ -118,10 +118,10 @@ if [ "$pid" = "-1" ]; then
 fi
 
 if [ $reboot -eq 1 ]; then
-    kill -s SIGINT $pid
+    kill -s INT $pid
     exit 0
 else
-    kill -s SIGPWR $pid
+    kill -s PWR $pid
 fi
 
 if [ $dowait -eq 0 ]; then