set MAKETHREADS from the number of cores counted
[busybox-power] / debian / busybox-power.prerm
index 1be3836..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" /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
+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