1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
#!/bin/sh -e
# post install script for the Debian modutils package
pkg=modutils
CFGFILE="/etc/modules.conf"
HEADER="### This file is automatically generated by update-modules"
set -e
if [ ! "$1" = "configure" ]; then
exit 0
fi
# Create /var/log/ksymoops if this is an intial install. This allows
# a user to remove it to disable logging later on
if [ -z "$2" -a ! -d /var/log/ksymoops ] ; then
mkdir /var/log/ksymoops
chmod 755 /var/log/ksymoops
fi
# Create the /etc/modules file if it does not exist
if [ ! -e /etc/modules ] ; then
cat <<EOF > /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file should contain the names of kernel modules that are
# to be loaded at boot time, one per line. Comments begin with
# a "#", and everything on the line after them are ignored.
EOF
chmod 644 /etc/modules
fi
# If $CFGFILE exists and is not generated print a big fat
# warning and inform people about the new system
if [ -f $CFGFILE ] && ! head -n1 $CFGFILE | grep -q "^$HEADER" ; then
cat <<EOF
WARNING: you already have an $CFGFILE file which has not
been generated by update-modules. Debian now uses a new system which
uses multiple files in the /etc/modutils directory. See the manpage
for update-modules for more information on this setup.
Please check all changes you made in $CFGFILE and either
apply them to the provided files in /etc/modutils or add your own
files there. Then run update-modules.
EOF
echo -n "Press [ENTER] to continue"
read HITME
else
update-modules
fi
exit 0
|