#!/bin/bash

basedir=$(dirname $0)
. $basedir/../tests/suite

if head -1 debian/changelog | grep -q UNRELEASED ; then
    # fatal
    severity=check
else
    # non-fatal
    severity=test
fi

set +C
cat <<'EOF' > $insconf
$local_fs	+mountall +mountall-bootclean +mountoverflowtmp +umountfs
$network	+networking +ifupdown
$named		+named +dnsmasq +lwresd +bind9 +unbound $network
$remote_fs	$local_fs +mountnfs +mountnfs-bootclean +umountnfs +sendsigs
$syslog		+rsyslog +sysklogd +syslog-ng +dsyslog +inetutils-syslogd
$time		+hwclock
<interactive>	glibc udev console-screen keymap keyboard-setup console-setup cryptdisks cryptdisks-early checkfs-loop
EOF
set -C

addscript acpi-fakekey <<'EOF'
### BEGIN INIT INFO
# Provides:          acpi-fakekey
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      
# Short-Description: Start acpi_fakekey daemon
### END INIT INFO
EOF

addscript acpi-support <<'EOF'
### BEGIN INIT INFO
# Provides:          acpi-support
# Required-Start:    $local_fs $remote_fs $syslog
# Required-Stop:     $local_fs $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      1
# Short-Description: Start some power management scripts
### END INIT INFO
EOF

addscript acpid <<'EOF'
### BEGIN INIT INFO
# Provides:          acpid
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# X-Start-Before:    kdm gdm3 xdm lightdm
# X-Stop-After:      kdm gdm3 xdm lightdm
# Default-Start:     2 3 4 5
# Default-Stop:      
# Short-Description: Start the Advanced Configuration and Power Interface daemon
# Description:       Provide a socket for X11, hald and others to multiplex
#                    kernel ACPI events.
### END INIT INFO
EOF

addscript alsa-utils <<'EOF'
### BEGIN INIT INFO
# Provides:          alsa-utils
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $remote_fs
# Default-Start:     S
# Default-Stop:      0 1 6
# Short-Description: Restore and store ALSA driver settings
# Description:       This script stores and restores mixer levels on
#                    shutdown and bootup.On sysv-rc systems: to
#                    disable storing of mixer levels on shutdown,
#                    remove /etc/rc[06].d/K50alsa-utils.  To disable
#                    restoring of mixer levels on bootup, rename the
#                    "S50alsa-utils" symbolic link in /etc/rcS.d/ to
#                    "K50alsa-utils".
### END INIT INFO
EOF

addscript anacron <<'EOF'
### BEGIN INIT INFO
# Provides:          anacron
# Required-Start:    $remote_fs $syslog $time
# Required-Stop:     $remote_fs $syslog $time
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Run anacron jobs
# Description: The first purpose of this script is to run anacron at
#              boot so that it can catch up with missed jobs.  Note
#              that anacron is not a daemon.  It is run here just once
#              and is later started by the real cron.  The second
#              purpose of this script is that said cron job invokes
#              this script to start anacron at those subsequent times,
#              to keep the logic in one place.
### END INIT INFO
EOF

addscript apache2 <<'EOF'
### BEGIN INIT INFO
# Provides:          apache2
# Required-Start:    $local_fs $remote_fs $network $syslog $named
# Required-Stop:     $local_fs $remote_fs $network $syslog $named
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# X-Interactive:     true
# Short-Description: Start/stop apache2 web server
# Description:       Start the web server and associated helpers
#  This script will start apache2, and possibly all associated instances.
#  Moreover, it will set-up temporary directories and helper tools such as
#  htcacheclean when required by the configuration.
### END INIT INFO
EOF

addscript atd <<'EOF'
### BEGIN INIT INFO
# Provides:          atd
# Required-Start:    $syslog $time $remote_fs
# Required-Stop:     $syslog $time $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Deferred execution scheduler
# Description:       Debian init script for the atd deferred executions
#                    scheduler
### END INIT INFO
EOF

addscript aumix <<'EOF'
### BEGIN INIT INFO
# Provides:          aumix
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Should-Start:      udev
# Should-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Restore mixer settings from saved values.
### END INIT INFO
EOF

addscript autofs <<'EOF'
### BEGIN INIT INFO
# Provides: autofs
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Should-Start: ypbind nslcd slapd
# Should-Stop: ypbind nslcd slapd
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Automounts filesystems on demand
# Description: Automounts filesystems on demand
### END INIT INFO
EOF

addscript avahi-daemon <<'EOF'
### BEGIN INIT INFO
# Provides:          avahi avahi-daemon
# Required-Start:    $remote_fs dbus
# Required-Stop:     $remote_fs dbus
# Should-Start:	     $syslog
# Should-Stop:       $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Avahi mDNS/DNS-SD Daemon
# Description:       Zeroconf daemon for configuring your network 
#                    automatically
### END INIT INFO
EOF

addscript binfmt-support <<'EOF'
### BEGIN INIT INFO
# Provides:          binfmt-support
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Support for extra binary formats
# Description:       Enable support for extra binary formats using the Linux
#                    kernel's binfmt_misc facility.
### END INIT INFO
EOF

addscript bluetooth <<'EOF'
### BEGIN INIT INFO
# Provides: bluetooth
# Required-Start:    $local_fs $syslog $remote_fs dbus
# Required-Stop:     $local_fs $syslog $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start bluetooth daemons
### END INIT INFO
EOF

addscript bootlogd.dpkg-bak <<'EOF'
### BEGIN INIT INFO
# Provides:          bootlogd
# Required-Start:    mountdevsubfs
# X-Start-Before:    hostname keymap keyboard-setup procps pcmcia hwclock hwclockfirst hdparm hibernate-cleanup lvm2
# Required-Stop:
# Default-Start:     S
# Default-Stop:
# Short-Description: Start or stop bootlogd.
# Description:       Starts or stops the bootlogd log program
#                    which logs boot messages.
### END INIT INFO
EOF

addscript bootlogs <<'EOF'
### BEGIN INIT INFO
# Provides:          bootlogs
# Required-Start:    hostname $local_fs
# Required-Stop:
# Should-Start:      $x-display-manager gdm kdm xdm ldm sdm wdm nodm
# Default-Start:     1 2 3 4 5
# Default-Stop:
# Short-Description: Log file handling to be done during bootup.
# Description:       Various things that don't need to be done particularly
#                    early in the boot, just before getty is run.
### END INIT INFO
EOF

addscript bootmisc.sh <<'EOF'
### BEGIN INIT INFO
# Provides:          bootmisc
# Required-Start:    $remote_fs
# Required-Stop:
# Should-Start:      udev
# Default-Start:     S
# Default-Stop:
# Short-Description: Miscellaneous things to be done during bootup.
# Description:       Some cleanup.  Note, it need to run after mountnfs-bootclean.sh.
### END INIT INFO
EOF

addscript buildd <<'EOF'
### BEGIN INIT INFO
# Provides:          buildd
# Required-Start:    $local_fs $network $remote_fs
# Required-Stop:
# Should-Start:      schroot
# Should-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Debian package autobuilder daemon
# Description:       Control the buildd daemon.
### END INIT INFO
EOF

addscript buildd.dpkg-dist <<'EOF'
### BEGIN INIT INFO
# Provides:          buildd
# Required-Start:    $local_fs $network $remote_fs
# Required-Stop:     $local_fs $network $remote_fs
# Should-Start:      schroot
# Should-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Debian package autobuilder daemon
# Description:       Control the buildd daemon.
### END INIT INFO
EOF

addscript checkfs.sh <<'EOF'
### BEGIN INIT INFO
# Provides:          checkfs
# Required-Start:    checkroot
# Required-Stop:
# Should-Start:
# Default-Start:     S
# Default-Stop:
# X-Interactive:     true
# Short-Description: Check all filesystems.
### END INIT INFO
EOF

addscript checkfs.sh.dpkg-old <<'EOF'
### BEGIN INIT INFO
# Provides:          checkfs
# Required-Start:    checkroot
# Required-Stop:
# Should-Start:      mtab
# Default-Start:     S
# Default-Stop:
# X-Interactive:     true
# Short-Description: Check all filesystems.
### END INIT INFO
EOF

addscript checkroot-bootclean.sh <<'EOF'
### BEGIN INIT INFO
# Provides:          checkroot-bootclean
# Required-Start:    checkroot
# Required-Stop:
# Default-Start:     S
# Default-Stop:
# X-Start-Before:    bootmisc
# Short-Description: bootclean after checkroot.
# Description:       Clean temporary filesystems after
#                    the root filesystem has been mounted.
#                    At this point, directories which may be
#                    masked by future mounts may be cleaned.
### END INIT INFO
EOF

addscript checkroot.sh <<'EOF'
### BEGIN INIT INFO
# Provides:          checkroot mtab
# Required-Start:    mountdevsubfs hostname
# Required-Stop:     
# Should-Start:      keymap hwclockfirst hdparm bootlogd
# Should-stop:
# Default-Start:     S
# Default-Stop:
# X-Interactive:     true
# Short-Description: Check to root file system.
### END INIT INFO
EOF

addscript checkroot.sh.dpkg-old <<'EOF'
### BEGIN INIT INFO
# Provides:          checkroot
# Required-Start:    mountdevsubfs hostname
# Required-Stop:     
# Should-Start:      keymap hwclockfirst hdparm bootlogd
# Should-stop:
# Default-Start:     S
# Default-Stop:
# X-Interactive:     true
# Short-Description: Check to root file system.
### END INIT INFO
EOF

addscript console-setup <<'EOF'
### BEGIN INIT INFO
# Provides:          console-setup
# Required-Start:    $remote_fs
# Required-Stop:
# Should-Start:      console-screen kbd
# Default-Start:     S
# Default-Stop:
# X-Interactive:     true
# Short-Description: Set console font and keymap
### END INIT INFO
EOF

addscript cpufrequtils <<'EOF'
### BEGIN INIT INFO
# Provides:       cpufrequtils
# Required-Start: $remote_fs loadcpufreq
# Required-Stop:
# Default-Start:  2 3 4 5
# Default-Stop:
# Short-Description: set CPUFreq kernel parameters
# Description: utilities to deal with CPUFreq Linux 
#	kernel support
### END INIT INFO
EOF

addscript cron <<'EOF'
### BEGIN INIT INFO
# Provides:          cron
# Required-Start:    $remote_fs $syslog $time
# Required-Stop:     $remote_fs $syslog $time
# Should-Start:      $network $named slapd autofs ypbind nscd nslcd
# Should-Stop:       $network $named slapd autofs ypbind nscd nslcd
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Regular background program processing daemon
# Description:       cron is a standard UNIX program that runs user-specified 
#                    programs at periodic scheduled times. vixie cron adds a 
#                    number of features to the basic UNIX cron, including better
#                    security and more powerful configuration options.
### END INIT INFO
EOF

addscript cups <<'EOF'
### BEGIN INIT INFO
# Provides:          cups
# Required-Start:    $syslog $remote_fs
# Required-Stop:     $syslog $remote_fs
# Should-Start:      $network avahi-daemon slapd nslcd
# Should-Stop:       $network
# X-Start-Before:    samba
# X-Stop-After:      samba
# Default-Start:     2 3 4 5
# Default-Stop:      1
# Short-Description: CUPS Printing spooler and server
# Description:       Manage the CUPS Printing spooler and server;
#                    make it's web interface accessible on http://localhost:631/
### END INIT INFO
EOF

addscript cups-browsed <<'EOF'
### BEGIN INIT INFO
# Provides:          cups-browsed
# Required-Start:    $syslog $remote_fs $network $named $time avahi-daemon
# Required-Stop:     $syslog $remote_fs $network $named $time avahi-daemon
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: cups-browsed - Make remote CUPS printers available locally
# Description: This daemon browses Bonjour broadcasts of shared remote CUPS
#              printers and makes these printers available locally by creating
#              local CUPS queues pointing to the remote queues. This replaces
#              the CUPS browsing which was dropped in CUPS 1.6.1. For the end
#              the behavior is the same as with the old CUPS broadcasting/
#              browsing, but in the background the standard method for network
#              service announcement and discovery, Bonjour, is used.
### END INIT INFO
EOF

addscript dbus <<'EOF'
### BEGIN INIT INFO
# Provides:          dbus
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: D-Bus systemwide message bus
# Description:       D-Bus is a simple interprocess messaging system, used
#                    for sending messages between applications.
### END INIT INFO
EOF

addscript dictd <<'EOF'
### BEGIN INIT INFO
# Provides:          dictd
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      1
# Short-Description: Start and stop dictionary server daemon
# Description:       dictd is a TCP-based server that allows a client to
#                    access dictionary definitions from a set of natural
#                    language dictionary databases.
### END INIT INFO
EOF

addscript dirmngr <<'EOF'
### BEGIN INIT INFO
# Provides:          dirmngr
# Required-Start:    $local_fs $network $remote_fs
# Required-Stop:     $local_fs $network $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: start DirMngr daemon
# Description: DirMngr is a server for managing and downloading certificate
#              revocation lists.
### END INIT INFO
EOF

addscript etc-setserial <<'EOF'
### BEGIN INIT INFO
# Provides:             etc-setserial
# Required-Start:       checkfs
# Required-Stop:        $remote_fs
# Default-Start:        S
# Default-Stop:         0 1 6
# Short-Description:    controls configuration of serial ports
# Description:          Set and/or report the configuration information
#                       associated with a serial port. This information
#                       includes what I/O port and which IRQ a particular
#                       serial port is using.
### END INIT INFO
EOF

addscript fglrx-atieventsd <<'EOF'
### BEGIN INIT INFO
# Provides:		fglrx-atieventsd
# Required-Start:	$syslog $remote_fs
# Required-Stop:	$syslog $remote_fs
# X-Start-Before:   $x-display-manager
# Should-Start:		$local_fs
# Should-Stop:		$local_fs
# Default-Start:	2 3 4 5
# Default-Stop:		0 1 6
# Short-Description:	control ATI external events daemon
# Description:		Starts or stops the ATI external events daemon,
#			which handles power management for fglrx-driver.
### END INIT INFO
EOF

addscript gdomap <<'EOF'
### BEGIN INIT INFO
# Provides:          gdomap
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start the GNUstep distributed object mapper
### END INIT INFO
EOF

addscript gpm <<'EOF'
### BEGIN INIT INFO
# Provides:          gpm
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Should-Start:
# Should-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: gpm sysv init script
# Description:       general purpose mouse event server
### END INIT INFO
EOF

addscript halt <<'EOF'
### BEGIN INIT INFO
# Provides:          halt
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop:      0
# Short-Description: Execute the halt command.
# Description:
### END INIT INFO
EOF

addscript hddtemp <<'EOF'
### BEGIN INIT INFO
# Provides:          hddtemp
# Required-Start:    $remote_fs $syslog $network
# Required-Stop:     $remote_fs $syslog $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: disk temperature monitoring daemon
# Description:       hddtemp is a disk temperature monitoring daemon
### END INIT INFO
EOF

addscript hdparm <<'EOF'
### BEGIN INIT INFO
# Provides:          hdparm
# Required-Start:    mountdevsubfs
# Required-Stop:
# Should-Start:      udev
# Default-Start:     S
# Default-Stop:
# Short-Description: Tune IDE hard disks
### END INIT INFO
EOF

addscript hostname.sh <<'EOF'
### BEGIN INIT INFO
# Provides:          hostname
# Required-Start:
# Required-Stop:
# Should-Start:      glibc
# Default-Start:     S
# Default-Stop:
# Short-Description: Set hostname based on /etc/hostname
# Description:       Read the machines hostname from /etc/hostname, and
#                    update the kernel value with this value.  If
#                    /etc/hostname is empty, the current kernel value
#                    for hostname is used.  If the kernel value is
#                    empty, the value 'localhost' is used.
### END INIT INFO
EOF

addscript hwclock.sh <<'EOF'
### BEGIN INIT INFO
# Provides:          hwclock
# Required-Start:    mountdevsubfs
# Required-Stop:     $local_fs
# Default-Start:     S
# X-Start-Before:    checkroot
# Default-Stop:      0 6
### END INIT INFO
EOF

addscript ifplugd <<'EOF'
### BEGIN INIT INFO
# Provides:          ifplugd
# Required-Start:    $network $remote_fs
# Required-Stop:     $network $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Brings up/down network automatically
# Description:       Brings networks interfaces up and down automatically when
#                    the cable is removed / inserted
### END INIT INFO
EOF

addscript kbd <<'EOF'
### BEGIN INIT INFO
# Provides:          kbd
# Required-Start:    $remote_fs
# Required-Stop:
# Default-Start:     S
# Default-Stop:
# X-Interactive:     true
# Description: Set console screen modes and fonts
# Short-Description:    Prepare console
### END INIT INFO
EOF

addscript kdm <<'EOF'
### BEGIN INIT INFO
# Provides:          kdm
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Should-Start:      console-screen kbd acpid dbus krb5-kdc
# Should-Stop:       console-screen kbd
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: X display manager for KDE
# Description:       KDM manages a collection of X servers, which may be on the local host or remote machines.
### END INIT INFO
EOF

addscript kerneloops <<'EOF'
### BEGIN INIT INFO
# Provides:          kerneloops
# Required-Start:    $remote_fs $named $network $time $syslog
# Required-Stop:     $remote_fs $named $network $time $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Tool to automatically collect and submit kernel crash signatures
# Description:       A tool that collects and submits kernel crash
#                    signatures to the kerneloops.org website for use by the Linux
#                    kernel developers.
### END INIT INFO
EOF

addscript keyboard-setup <<'EOF'
### BEGIN INIT INFO
# Provides:          keyboard-setup
# Required-Start:    mountkernfs
# Required-Stop:
# Should-Start:      keymap udev
# X-Start-Before:    checkroot
# Default-Start:     S
# Default-Stop:
# X-Interactive:     true
# Short-Description: Set preliminary keymap
# Description:       Set the console keyboard as early as possible
#                    so during the file systems checks the administrator
#                    can interact.  At this stage of the boot process
#                    only the ASCII symbols are supported.
### END INIT INFO
EOF

addscript keymap.sh <<'EOF'
### BEGIN INIT INFO
# Provides:             keymap
# Required-Start:       mountdevsubfs
# Required-Stop:        
# Default-Start:        S
# Default-Stop:
# X-Interactive:	true
# Short-Description: 	Set keymap
# Description:		Set the Console keymap
### END INIT INFO
EOF

addscript killprocs <<'EOF'
### BEGIN INIT INFO
# Provides:          killprocs
# Required-Start:    $local_fs
# Required-Stop:
# Default-Start:     1
# Default-Stop:
# Short-Description: executed by init(8) upon entering runlevel 1 (single).
### END INIT INFO
EOF

addscript kmod <<'EOF'
### BEGIN INIT INFO
# Provides:          kmod
# Required-Start:    
# Required-Stop:     
# Should-Start:      checkroot
# Should-Stop:
# Default-Start:     S
# Default-Stop:
# Short-Description: Load the modules listed in /etc/modules.
# Description:       Load the modules listed in /etc/modules.
### END INIT INFO
EOF

addscript lightdm <<'EOF'
### BEGIN INIT INFO
# Provides:          lightdm
# Should-Start:      console-screen kbd acpid dbus hal consolekit
# Required-Start:    $local_fs $remote_fs x11-common
# Required-Stop:     $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Light Display Manager
# Description:       Debian init script for the Light Display Manager
### END INIT INFO
EOF

addscript lirc <<'EOF'
### BEGIN INIT INFO
# Provides:          lirc
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Starts LIRC daemon.
# Description:       LIRC is used to control different
#                    infrared receivers and transceivers.
### END INIT INFO
EOF

addscript lm-sensors <<'EOF'
### BEGIN INIT INFO
# Provides:          lm-sensors
# Required-Start:    $remote_fs
# Required-Stop:
# Default-Start:     S
# Default-Stop:
# Short-Description: lm-sensors
# Description:       hardware health monitoring
### END INIT INFO
EOF

addscript loadcpufreq <<'EOF'
### BEGIN INIT INFO
# Provides:          loadcpufreq
# Required-Start:    $remote_fs $syslog
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Load kernel modules needed to enable cpufreq scaling
# Description:       Make it possible to save power by reducing
#                    the CPU speed when there is little to do.
### END INIT INFO
EOF

addscript lvm2 <<'EOF'
### BEGIN INIT INFO
# Provides:          lvm2 lvm
# Required-Start:    mountdevsubfs
# Required-Stop:
# Should-Start:      udev mdadm-raid cryptdisks-early multipath-tools-boot
# Should-Stop:       umountroot mdadm-raid
# X-Start-Before:    checkfs mountall
# X-Stop-After:      umountfs
# Default-Start:     S
# Default-Stop:
### END INIT INFO
EOF

addscript mcstrans <<'EOF'
### BEGIN INIT INFO
# Provides:          mcstransd mcstrans
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: The daemon to make sensitivity labels human readable form
# Description:       This daemon maps machine readable sensitivity labels
#                    (numbered levels and categories) to a human readable form
#                    (arbitrary names assigned by the sysadmin).
### END INIT INFO
EOF

addscript mdadm <<'EOF'
### BEGIN INIT INFO
# Provides:          mdadm
# Required-Start:    $local_fs $syslog mdadm-raid
# Required-Stop:     $local_fs $syslog sendsigs mdadm-raid
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: MD monitoring daemon
# Description:       mdadm provides a monitor mode, in which it will scan for
#                    problems with the MD devices. If a problem is found, the
#                    administrator is alerted via email, or a custom script is
#                    run.
### END INIT INFO
EOF

addscript mdadm-raid <<'EOF'
### BEGIN INIT INFO
# Provides:          mdadm-raid
# Required-Start:    mountkernfs hostname
# Should-Start:      udev multipath-tools-boot
# X-Start-Before:    checkfs mountall
# Required-Stop:     mountkernfs
# Should-Stop:       udev
# X-Stop-After:      umountfs
# Default-Start:     S
# Default-Stop:      0 6
# Short-Description: MD array assembly
# Description:       This script assembles a system's MD arrays, according to
#                    the settings in /etc/mdadm/mdadm.conf and the preferences
#                    in /etc/default/mdadm.
### END INIT INFO
EOF

addscript mdadm-waitidle <<'EOF'
### BEGIN INIT INFO
# Provides:          mdadm-waitidle
# Required-Start:
# Required-Stop:
# Should-Stop:       halt reboot kexec
# X-Stop-After:      umountroot
# Default-Start:
# Default-Stop:      0 6
# Short-Description: Wait for MD arrays to become idle
# Description:       Waits until all MD arrays are in idle and synced state
#                    before halt/reboot.
### END INIT INFO
EOF

addscript motd <<'EOF'
### BEGIN INIT INFO
# Provides:          motd
# Required-Start:    hostname $local_fs
# Required-Stop:
# Should-Start:
# Default-Start:     1 2 3 4 5
# Default-Stop:
# Short-Description: Create dynamic part of /etc/motd
# Description:       /etc/motd is user-editable and static.  This script
#                    creates the initial dynamic part, by default the
#                    output of uname, and stores it in /var/run/motd.dynamic.
#                    Both parts are output by pam_motd.
### END INIT INFO
EOF

addscript mountall-bootclean.sh <<'EOF'
### BEGIN INIT INFO
# Provides:          mountall-bootclean
# Required-Start:    mountall
# Required-Stop:
# Default-Start:     S
# Default-Stop:
# X-Start-Before:    bootmisc
# Short-Description: bootclean after mountall.
# Description:       Clean temporary filesystems after
#                    all local filesystems have been mounted.
### END INIT INFO
EOF

addscript mountall.sh <<'EOF'
### BEGIN INIT INFO
# Provides:          mountall
# Required-Start:    checkfs checkroot-bootclean
# Required-Stop: 
# Default-Start:     S
# Default-Stop:
# Short-Description: Mount all filesystems.
# Description:
### END INIT INFO
EOF

addscript mountdevsubfs.sh <<'EOF'
### BEGIN INIT INFO
# Provides:          mountdevsubfs
# Required-Start:    mountkernfs
# Required-Stop:
# Should-Start:      udev
# Default-Start:     S
# Default-Stop:
# Short-Description: Mount special file systems under /dev.
# Description:       Mount the virtual filesystems the kernel provides
#                    that ordinarily live under the /dev filesystem.
### END INIT INFO
EOF

addscript mountdevsubfs.sh.dpkg-old <<'EOF'
### BEGIN INIT INFO
# Provides:          mountdevsubfs
# Required-Start:    mountkernfs
# Required-Stop:
# Should-Start:      udev
# Default-Start:     S
# Default-Stop:
# Short-Description: Mount special file systems under /dev.
# Description:       Mount the virtual filesystems the kernel provides
#                    that ordinarily live under the /dev filesystem.
### END INIT INFO
EOF

addscript mountkernfs.sh <<'EOF'
### BEGIN INIT INFO
# Provides:          mountkernfs
# Required-Start:
# Required-Stop:
# Should-Start:      glibc
# Default-Start:     S
# Default-Stop:
# Short-Description: Mount kernel virtual file systems.
# Description:       Mount initial set of virtual filesystems the kernel
#                    provides and that are required by everything.
### END INIT INFO
EOF

addscript mountkernfs.sh.dpkg-old <<'EOF'
### BEGIN INIT INFO
# Provides:          mountkernfs
# Required-Start:
# Required-Stop:
# Should-Start:      glibc
# Default-Start:     S
# Default-Stop:
# Short-Description: Mount kernel virtual file systems.
# Description:       Mount initial set of virtual filesystems the kernel
#                    provides and that are required by everything.
### END INIT INFO
EOF

addscript mountnfs-bootclean.sh <<'EOF'
### BEGIN INIT INFO
# Provides:          mountnfs-bootclean
# Required-Start:    $local_fs mountnfs
# Required-Stop:
# Default-Start:     S
# Default-Stop:
# X-Start-Before:    bootmisc
# Short-Description: bootclean after mountnfs.
# Description:       Clean temporary filesystems after
#                    network filesystems have been mounted.
### END INIT INFO
EOF

addscript mountnfs.sh <<'EOF'
### BEGIN INIT INFO
# Provides:          mountnfs
# Required-Start:    $local_fs
# Required-Stop:
# Should-Start:      $network $portmap nfs-common  udev-mtab
# Default-Start:     S
# Default-Stop:
# Short-Description: Wait for network file systems to be mounted
# Description:       Network file systems are mounted by
#                    /etc/network/if-up.d/mountnfs in the background
#                    when interfaces are brought up; this script waits
#                    for them to be mounted before carrying on.
### END INIT INFO
EOF

addscript mtab.sh.dpkg-old <<'EOF'
### BEGIN INIT INFO
# Provides:          mtab
# Required-Start:    checkroot
# Required-Stop:
# Default-Start:     S
# Default-Stop:
# Short-Description: Update mtab file.
# Description:       Update the mount program's mtab file after
#                    all local filesystems have been mounted.
### END INIT INFO
EOF

addscript networking <<'EOF'
### BEGIN INIT INFO
# Provides:          networking ifupdown
# Required-Start:    mountkernfs $local_fs urandom
# Required-Stop:     $local_fs
# Default-Start:     S
# Default-Stop:      0 6
# Short-Description: Raise network interfaces.
# Description:       Prepare /run/network directory, ifstate file and raise network interfaces, or take them down.
### END INIT INFO
EOF

addscript nfs-common <<'EOF'
### BEGIN INIT INFO
# Provides:          nfs-common
# Required-Start:    $portmap $time
# Required-Stop:     $time
# Default-Start:     2 3 4 5 S
# Default-Stop:      0 1 6
# Short-Description: NFS support files common to client and server
# Description:       NFS is a popular protocol for file sharing across
#		     TCP/IP networks. This service provides various
#                    support functions for NFS mounts.
### END INIT INFO
EOF

addscript nfs-kernel-server <<'EOF'
### BEGIN INIT INFO
# Provides:          nfs-kernel-server
# Required-Start:    $remote_fs nfs-common $portmap $time
# Required-Stop:     $remote_fs nfs-common $portmap $time
# Should-Start:      $named
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Kernel NFS server support
# Description:       NFS is a popular protocol for file sharing across
#		     TCP/IP networks. This service provides NFS server
#                    functionality, which is configured via the
#                    /etc/exports file.
### END INIT INFO
EOF

addscript nmbd <<'EOF'
### BEGIN INIT INFO
# Provides:          nmbd
# Required-Start:    $network $local_fs $remote_fs
# Required-Stop:     $network $local_fs $remote_fs
# X-Start-Before:    smbd
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: start Samba NetBIOS nameserver (nmbd)
### END INIT INFO
EOF

addscript ntp <<'EOF'
### BEGIN INIT INFO
# Provides:        ntp
# Required-Start:  $network $remote_fs $syslog
# Required-Stop:   $network $remote_fs $syslog
# Default-Start:   2 3 4 5
# Default-Stop: 
# Short-Description: Start NTP daemon
### END INIT INFO
EOF

addscript openvpn <<'EOF'
### BEGIN INIT INFO
# Provides:          openvpn
# Required-Start:    $network $remote_fs $syslog
# Required-Stop:     $network $remote_fs $syslog
# Should-Start:      network-manager
# Should-Stop:       network-manager
# X-Start-Before:    $x-display-manager gdm kdm xdm wdm ldm sdm nodm
# X-Interactive:     true
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Openvpn VPN service
# Description: This script will start OpenVPN tunnels as specified
#              in /etc/default/openvpn and /etc/openvpn/*.conf
### END INIT INFO
EOF

addscript postfix <<'EOF'
### BEGIN INIT INFO
# Provides:          postfix mail-transport-agent
# Required-Start:    $local_fs $remote_fs $syslog $named $network $time
# Required-Stop:     $local_fs $remote_fs $syslog $named $network
# Should-Start:      postgresql mysql clamav-daemon postgrey spamassassin saslauthd dovecot
# Should-Stop:       postgresql mysql clamav-daemon postgrey spamassassin saslauthd dovecot
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: start and stop the Postfix Mail Transport Agent
# Description:       postfix is a Mail Transport agent
### END INIT INFO
EOF

addscript postgresql <<'EOF'
### BEGIN INIT INFO
# Provides:		postgresql
# Required-Start:	$local_fs $remote_fs $network $time
# Required-Stop:	$local_fs $remote_fs $network $time
# Should-Start:		$syslog
# Should-Stop:		$syslog
# Default-Start:	2 3 4 5
# Default-Stop:		0 1 6
# Short-Description:	PostgreSQL RDBMS server
### END INIT INFO
EOF

addscript pppd-dns <<'EOF'
### BEGIN INIT INFO
# Provides:          pppd-dns
# Required-Start:    $local_fs
# Required-Stop:
# Default-Start:     S
# Default-Stop:
# Short-Description: Restore resolv.conf if the system crashed.
# Description:       Restore /etc/resolv.conf if the system crashed before the
#                    ppp link was shut down.
### END INIT INFO
EOF

addscript procps <<'EOF'
### BEGIN INIT INFO
# Provides:          procps
# Required-Start:    mountkernfs $local_fs
# Required-Stop:
# Should-Start:      udev module-init-tools
# X-Start-Before:    $network
# Default-Start:     S
# Default-Stop:
# Short-Description: Configure kernel parameters at boottime
# Description:  Loads kernel parameters that are specified in /etc/sysctl.conf
### END INIT INFO
EOF

addscript qemu-system-x86 <<'EOF'
### BEGIN INIT INFO
# Provides:          qemu-system-x86
# Required-Start:    mountkernfs
# Required-Stop:     
# Should-Start:      udev devfsd
# Should-Stop:       
# Default-Start:     S
# Default-Stop:      
# Short-Description: QEMU KVM module loading script
# Description:       This script loads the kernel modules needed by QEMU KVM
### END INIT INFO
EOF

addscript quota <<'EOF'
### BEGIN INIT INFO
# Provides:          quota
# Short-Description: Enable user quota
# Required-Start:    $remote_fs
# Required-Stop:     $remote_fs
# Default-Start:     S
# Default-Stop:      0 6
### END INIT INFO
EOF

addscript quotarpc <<'EOF'
### BEGIN INIT INFO
# Provides:          quotarpc
# Short-Description: Starts rpc process for remote quota handling
# Required-Start:    $remote_fs $syslog quota
# Required-Stop:     $remote_fs $syslog quota
# Should-Start:      $portmap rpcbind
# Should-Stop:       $portmap rpcbind
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
### END INIT INFO
EOF

addscript radvd <<'EOF'
### BEGIN INIT INFO
# Provides:          radvd
# Required-Start:    $syslog $remote_fs $network
# Required-Stop:     $syslog $remote_fs $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Router Advertising Daemon
### END INIT INFO
EOF

addscript rc.local <<'EOF'
### BEGIN INIT INFO
# Provides:          rc.local
# Required-Start:    $all
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Run /etc/rc.local if it exist
### END INIT INFO
EOF

addscript reboot <<'EOF'
### BEGIN INIT INFO
# Provides:          reboot
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop:      6
# Short-Description: Execute the reboot command.
# Description:
### END INIT INFO
EOF

addscript resolvconf <<'EOF'
### BEGIN INIT INFO
# Provides:          resolvconf
# Required-Start:    $local_fs
# Required-Stop:     $local_fs
# X-Start-Before:    networking ifupdown
# Default-Start:     S
# Default-Stop:      0 6
# Short-Description: Nameserver information manager
# Description:       This service manages the list of nameserver addresses
#                    used by the libc resolver and name service caches
### END INIT INFO
EOF

addscript restorecond <<'EOF'
### BEGIN INIT INFO
# Provides:          restorecond
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Daemon used to maintain SELinux file context
# Description:       This daemon uses inotify to look for creation of new files
#                    listed in the /etc/selinux/restorecond.conf file,
#                    and restores the correct security context.
### END INIT INFO
EOF

addscript rmnologin <<'EOF'
### BEGIN INIT INFO
# Provides:          rmnologin
# Required-Start:    $remote_fs $all
# Required-Stop: 
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Remove /etc/nologin at boot
# Description:       This script removes the /etc/nologin file as the
#                    last step in the boot process, if DELAYLOGIN=yes.
#                    If DELAYLOGIN=no, /etc/nologin was not created by
#                    bootmisc earlier in the boot process.
### END INIT INFO
EOF

addscript rmnologin.dpkg-old <<'EOF'
### BEGIN INIT INFO
# Provides:          rmnologin
# Required-Start:    $remote_fs $all
# Required-Stop: 
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Remove /run/nologin at boot
# Description:       This script removes the /run/nologin file as the
#                    last step in the boot process, if DELAYLOGIN=yes.
#                    If DELAYLOGIN=no, /run/nologin was not created by
#                    bootmisc earlier in the boot process.
### END INIT INFO
EOF

addscript rpcbind <<'EOF'
### BEGIN INIT INFO
# Provides:          rpcbind
# Required-Start:    $network $local_fs
# Required-Stop:     $network $local_fs
# Default-Start:     S
# Default-Stop:      0 1 6
# Short-Description: RPC portmapper replacement
# Description:       rpcbind is a server that converts RPC (Remote
#                    Procedure Call) program numbers into DARPA
#                    protocol port numbers. It must be running in
#                    order to make RPC calls. Services that use
#                    RPC include NFS and NIS.
### END INIT INFO
EOF

addscript rpcbind.old <<'EOF'
### BEGIN INIT INFO
# Provides:          rpcbind
# Required-Start:    $network $local_fs
# Required-Stop:     $network $local_fs
# Default-Start:     S
# Default-Stop:      0 1 6
# Short-Description: RPC portmapper replacement
# Description:       rpcbind is a server that converts RPC (Remote
#                    Procedure Call) program numbers into DARPA
#                    protocol port numbers. It must be running in
#                    order to make RPC calls. Services that use
#                    RPC include NFS and NIS.
### END INIT INFO
EOF

addscript rsync <<'EOF'
### BEGIN INIT INFO
# Provides:          rsyncd
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Should-Start:      $named
# Default-Start:     2 3 4 5
# Default-Stop:      
# Short-Description: fast remote file copy program daemon
# Description:       rsync is a program that allows files to be copied to and
#                    from remote machines in much the same way as rcp.
#                    This provides rsyncd daemon functionality.
### END INIT INFO
EOF

addscript rsyslog <<'EOF'
### BEGIN INIT INFO
# Provides:          rsyslog
# Required-Start:    $remote_fs $time
# Required-Stop:     umountnfs $time
# X-Stop-After:      sendsigs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: enhanced syslogd
# Description:       Rsyslog is an enhanced multi-threaded syslogd.
#                    It is quite compatible to stock sysklogd and can be 
#                    used as a drop-in replacement.
### END INIT INFO
EOF

addscript samba <<'EOF'
### BEGIN INIT INFO
# Provides:          samba
# Required-Start:    smbd nmbd
# Required-Stop:     smbd nmbd
# Default-Start:     
# Default-Stop:      
# Short-Description: ensure Samba daemons are started (nmbd and smbd)
### END INIT INFO
EOF

addscript samba-ad-dc <<'EOF'
### BEGIN INIT INFO
# Provides:          samba-ad-dc
# Required-Start:    $network $local_fs $remote_fs
# Required-Stop:     $network $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: start Samba daemons for the AD DC
### END INIT INFO
EOF

addscript saned <<'EOF'
### BEGIN INIT INFO
# Provides:          saned
# Required-Start:    $syslog $local_fs $remote_fs
# Required-Stop:     $syslog $local_fs $remote_fs
# Should-Start:      dbus avahi
# Should-Stop:       dbus avahi
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: SANE network scanner server
# Description:       saned makes local scanners available over the
#                    network.
### END INIT INFO
EOF

addscript schroot <<'EOF'
### BEGIN INIT INFO
# Provides:          schroot
# Required-Start:    $local_fs $syslog $network $remote_fs
# Required-Stop:     $local_fs $syslog $network $remote_fs
# Should-Start:      lvm
# Should-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Recover schroot sessions.
# Description:       Activate any persistent sessions after a reboot.
#                    Setup scripts will be run to mount filesystems and
#                    bring the chroot back to a working state.
### END INIT INFO
EOF

addscript sendsigs <<'EOF'
### BEGIN INIT INFO
# Provides:          sendsigs
# Required-Start:    
# Required-Stop:     umountnfs
# Default-Start:
# Default-Stop:      0 6
# Short-Description: Kill all remaining processes.
# Description: 
### END INIT INFO
EOF

addscript setserial <<'EOF'
### BEGIN INIT INFO
# Provides:		setserial
# Required-Start:	$remote_fs
# Required-Stop:	$remote_fs
# Default-Start:	S
# Default-Stop:		0 1 6
# Short-Description:	controls configuration of serial ports
# Description:		Set and/or report the configuration information
#			associated with a serial port. This information
#			includes what I/O port and which IRQ a particular
#			serial port is using.
### END INIT INFO
EOF

addscript single <<'EOF'
### BEGIN INIT INFO
# Provides:          single
# Required-Start:    $local_fs $all killprocs
# Required-Stop:
# Default-Start:     1
# Default-Stop:
# Short-Description: executed by init(8) upon entering runlevel 1 (single).
### END INIT INFO
EOF

addscript smartmontools <<'EOF'
### BEGIN INIT INFO
# Provides:          smartmontools
# Required-Start:    $syslog $remote_fs
# Required-Stop:     $syslog $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      1
# Short-Description: SMART monitoring daemon
### END INIT INFO
EOF

addscript smbd <<'EOF'
### BEGIN INIT INFO
# Provides:          smbd
# Required-Start:    $network $local_fs $remote_fs
# Required-Stop:     $network $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Should-Start:      slapd cups
# Should-Stop:       slapd cups
# Short-Description: start Samba SMB/CIFS daemon (smbd)
### END INIT INFO
EOF

addscript speech-dispatcher <<'EOF'
### BEGIN INIT INFO
# Provides:          speech-dispatcher
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Should-Start:      festival
# Should-Stop:       festival
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Speech Dispatcher
# Description:       Common interface to speech synthesizers
### END INIT INFO
EOF

addscript ssh <<'EOF'
### BEGIN INIT INFO
# Provides:		sshd
# Required-Start:	$remote_fs $syslog
# Required-Stop:	$remote_fs $syslog
# Default-Start:	2 3 4 5
# Default-Stop:		
# Short-Description:	OpenBSD Secure Shell server
### END INIT INFO
EOF

addscript stop-bootlogd-single.dpkg-bak <<'EOF'
### BEGIN INIT INFO
# Provides:          stop-bootlogd-single
# Required-Start:    $local_fs $all
# Required-Stop:
# Default-Start:     S
# Default-Stop:
# Short-Description: Stop bootlogd in single user mode
# Description:       See the init.d/bootlogd script
### END INIT INFO
EOF

addscript stop-bootlogd.dpkg-bak <<'EOF'
### BEGIN INIT INFO
# Provides:          stop-bootlogd
# Required-Start:    $local_fs $all
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Stop bootlogd
# Description:       See the init.d/bootlogd script
### END INIT INFO
EOF

addscript sudo <<'EOF'
### BEGIN INIT INFO
# Provides:          sudo
# Required-Start:    $local_fs $remote_fs
# Required-Stop:
# X-Start-Before:    rmnologin
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Provide limited super user privileges to specific users
# Description: Provide limited super user privileges to specific users.
### END INIT INFO
EOF

addscript sysfsutils <<'EOF'
### BEGIN INIT INFO
# Provides:          sysfsconf
# Required-Start:    mountkernfs
# Should-Start:      udev module-init-tools cpufrequtils
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Set sysfs variables from /etc/sysfs.conf
# Description:       Similarly to /etc/init.d/procps.sh, you can configure
#                    values for sysfs variables (such as power management
#                    defaults) and /sys file permissions in /etc/sysfs.conf.
### END INIT INFO
EOF

addscript target <<'EOF'
### BEGIN INIT INFO
# Provides: target
# Required-Start: $network $syslog $remote_fs
# Required-Stop:  $network $syslog $remote_fs
# Default-Start:  2 3 4 5
# Default-Stop:   0 1 6
# Description:    TCM/ConfigFS and LIO-Target
# Short-Description:	Start service at boot time
### END INIT INFO
EOF

addscript udev <<'EOF'
### BEGIN INIT INFO
# Provides:          udev
# Required-Start:    mountkernfs 
# Required-Stop:     
# Default-Start:     S
# Default-Stop:
# Short-Description: Start udevd, populate /dev and load drivers.
### END INIT INFO
EOF

addscript udftools <<'EOF'
### BEGIN INIT INFO
# Provides:          udftools
# Required-Start:    $remote_fs 
# Required-Stop:     $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Set up packet writing devices
# Description:       Set up packet writing devices, i.e. tell the kernel that
#                    e.g. device /dev/hdc is to be made available as packet
#                    writing device /dev/pktcdvd/0.
### END INIT INFO
EOF

addscript uml-utilities <<'EOF'
### BEGIN INIT INFO
# Short-Description: start and stop UML networking services
# Description: uml-utilities provide some simple UML networking configuration services
# X-implementor: Matt Zimmerman <mdz@debian.org>
# Default-Start:  2 3 4 5
# Default-Stop: 0 1 6
# Provides: uml-utilities
# Required-Start: $remote_fs
# Required-Stop:  $remote_fs
### END INIT INFO
EOF

addscript umountfs <<'EOF'
### BEGIN INIT INFO
# Provides:          umountfs
# Required-Start:
# Required-Stop:     umountroot
# Default-Start:
# Default-Stop:      0 6
# Short-Description: Turn off swap and unmount all local file systems.
# Description:
### END INIT INFO
EOF

addscript umountfs.dpkg-old <<'EOF'
### BEGIN INIT INFO
# Provides:          umountfs
# Required-Start:
# Required-Stop:     umountroot
# Default-Start:
# Default-Stop:      0 6
# Short-Description: Turn off swap and unmount all local file systems.
# Description:
### END INIT INFO
EOF

addscript umountnfs.sh <<'EOF'
### BEGIN INIT INFO
# Provides:          umountnfs
# Required-Start:
# Required-Stop:     umountfs
# Should-Stop:       $network $portmap nfs-common
# Default-Start:
# Default-Stop:      0 6
# Short-Description: Unmount all network filesystems except the root fs.
# Description:       Also unmounts all virtual filesystems (proc,
#                    devpts, usbfs, sysfs) that are not mounted at the
#                    top level.
### END INIT INFO
EOF

addscript umountnfs.sh.dpkg-old <<'EOF'
### BEGIN INIT INFO
# Provides:          umountnfs
# Required-Start:
# Required-Stop:     umountfs
# Should-Stop:       $network $portmap nfs-common
# Default-Start:
# Default-Stop:      0 6
# Short-Description: Unmount all network filesystems except the root fs.
# Description:       Also unmounts all virtual filesystems (proc,
#                    devpts, usbfs, sysfs) that are not mounted at the
#                    top level.
### END INIT INFO
EOF

addscript umountroot <<'EOF'
### BEGIN INIT INFO
# Provides:          umountroot
# Required-Start:
# Required-Stop:
# Should-Stop:       halt reboot kexec
# Default-Start:
# Default-Stop:      0 6
# Short-Description: Mount the root filesystem read-only.
### END INIT INFO
EOF

addscript unattended-upgrades <<'EOF'
### BEGIN INIT INFO
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Provides:          unattended-upgrade-shutdown-check
# Default-Start:
# Default-Stop:      0 6
# Short-Description: Check if unattended upgrades are being applied
# Description:       Check if unattended upgrades are being applied
#                    and wait for them to finish
### END INIT INFO
EOF

addscript urandom <<'EOF'
### BEGIN INIT INFO
# Provides:          urandom
# Required-Start:    $local_fs $time
# Required-Stop:     $local_fs
# Default-Start:     S
# Default-Stop:      0 6
# Short-Description: Save and restore random seed between restarts.
# Description:       This script saves the random seed between restarts.
#                    It is called from the boot, halt and reboot scripts.
### END INIT INFO
EOF

addscript virtualbox <<'EOF'
### BEGIN INIT INFO
# Provides:       vboxdrv virtualbox
# Required-Start: $remote_fs $network
# Required-Stop:  $remote_fs
# Default-Start:  2 3 4 5
# Default-Stop:   0 1 6
# Short-Description: VirtualBox Linux kernel module
### END INIT INFO
EOF

addscript winbind <<'EOF'
### BEGIN INIT INFO
# Provides:          winbind
# Required-Start:    $network $remote_fs $syslog
# Required-Stop:     $network $remote_fs $syslog
# Should-Start:      samba
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: start Winbind daemon
### END INIT INFO
EOF

addscript x11-common <<'EOF'
### BEGIN INIT INFO
# Provides:          x11-common
# Required-Start:    $remote_fs
# Required-Stop:     $remote_fs
# Default-Start:     S
# Default-Stop:
### END INIT INFO
EOF

addscript zfs-fuse <<'EOF'
### BEGIN INIT INFO
# Provides:          zfs-fuse
# Required-Start:    $remote_fs
# Required-Stop:     $remote_fs
# Default-Start:     S
# Default-Stop:      0 6
# Short-Description: Daemon for ZFS support via FUSE
# Description:       Mounts and makes available ZFS volumes
### END INIT INFO
EOF

addscript zfs-mount <<'EOF'
### BEGIN INIT INFO
# Provides: zvol zfs zfs-mount
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Mount ZFS filesystems
# Description: Run the `zfs mount -a` or `zfs umount -a` command.
#              This init script is deprecated and should be disabled in the
#              /etc/default/zfs options file. Instead, use the zfs-mount
#              package for Debian or the zfs-mountall package for Ubuntu
### END INIT INFO
EOF

addscript zfs-share <<'EOF'
### BEGIN INIT INFO
# Provides: shareiscsi sharenfs sharesmb zfs-share
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Should-Start: iscsi iscsitarget istgt nfs-kernel-server samba
# Should-Stop: iscsi iscsitarget istgt nfs-kernel-server samba
# Short-Description: Network share ZFS datasets.
# Description: Run the `zfs share -a` or `zfs unmount -a` commands
#	for controlling iSCSI, NFS, or CIFS network shares.
### END INIT INFO
EOF

cd $tmpdir/etc
mkdir rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d rcS.d
ln -s ../init.d/alsa-utils rc0.d/K01alsa-utils
ln -s ../init.d/apache2 rc0.d/K01apache2
ln -s ../init.d/atd rc0.d/K01atd
ln -s ../init.d/aumix rc0.d/K01aumix
ln -s ../init.d/autofs rc0.d/K01autofs
ln -s ../init.d/bluetooth rc0.d/K01bluetooth
ln -s ../init.d/buildd rc0.d/K01buildd
ln -s ../init.d/cups-browsed rc0.d/K01cups-browsed
ln -s ../init.d/dirmngr rc0.d/K01dirmngr
ln -s ../init.d/etc-setserial rc0.d/K01etc-setserial
ln -s ../init.d/fglrx-atieventsd rc0.d/K01fglrx-atieventsd
ln -s ../init.d/gdomap rc0.d/K01gdomap
ln -s ../init.d/gpm rc0.d/K01gpm
ln -s ../init.d/hddtemp rc0.d/K01hddtemp
ln -s ../init.d/ifplugd rc0.d/K01ifplugd
ln -s ../init.d/kdm rc0.d/K01kdm
ln -s ../init.d/kerneloops rc0.d/K01kerneloops
ln -s ../init.d/lightdm rc0.d/K01lightdm
ln -s ../init.d/lirc rc0.d/K01lirc
ln -s ../init.d/mcstrans rc0.d/K01mcstrans
ln -s ../init.d/mdadm rc0.d/K01mdadm
ln -s ../init.d/nmbd rc0.d/K01nmbd
ln -s ../init.d/openvpn rc0.d/K01openvpn
ln -s ../init.d/postfix rc0.d/K01postfix
ln -s ../init.d/quotarpc rc0.d/K01quotarpc
ln -s ../init.d/radvd rc0.d/K01radvd
ln -s ../init.d/resolvconf rc0.d/K01resolvconf
ln -s ../init.d/restorecond rc0.d/K01restorecond
ln -s ../init.d/samba-ad-dc rc0.d/K01samba-ad-dc
ln -s ../init.d/saned rc0.d/K01saned
ln -s ../init.d/schroot rc0.d/K01schroot
ln -s ../init.d/setserial rc0.d/K01setserial
ln -s ../init.d/smbd rc0.d/K01smbd
ln -s ../init.d/speech-dispatcher rc0.d/K01speech-dispatcher
ln -s ../init.d/target rc0.d/K01target
ln -s ../init.d/udftools rc0.d/K01udftools
ln -s ../init.d/uml-utilities rc0.d/K01uml-utilities
ln -s ../init.d/unattended-upgrades rc0.d/K01unattended-upgrades
ln -s ../init.d/urandom rc0.d/K01urandom
ln -s ../init.d/virtualbox rc0.d/K01virtualbox
ln -s ../init.d/winbind rc0.d/K01winbind
ln -s ../init.d/zfs-fuse rc0.d/K01zfs-fuse
ln -s ../init.d/zfs-mount rc0.d/K01zfs-mount
ln -s ../init.d/zfs-share rc0.d/K01zfs-share
ln -s ../init.d/avahi-daemon rc0.d/K02avahi-daemon
ln -s ../init.d/nfs-kernel-server rc0.d/K02nfs-kernel-server
ln -s ../init.d/postgresql rc0.d/K02postgresql
ln -s ../init.d/quota rc0.d/K02quota
ln -s ../init.d/sendsigs rc0.d/K03sendsigs
ln -s ../init.d/rsyslog rc0.d/K04rsyslog
ln -s ../init.d/umountnfs.sh rc0.d/K05umountnfs.sh
ln -s ../init.d/nfs-common rc0.d/K06nfs-common
ln -s ../init.d/rpcbind rc0.d/K06rpcbind
ln -s ../init.d/hwclock.sh rc0.d/K07hwclock.sh
ln -s ../init.d/networking rc0.d/K07networking
ln -s ../init.d/umountfs rc0.d/K08umountfs
ln -s ../init.d/mdadm-raid rc0.d/K09mdadm-raid
ln -s ../init.d/umountroot rc0.d/K09umountroot
ln -s ../init.d/mdadm-waitidle rc0.d/K10mdadm-waitidle
ln -s ../init.d/halt rc0.d/K11halt
ln -s ../init.d/acpi-support rc1.d/K01acpi-support
ln -s ../init.d/alsa-utils rc1.d/K01alsa-utils
ln -s ../init.d/apache2 rc1.d/K01apache2
ln -s ../init.d/atd rc1.d/K01atd
ln -s ../init.d/aumix rc1.d/K01aumix
ln -s ../init.d/autofs rc1.d/K01autofs
ln -s ../init.d/bluetooth rc1.d/K01bluetooth
ln -s ../init.d/buildd rc1.d/K01buildd
ln -s ../init.d/cups-browsed rc1.d/K01cups-browsed
ln -s ../init.d/dictd rc1.d/K01dictd
ln -s ../init.d/dirmngr rc1.d/K01dirmngr
ln -s ../init.d/etc-setserial rc1.d/K01etc-setserial
ln -s ../init.d/fglrx-atieventsd rc1.d/K01fglrx-atieventsd
ln -s ../init.d/gdomap rc1.d/K01gdomap
ln -s ../init.d/gpm rc1.d/K01gpm
ln -s ../init.d/hddtemp rc1.d/K01hddtemp
ln -s ../init.d/ifplugd rc1.d/K01ifplugd
ln -s ../init.d/kdm rc1.d/K01kdm
ln -s ../init.d/kerneloops rc1.d/K01kerneloops
ln -s ../init.d/lightdm rc1.d/K01lightdm
ln -s ../init.d/lirc rc1.d/K01lirc
ln -s ../init.d/mcstrans rc1.d/K01mcstrans
ln -s ../init.d/mdadm rc1.d/K01mdadm
ln -s ../init.d/nmbd rc1.d/K01nmbd
ln -s ../init.d/openvpn rc1.d/K01openvpn
ln -s ../init.d/postfix rc1.d/K01postfix
ln -s ../init.d/quotarpc rc1.d/K01quotarpc
ln -s ../init.d/radvd rc1.d/K01radvd
ln -s ../init.d/restorecond rc1.d/K01restorecond
ln -s ../init.d/samba-ad-dc rc1.d/K01samba-ad-dc
ln -s ../init.d/saned rc1.d/K01saned
ln -s ../init.d/schroot rc1.d/K01schroot
ln -s ../init.d/setserial rc1.d/K01setserial
ln -s ../init.d/smartmontools rc1.d/K01smartmontools
ln -s ../init.d/smbd rc1.d/K01smbd
ln -s ../init.d/speech-dispatcher rc1.d/K01speech-dispatcher
ln -s ../init.d/target rc1.d/K01target
ln -s ../init.d/udftools rc1.d/K01udftools
ln -s ../init.d/uml-utilities rc1.d/K01uml-utilities
ln -s ../init.d/virtualbox rc1.d/K01virtualbox
ln -s ../init.d/winbind rc1.d/K01winbind
ln -s ../init.d/zfs-mount rc1.d/K01zfs-mount
ln -s ../init.d/zfs-share rc1.d/K01zfs-share
ln -s ../init.d/avahi-daemon rc1.d/K02avahi-daemon
ln -s ../init.d/cups rc1.d/K02cups
ln -s ../init.d/nfs-kernel-server rc1.d/K02nfs-kernel-server
ln -s ../init.d/postgresql rc1.d/K02postgresql
ln -s ../init.d/rsyslog rc1.d/K04rsyslog
ln -s ../init.d/nfs-common rc1.d/K06nfs-common
ln -s ../init.d/rpcbind rc1.d/K06rpcbind
ln -s ../init.d/killprocs rc1.d/S01killprocs
ln -s ../init.d/motd rc1.d/S01motd
ln -s ../init.d/bootlogs rc1.d/S06bootlogs
ln -s ../init.d/single rc1.d/S07single
ln -s ../init.d/acpi-fakekey rc2.d/S01acpi-fakekey
ln -s ../init.d/binfmt-support rc2.d/S01binfmt-support
ln -s ../init.d/dirmngr rc2.d/S01dirmngr
ln -s ../init.d/ifplugd rc2.d/S01ifplugd
ln -s ../init.d/motd rc2.d/S01motd
ln -s ../init.d/nmbd rc2.d/S01nmbd
ln -s ../init.d/rsyslog rc2.d/S01rsyslog
ln -s ../init.d/samba-ad-dc rc2.d/S01samba-ad-dc
ln -s ../init.d/sudo rc2.d/S01sudo
ln -s ../init.d/udftools rc2.d/S01udftools
ln -s ../init.d/uml-utilities rc2.d/S01uml-utilities
ln -s ../init.d/virtualbox rc2.d/S01virtualbox
ln -s ../init.d/zfs-mount rc2.d/S01zfs-mount
ln -s ../init.d/apache2 rc2.d/S02apache2
ln -s ../init.d/openvpn rc2.d/S03openvpn
ln -s ../init.d/acpi-support rc2.d/S04acpi-support
ln -s ../init.d/acpid rc2.d/S04acpid
ln -s ../init.d/anacron rc2.d/S04anacron
ln -s ../init.d/atd rc2.d/S04atd
ln -s ../init.d/aumix rc2.d/S04aumix
ln -s ../init.d/autofs rc2.d/S04autofs
ln -s ../init.d/dbus rc2.d/S04dbus
ln -s ../init.d/dictd rc2.d/S04dictd
ln -s ../init.d/fglrx-atieventsd rc2.d/S04fglrx-atieventsd
ln -s ../init.d/gdomap rc2.d/S04gdomap
ln -s ../init.d/gpm rc2.d/S04gpm
ln -s ../init.d/hddtemp rc2.d/S04hddtemp
ln -s ../init.d/kerneloops rc2.d/S04kerneloops
ln -s ../init.d/lirc rc2.d/S04lirc
ln -s ../init.d/loadcpufreq rc2.d/S04loadcpufreq
ln -s ../init.d/mcstrans rc2.d/S04mcstrans
ln -s ../init.d/mdadm rc2.d/S04mdadm
ln -s ../init.d/ntp rc2.d/S04ntp
ln -s ../init.d/postgresql rc2.d/S04postgresql
ln -s ../init.d/radvd rc2.d/S04radvd
ln -s ../init.d/restorecond rc2.d/S04restorecond
ln -s ../init.d/rsync rc2.d/S04rsync
ln -s ../init.d/schroot rc2.d/S04schroot
ln -s ../init.d/smartmontools rc2.d/S04smartmontools
ln -s ../init.d/speech-dispatcher rc2.d/S04speech-dispatcher
ln -s ../init.d/ssh rc2.d/S04ssh
ln -s ../init.d/target rc2.d/S04target
ln -s ../init.d/winbind rc2.d/S04winbind
ln -s ../init.d/avahi-daemon rc2.d/S05avahi-daemon
ln -s ../init.d/bluetooth rc2.d/S05bluetooth
ln -s ../init.d/buildd rc2.d/S05buildd
ln -s ../init.d/cpufrequtils rc2.d/S05cpufrequtils
ln -s ../init.d/cron rc2.d/S05cron
ln -s ../init.d/kdm rc2.d/S05kdm
ln -s ../init.d/lightdm rc2.d/S05lightdm
ln -s ../init.d/postfix rc2.d/S05postfix
ln -s ../init.d/bootlogs rc2.d/S06bootlogs
ln -s ../init.d/cups rc2.d/S06cups
ln -s ../init.d/cups-browsed rc2.d/S06cups-browsed
ln -s ../init.d/saned rc2.d/S06saned
ln -s ../init.d/sysfsutils rc2.d/S06sysfsutils
ln -s ../init.d/smbd rc2.d/S07smbd
ln -s ../init.d/nfs-common rc2.d/S15nfs-common
ln -s ../init.d/quotarpc rc2.d/S15quotarpc
ln -s ../init.d/nfs-kernel-server rc2.d/S16nfs-kernel-server
ln -s ../init.d/zfs-share rc2.d/S17zfs-share
ln -s ../init.d/rc.local rc2.d/S18rc.local
ln -s ../init.d/rmnologin rc2.d/S18rmnologin
ln -s ../init.d/acpi-fakekey rc3.d/S01acpi-fakekey
ln -s ../init.d/binfmt-support rc3.d/S01binfmt-support
ln -s ../init.d/dirmngr rc3.d/S01dirmngr
ln -s ../init.d/ifplugd rc3.d/S01ifplugd
ln -s ../init.d/motd rc3.d/S01motd
ln -s ../init.d/nmbd rc3.d/S01nmbd
ln -s ../init.d/rsyslog rc3.d/S01rsyslog
ln -s ../init.d/samba-ad-dc rc3.d/S01samba-ad-dc
ln -s ../init.d/sudo rc3.d/S01sudo
ln -s ../init.d/udftools rc3.d/S01udftools
ln -s ../init.d/uml-utilities rc3.d/S01uml-utilities
ln -s ../init.d/virtualbox rc3.d/S01virtualbox
ln -s ../init.d/zfs-mount rc3.d/S01zfs-mount
ln -s ../init.d/apache2 rc3.d/S02apache2
ln -s ../init.d/openvpn rc3.d/S03openvpn
ln -s ../init.d/acpi-support rc3.d/S04acpi-support
ln -s ../init.d/acpid rc3.d/S04acpid
ln -s ../init.d/anacron rc3.d/S04anacron
ln -s ../init.d/atd rc3.d/S04atd
ln -s ../init.d/aumix rc3.d/S04aumix
ln -s ../init.d/autofs rc3.d/S04autofs
ln -s ../init.d/dbus rc3.d/S04dbus
ln -s ../init.d/dictd rc3.d/S04dictd
ln -s ../init.d/fglrx-atieventsd rc3.d/S04fglrx-atieventsd
ln -s ../init.d/gdomap rc3.d/S04gdomap
ln -s ../init.d/gpm rc3.d/S04gpm
ln -s ../init.d/hddtemp rc3.d/S04hddtemp
ln -s ../init.d/kerneloops rc3.d/S04kerneloops
ln -s ../init.d/lirc rc3.d/S04lirc
ln -s ../init.d/loadcpufreq rc3.d/S04loadcpufreq
ln -s ../init.d/mcstrans rc3.d/S04mcstrans
ln -s ../init.d/mdadm rc3.d/S04mdadm
ln -s ../init.d/ntp rc3.d/S04ntp
ln -s ../init.d/postgresql rc3.d/S04postgresql
ln -s ../init.d/radvd rc3.d/S04radvd
ln -s ../init.d/restorecond rc3.d/S04restorecond
ln -s ../init.d/rsync rc3.d/S04rsync
ln -s ../init.d/schroot rc3.d/S04schroot
ln -s ../init.d/smartmontools rc3.d/S04smartmontools
ln -s ../init.d/speech-dispatcher rc3.d/S04speech-dispatcher
ln -s ../init.d/ssh rc3.d/S04ssh
ln -s ../init.d/target rc3.d/S04target
ln -s ../init.d/winbind rc3.d/S04winbind
ln -s ../init.d/avahi-daemon rc3.d/S05avahi-daemon
ln -s ../init.d/bluetooth rc3.d/S05bluetooth
ln -s ../init.d/buildd rc3.d/S05buildd
ln -s ../init.d/cpufrequtils rc3.d/S05cpufrequtils
ln -s ../init.d/cron rc3.d/S05cron
ln -s ../init.d/kdm rc3.d/S05kdm
ln -s ../init.d/lightdm rc3.d/S05lightdm
ln -s ../init.d/postfix rc3.d/S05postfix
ln -s ../init.d/bootlogs rc3.d/S06bootlogs
ln -s ../init.d/cups rc3.d/S06cups
ln -s ../init.d/cups-browsed rc3.d/S06cups-browsed
ln -s ../init.d/saned rc3.d/S06saned
ln -s ../init.d/sysfsutils rc3.d/S06sysfsutils
ln -s ../init.d/smbd rc3.d/S07smbd
ln -s ../init.d/nfs-common rc3.d/S15nfs-common
ln -s ../init.d/quotarpc rc3.d/S15quotarpc
ln -s ../init.d/nfs-kernel-server rc3.d/S16nfs-kernel-server
ln -s ../init.d/zfs-share rc3.d/S17zfs-share
ln -s ../init.d/rc.local rc3.d/S18rc.local
ln -s ../init.d/rmnologin rc3.d/S18rmnologin
ln -s ../init.d/acpi-fakekey rc4.d/S01acpi-fakekey
ln -s ../init.d/binfmt-support rc4.d/S01binfmt-support
ln -s ../init.d/dirmngr rc4.d/S01dirmngr
ln -s ../init.d/ifplugd rc4.d/S01ifplugd
ln -s ../init.d/motd rc4.d/S01motd
ln -s ../init.d/nmbd rc4.d/S01nmbd
ln -s ../init.d/rsyslog rc4.d/S01rsyslog
ln -s ../init.d/samba-ad-dc rc4.d/S01samba-ad-dc
ln -s ../init.d/sudo rc4.d/S01sudo
ln -s ../init.d/udftools rc4.d/S01udftools
ln -s ../init.d/uml-utilities rc4.d/S01uml-utilities
ln -s ../init.d/virtualbox rc4.d/S01virtualbox
ln -s ../init.d/zfs-mount rc4.d/S01zfs-mount
ln -s ../init.d/apache2 rc4.d/S02apache2
ln -s ../init.d/openvpn rc4.d/S03openvpn
ln -s ../init.d/acpi-support rc4.d/S04acpi-support
ln -s ../init.d/acpid rc4.d/S04acpid
ln -s ../init.d/anacron rc4.d/S04anacron
ln -s ../init.d/atd rc4.d/S04atd
ln -s ../init.d/aumix rc4.d/S04aumix
ln -s ../init.d/autofs rc4.d/S04autofs
ln -s ../init.d/dbus rc4.d/S04dbus
ln -s ../init.d/dictd rc4.d/S04dictd
ln -s ../init.d/fglrx-atieventsd rc4.d/S04fglrx-atieventsd
ln -s ../init.d/gdomap rc4.d/S04gdomap
ln -s ../init.d/gpm rc4.d/S04gpm
ln -s ../init.d/hddtemp rc4.d/S04hddtemp
ln -s ../init.d/kerneloops rc4.d/S04kerneloops
ln -s ../init.d/lirc rc4.d/S04lirc
ln -s ../init.d/loadcpufreq rc4.d/S04loadcpufreq
ln -s ../init.d/mcstrans rc4.d/S04mcstrans
ln -s ../init.d/mdadm rc4.d/S04mdadm
ln -s ../init.d/ntp rc4.d/S04ntp
ln -s ../init.d/postgresql rc4.d/S04postgresql
ln -s ../init.d/radvd rc4.d/S04radvd
ln -s ../init.d/restorecond rc4.d/S04restorecond
ln -s ../init.d/rsync rc4.d/S04rsync
ln -s ../init.d/schroot rc4.d/S04schroot
ln -s ../init.d/smartmontools rc4.d/S04smartmontools
ln -s ../init.d/speech-dispatcher rc4.d/S04speech-dispatcher
ln -s ../init.d/ssh rc4.d/S04ssh
ln -s ../init.d/target rc4.d/S04target
ln -s ../init.d/winbind rc4.d/S04winbind
ln -s ../init.d/avahi-daemon rc4.d/S05avahi-daemon
ln -s ../init.d/bluetooth rc4.d/S05bluetooth
ln -s ../init.d/buildd rc4.d/S05buildd
ln -s ../init.d/cpufrequtils rc4.d/S05cpufrequtils
ln -s ../init.d/cron rc4.d/S05cron
ln -s ../init.d/kdm rc4.d/S05kdm
ln -s ../init.d/lightdm rc4.d/S05lightdm
ln -s ../init.d/postfix rc4.d/S05postfix
ln -s ../init.d/bootlogs rc4.d/S06bootlogs
ln -s ../init.d/cups rc4.d/S06cups
ln -s ../init.d/cups-browsed rc4.d/S06cups-browsed
ln -s ../init.d/saned rc4.d/S06saned
ln -s ../init.d/sysfsutils rc4.d/S06sysfsutils
ln -s ../init.d/smbd rc4.d/S07smbd
ln -s ../init.d/nfs-common rc4.d/S15nfs-common
ln -s ../init.d/quotarpc rc4.d/S15quotarpc
ln -s ../init.d/nfs-kernel-server rc4.d/S16nfs-kernel-server
ln -s ../init.d/zfs-share rc4.d/S17zfs-share
ln -s ../init.d/rc.local rc4.d/S18rc.local
ln -s ../init.d/rmnologin rc4.d/S18rmnologin
ln -s ../init.d/acpi-fakekey rc5.d/S01acpi-fakekey
ln -s ../init.d/binfmt-support rc5.d/S01binfmt-support
ln -s ../init.d/dirmngr rc5.d/S01dirmngr
ln -s ../init.d/ifplugd rc5.d/S01ifplugd
ln -s ../init.d/motd rc5.d/S01motd
ln -s ../init.d/nmbd rc5.d/S01nmbd
ln -s ../init.d/rsyslog rc5.d/S01rsyslog
ln -s ../init.d/samba-ad-dc rc5.d/S01samba-ad-dc
ln -s ../init.d/sudo rc5.d/S01sudo
ln -s ../init.d/udftools rc5.d/S01udftools
ln -s ../init.d/uml-utilities rc5.d/S01uml-utilities
ln -s ../init.d/virtualbox rc5.d/S01virtualbox
ln -s ../init.d/zfs-mount rc5.d/S01zfs-mount
ln -s ../init.d/apache2 rc5.d/S02apache2
ln -s ../init.d/openvpn rc5.d/S03openvpn
ln -s ../init.d/acpi-support rc5.d/S04acpi-support
ln -s ../init.d/acpid rc5.d/S04acpid
ln -s ../init.d/anacron rc5.d/S04anacron
ln -s ../init.d/atd rc5.d/S04atd
ln -s ../init.d/aumix rc5.d/S04aumix
ln -s ../init.d/autofs rc5.d/S04autofs
ln -s ../init.d/dbus rc5.d/S04dbus
ln -s ../init.d/dictd rc5.d/S04dictd
ln -s ../init.d/fglrx-atieventsd rc5.d/S04fglrx-atieventsd
ln -s ../init.d/gdomap rc5.d/S04gdomap
ln -s ../init.d/gpm rc5.d/S04gpm
ln -s ../init.d/hddtemp rc5.d/S04hddtemp
ln -s ../init.d/kerneloops rc5.d/S04kerneloops
ln -s ../init.d/lirc rc5.d/S04lirc
ln -s ../init.d/loadcpufreq rc5.d/S04loadcpufreq
ln -s ../init.d/mcstrans rc5.d/S04mcstrans
ln -s ../init.d/mdadm rc5.d/S04mdadm
ln -s ../init.d/ntp rc5.d/S04ntp
ln -s ../init.d/postgresql rc5.d/S04postgresql
ln -s ../init.d/radvd rc5.d/S04radvd
ln -s ../init.d/restorecond rc5.d/S04restorecond
ln -s ../init.d/rsync rc5.d/S04rsync
ln -s ../init.d/schroot rc5.d/S04schroot
ln -s ../init.d/smartmontools rc5.d/S04smartmontools
ln -s ../init.d/speech-dispatcher rc5.d/S04speech-dispatcher
ln -s ../init.d/ssh rc5.d/S04ssh
ln -s ../init.d/target rc5.d/S04target
ln -s ../init.d/winbind rc5.d/S04winbind
ln -s ../init.d/avahi-daemon rc5.d/S05avahi-daemon
ln -s ../init.d/bluetooth rc5.d/S05bluetooth
ln -s ../init.d/buildd rc5.d/S05buildd
ln -s ../init.d/cpufrequtils rc5.d/S05cpufrequtils
ln -s ../init.d/cron rc5.d/S05cron
ln -s ../init.d/kdm rc5.d/S05kdm
ln -s ../init.d/lightdm rc5.d/S05lightdm
ln -s ../init.d/postfix rc5.d/S05postfix
ln -s ../init.d/bootlogs rc5.d/S06bootlogs
ln -s ../init.d/cups rc5.d/S06cups
ln -s ../init.d/cups-browsed rc5.d/S06cups-browsed
ln -s ../init.d/saned rc5.d/S06saned
ln -s ../init.d/sysfsutils rc5.d/S06sysfsutils
ln -s ../init.d/smbd rc5.d/S07smbd
ln -s ../init.d/nfs-common rc5.d/S15nfs-common
ln -s ../init.d/quotarpc rc5.d/S15quotarpc
ln -s ../init.d/nfs-kernel-server rc5.d/S16nfs-kernel-server
ln -s ../init.d/zfs-share rc5.d/S17zfs-share
ln -s ../init.d/rc.local rc5.d/S18rc.local
ln -s ../init.d/rmnologin rc5.d/S18rmnologin
ln -s ../init.d/alsa-utils rc6.d/K01alsa-utils
ln -s ../init.d/apache2 rc6.d/K01apache2
ln -s ../init.d/atd rc6.d/K01atd
ln -s ../init.d/aumix rc6.d/K01aumix
ln -s ../init.d/autofs rc6.d/K01autofs
ln -s ../init.d/bluetooth rc6.d/K01bluetooth
ln -s ../init.d/buildd rc6.d/K01buildd
ln -s ../init.d/cups-browsed rc6.d/K01cups-browsed
ln -s ../init.d/dirmngr rc6.d/K01dirmngr
ln -s ../init.d/etc-setserial rc6.d/K01etc-setserial
ln -s ../init.d/fglrx-atieventsd rc6.d/K01fglrx-atieventsd
ln -s ../init.d/gdomap rc6.d/K01gdomap
ln -s ../init.d/gpm rc6.d/K01gpm
ln -s ../init.d/hddtemp rc6.d/K01hddtemp
ln -s ../init.d/ifplugd rc6.d/K01ifplugd
ln -s ../init.d/kdm rc6.d/K01kdm
ln -s ../init.d/kerneloops rc6.d/K01kerneloops
ln -s ../init.d/lightdm rc6.d/K01lightdm
ln -s ../init.d/lirc rc6.d/K01lirc
ln -s ../init.d/mcstrans rc6.d/K01mcstrans
ln -s ../init.d/mdadm rc6.d/K01mdadm
ln -s ../init.d/nmbd rc6.d/K01nmbd
ln -s ../init.d/openvpn rc6.d/K01openvpn
ln -s ../init.d/postfix rc6.d/K01postfix
ln -s ../init.d/quotarpc rc6.d/K01quotarpc
ln -s ../init.d/radvd rc6.d/K01radvd
ln -s ../init.d/resolvconf rc6.d/K01resolvconf
ln -s ../init.d/restorecond rc6.d/K01restorecond
ln -s ../init.d/samba-ad-dc rc6.d/K01samba-ad-dc
ln -s ../init.d/saned rc6.d/K01saned
ln -s ../init.d/schroot rc6.d/K01schroot
ln -s ../init.d/setserial rc6.d/K01setserial
ln -s ../init.d/smbd rc6.d/K01smbd
ln -s ../init.d/speech-dispatcher rc6.d/K01speech-dispatcher
ln -s ../init.d/target rc6.d/K01target
ln -s ../init.d/udftools rc6.d/K01udftools
ln -s ../init.d/uml-utilities rc6.d/K01uml-utilities
ln -s ../init.d/unattended-upgrades rc6.d/K01unattended-upgrades
ln -s ../init.d/urandom rc6.d/K01urandom
ln -s ../init.d/virtualbox rc6.d/K01virtualbox
ln -s ../init.d/winbind rc6.d/K01winbind
ln -s ../init.d/zfs-fuse rc6.d/K01zfs-fuse
ln -s ../init.d/zfs-mount rc6.d/K01zfs-mount
ln -s ../init.d/zfs-share rc6.d/K01zfs-share
ln -s ../init.d/avahi-daemon rc6.d/K02avahi-daemon
ln -s ../init.d/nfs-kernel-server rc6.d/K02nfs-kernel-server
ln -s ../init.d/postgresql rc6.d/K02postgresql
ln -s ../init.d/quota rc6.d/K02quota
ln -s ../init.d/sendsigs rc6.d/K03sendsigs
ln -s ../init.d/rsyslog rc6.d/K04rsyslog
ln -s ../init.d/umountnfs.sh rc6.d/K05umountnfs.sh
ln -s ../init.d/nfs-common rc6.d/K06nfs-common
ln -s ../init.d/rpcbind rc6.d/K06rpcbind
ln -s ../init.d/hwclock.sh rc6.d/K07hwclock.sh
ln -s ../init.d/networking rc6.d/K07networking
ln -s ../init.d/umountfs rc6.d/K08umountfs
ln -s ../init.d/mdadm-raid rc6.d/K09mdadm-raid
ln -s ../init.d/umountroot rc6.d/K09umountroot
ln -s ../init.d/mdadm-waitidle rc6.d/K10mdadm-waitidle
ln -s ../init.d/reboot rc6.d/K11reboot
ln -s ../init.d/hostname.sh rcS.d/S01hostname.sh
ln -s ../init.d/mountkernfs.sh rcS.d/S01mountkernfs.sh
ln -s ../init.d/udev rcS.d/S02udev
ln -s ../init.d/mdadm-raid rcS.d/S03mdadm-raid
ln -s ../init.d/mountdevsubfs.sh rcS.d/S03mountdevsubfs.sh
ln -s ../init.d/qemu-system-x86 rcS.d/S03qemu-system-x86
ln -s ../init.d/keymap.sh rcS.d/S04keymap.sh
ln -s ../init.d/keyboard-setup rcS.d/S05keyboard-setup
ln -s ../init.d/hdparm rcS.d/S06hdparm
ln -s ../init.d/hwclock.sh rcS.d/S06hwclock.sh
ln -s ../init.d/lvm2 rcS.d/S06lvm2
ln -s ../init.d/checkroot.sh rcS.d/S07checkroot.sh
ln -s ../init.d/checkfs.sh rcS.d/S08checkfs.sh
ln -s ../init.d/checkroot-bootclean.sh rcS.d/S09checkroot-bootclean.sh
ln -s ../init.d/etc-setserial rcS.d/S09etc-setserial
ln -s ../init.d/kmod rcS.d/S09kmod
ln -s ../init.d/mountall.sh rcS.d/S10mountall.sh
ln -s ../init.d/mountall-bootclean.sh rcS.d/S11mountall-bootclean.sh
ln -s ../init.d/pppd-dns rcS.d/S12pppd-dns
ln -s ../init.d/procps rcS.d/S12procps
ln -s ../init.d/resolvconf rcS.d/S12resolvconf
ln -s ../init.d/urandom rcS.d/S12urandom
ln -s ../init.d/networking rcS.d/S13networking
ln -s ../init.d/rpcbind rcS.d/S14rpcbind
ln -s ../init.d/nfs-common rcS.d/S15nfs-common
ln -s ../init.d/mountnfs.sh rcS.d/S16mountnfs.sh
ln -s ../init.d/mountnfs-bootclean.sh rcS.d/S17mountnfs-bootclean.sh
ln -s ../init.d/kbd rcS.d/S18kbd
ln -s ../init.d/console-setup rcS.d/S19console-setup
ln -s ../init.d/alsa-utils rcS.d/S20alsa-utils
ln -s ../init.d/bootmisc.sh rcS.d/S20bootmisc.sh
ln -s ../init.d/lm-sensors rcS.d/S20lm-sensors
ln -s ../init.d/quota rcS.d/S20quota
ln -s ../init.d/setserial rcS.d/S20setserial
ln -s ../init.d/x11-common rcS.d/S20x11-common
ln -s ../init.d/zfs-fuse rcS.d/S20zfs-fuse

insserv_reg rpcbind
insserv_reg nfs-common
insserv_reg kdm
insserv_reg binfmt-support

list_rclinks
