#!/bin/sh -e

create_etc_modules() {
  [ -e /etc/modules ] && return 0
  cat <<END > /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

END
  chmod 644 /etc/modules
}

case "$1" in
  configure)
  create_etc_modules
esac

# Automatically added by dh_installinit
if [ -x "/etc/init.d/kmod" ]; then
	if [ ! -e "/etc/init/kmod.conf" ]; then
		update-rc.d kmod start 15 S . >/dev/null
	fi
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f kmod remove >/dev/null || exit $?
# End automatically added section


exit 0
