From 9ec756f606bf77043d1cecf3333a666e56cd80ca Mon Sep 17 00:00:00 2001 From: Dennis Groenen Date: Thu, 21 Jul 2011 17:20:30 +0200 Subject: [PATCH] use Diablo's CSSU version of the workaround for bug 5317 --- debian/busybox-power.postinst | 5 +++-- debian/busybox-power.prerm | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/busybox-power.postinst b/debian/busybox-power.postinst index 1a16365..0c89665 100644 --- a/debian/busybox-power.postinst +++ b/debian/busybox-power.postinst @@ -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 diff --git a/debian/busybox-power.prerm b/debian/busybox-power.prerm index 713c53b..74a9f95 100644 --- a/debian/busybox-power.prerm +++ b/debian/busybox-power.prerm @@ -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 -- 1.7.9.5