use Diablo's CSSU version of the workaround for bug 5317
authorDennis Groenen <tj.groenen@gmail.com>
Thu, 21 Jul 2011 15:20:30 +0000 (17:20 +0200)
committerDennis Groenen <tj.groenen@gmail.com>
Thu, 21 Jul 2011 15:20:30 +0000 (17:20 +0200)
debian/busybox-power.postinst
debian/busybox-power.prerm

index 1a16365..0c89665 100644 (file)
@@ -4,7 +4,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" /etc/profile; then
-  echo "trap exit SIGHUP SIGINT SIGTERM #by busybox-power" >> /etc/profile
+line="trap exit SIGHUP #by busybox-power"
+if ! grep -F -q "$line" /etc/profile; then
+  echo "$line" >> /etc/profile
 fi
 
index 713c53b..74a9f95 100644 (file)
@@ -3,8 +3,9 @@ set -e
 
 sh /opt/busybox-power/uninstall-binary.sh
 
-if grep -q "trap exit SIGHUP SIGINT SIGTERM #by busybox-power" /etc/profile; then
-  sed '/trap exit SIGHUP SIGINT SIGTERM #by busybox-power/d' /etc/profile > /tmp/profile.sed
+line="trap exit SIGHUP #by busybox-power"
+if grep -F -q "$line" /etc/profile; then
+  sed "/$line/d" /etc/profile > /tmp/profile.sed
   mv /tmp/profile.sed /etc/profile
 fi