X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=debian%2Fbusybox-power.postinst;h=74c57df274fbbbc2cdc7e5c4c43e7aab313f3d1c;hb=690358d482b5a1a564b8e4fb5b11827f0ca70d8d;hp=2e6b89bf16dbdb41ecfc656d6e4cc640ccf085b0;hpb=4150a6354c5946581f5fd87b7ec0a8932897a252;p=busybox-power diff --git a/debian/busybox-power.postinst b/debian/busybox-power.postinst index 2e6b89b..74c57df 100644 --- a/debian/busybox-power.postinst +++ b/debian/busybox-power.postinst @@ -4,7 +4,17 @@ 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 +line="trap exit SIGHUP #by busybox-power" +if ! grep -F -q "$line" /etc/profile; then + echo "$line" >> /etc/profile +fi + +# Clean up conffile (from busybox-power 1.19.3power4 & 1.19.3power5) +if test -e /etc/environment; then + ORIGCONFIG_MD5="d23caa13476e0d872d23e7290b52f544" + INSTCONFIG_MD5=`md5sum /etc/environment | awk '{ print $1 }'` + if test "$INSTCONFIG_MD5" == "$ORIGCONFIG_MD5"; then + rm /etc/environment + fi fi