From 9de16d22b0ac3cbb74793faa913db889d8151ee5 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 04 Jun 2014 23:08:41 -0400 Subject: Merge branch 'feature/init-system-improvements'. --- (limited to 'busybox.pkg/prerm') 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