summaryrefslogtreecommitdiffstats
path: root/busybox.pkg
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-06-25 13:30:17 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-06-25 13:30:17 (EDT)
commitcd2f172b691a5889a84b65fab8b202c308e1168b (patch)
treebab00a16f09a7d2f38beafa119cafc7a89482f0f /busybox.pkg
parentbe963ce882813d6931214a66f2fbe28cccf9d495 (diff)
Allow services to be disabled by default.
Disable telnetd.
Diffstat (limited to 'busybox.pkg')
-rwxr-xr-xbusybox.pkg/postinst11
-rwxr-xr-xbusybox.pkg/prerm4
2 files changed, 8 insertions, 7 deletions
diff --git a/busybox.pkg/postinst b/busybox.pkg/postinst
index c003561..9f23a39 100755
--- a/busybox.pkg/postinst
+++ b/busybox.pkg/postinst
@@ -13,11 +13,12 @@ if [ "x${1}" = 'xconfigure' ]; then
fi
fi
if [ -f /usr/share/busybox/init-scripts ]; then
- for script in $(cat /usr/share/busybox/init-scripts); do
- if [ "x${2:+set}" != 'xset' ]; then
- "/etc/init.d/${script}" enable
+ while read -r script enabled; do
+ if [ "x${enabled}" = 'xenabled' ]; then
+ [ "x${2:+set}" != 'xset' ] && \
+ "/etc/init.d/${script}" enable
+ "/etc/init.d/${script}" start
fi
- "/etc/init.d/${script}" start
- done
+ done </usr/share/busybox/init-scripts
fi
fi
diff --git a/busybox.pkg/prerm b/busybox.pkg/prerm
index 96a3db6..30ebdab 100755
--- a/busybox.pkg/prerm
+++ b/busybox.pkg/prerm
@@ -2,9 +2,9 @@
if [ "x${1}" = 'xupgrade' ]; then
if [ -f /usr/share/busybox/init-scripts ]; then
- for script in $(cat /usr/share/busybox/init-scripts); do
+ while read -r script enabled; do
"/etc/init.d/${script}" stop
- done
+ done </usr/share/busybox/init-scripts
fi
while read link name prio; do
update-alternatives --remove "${name}" "${link}.busybox"