#!/bin/sh if [ ! -d etc/rcS.d ] && [ ! -d etc/rcL.d ]; then exit 0 fi for i in etc/rc[SL].d/*; do [ -L "$i" ] || continue svc=${i##*/S[0-9][0-9]} # some services are renamed case "$svc" in modutils) svc=modules;; procps) svc=sysctl;; bootmisc.sh) svc=bootmisc;; keymap) svc=keymaps;; esac # add the service to correct "runlevel" case "$svc" in hwclock|modules|sysctl|hostname|keymaps|syslog|bootmisc) rc-update add $svc boot;; *) rc-update add $svc default;; esac rm $i done