workaround for bug 5317 - "Busybox doesn't handle SIGHUP properly"
authorDennis Groenen <dennis_groenen@hotmail.com>
Thu, 7 Jul 2011 14:14:53 +0000 (16:14 +0200)
committerDennis Groenen <dennis_groenen@hotmail.com>
Thu, 7 Jul 2011 14:14:53 +0000 (16:14 +0200)
debian/busybox-power.postinst
debian/busybox-power.prerm

index b90ab79..2e6b89b 100644 (file)
@@ -3,3 +3,8 @@ set -e
 
 /opt/busybox-power/busybox.power sh /opt/busybox-power/install-binary.sh
 
+# Workaround for bug 5317
+if ! grep -q "trap exit SIGHUP SIGINT SIGTERM" /home/user/.profile; then
+  echo "trap exit SIGHUP SIGINT SIGTERM #by busybox-power" >> /home/user/.profile
+fi
+
index 3875fd2..1be3836 100644 (file)
@@ -3,3 +3,8 @@ set -e
 
 sh /opt/busybox-power/uninstall-binary.sh
 
+if grep -q "trap exit SIGHUP SIGINT SIGTERM #by busybox-power" /home/user/.profile; then
+  sed '/trap exit SIGHUP SIGINT SIGTERM #by busybox-power/d' /home/user/.profile > /tmp/.profile.sed
+  mv /tmp/.profile.sed /home/user/.profile
+fi
+