#!/bin/sh
if test $(id -u) != 0; then
 echo Error: You must be root to run this script!
 exit 1
fi
for service in bootmisc.sh checkfs.sh checkroot.sh \
               console-screen.sh devpts.sh dns-clean \
	       hostname.sh hwclock.sh ifupdown \
	       initrd-tools.sh isapnp keymap.sh \
	       module-init-tools modutils mountall.sh \
	       mountnfs.sh networking portmap \
	       procps.sh setserial urandom \
	       halt reboot sendsigs umountfs \
	       hotplug mountvirtfs mountkernfs
do
update-rc.d -f $service remove
done
update-rc.d bootmisc.sh start 55 S .
update-rc.d checkfs.sh start 30 S .
update-rc.d checkroot.sh start 10 S .
update-rc.d console-screen.sh start 48 S .
if [ -x /etc/init.d/mountvirtfs ]; then
update-rc.d mountvirtfs start 35 S .
elif [ -x /etc/init.d/mountkernfs ]; then
update-rc.d mountkernfs start 35 S .
else
update-rc.d devpts.sh start 35 S .
fi
update-rc.d dns-clean start 39 S .
update-rc.d hostname.sh start 40 S .
update-rc.d hwclock.sh start 50 S . stop 25 0 6 .
update-rc.d ifupdown start 40 S .
update-rc.d initrd-tools.sh start 05 S .
update-rc.d isapnp start 15 S .
update-rc.d keymap.sh start 05 S .
update-rc.d module-init-tools start 36 S .
update-rc.d modutils start 36 S .
update-rc.d mountall.sh start 35 S .
update-rc.d mountnfs.sh start 45 S .
update-rc.d networking start 40 S . stop 35 0 6 .
#update-rc.d portmap start 41 S . stop 10 0 6 .
update-rc.d procps.sh start 30 S . 
update-rc.d setserial start 30 S . stop 30 0 6 .
update-rc.d urandom start 55 S . stop 30 0 6 .
update-rc.d halt start 90 0 .
update-rc.d reboot start 90 6 .
update-rc.d sendsigs start 20 0 6 .
update-rc.d umountfs start 40 0 6 .
update-rc.d hotplug start 11 1 2 3 4 5 . start 37 S . stop 89 0 6 .
