summaryrefslogtreecommitdiffstats
path: root/busybox.pkg/prerm
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-06-04 23:08:41 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-06-04 23:08:41 (EDT)
commit9de16d22b0ac3cbb74793faa913db889d8151ee5 (patch)
tree0f6ed6fe2701368c036c0da9e72be362963d68b6 /busybox.pkg/prerm
parent79d474a5fdc0ea8b9e05f5b68567dbbe9086e4ca (diff)
parentb98d2d2ad1e341a6493fcd5531d605e8427665ca (diff)
Merge branch 'feature/init-system-improvements'.
Diffstat (limited to 'busybox.pkg/prerm')
-rwxr-xr-xbusybox.pkg/prerm7
1 files changed, 6 insertions, 1 deletions
diff --git a/busybox.pkg/prerm b/busybox.pkg/prerm
index 54b5053..160a2d7 100755
--- a/busybox.pkg/prerm
+++ b/busybox.pkg/prerm
@@ -1,6 +1,11 @@
#!/bin/sh
-if [ "x${1}" = 'xremove' ]; then
+if [ "x${1}" = 'xupgrade' ]; then
+ if [ -f /usr/share/busybox/init-scripts ]; then
+ for script in $(cat /usr/share/busybox/init-scripts); do
+ "/etc/init.d/${script}" stop
+ done
+ fi
while read link name prio; do
update-alternatives --remove "${name}" "${link}.busybox"
done </usr/share/busybox/alternatives