* Re-wrote/cleaned up init scripts * Re-wrote init-functions * Moved some things (init scripts, defaults, configs) to other packages * Added update-rc which manages /etc/rc* directories * Added usher to manage defaults
38 lines
695 B
Bash
Executable File
38 lines
695 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
case $1 in
|
|
preinst)
|
|
exit 0
|
|
;;
|
|
postinst)
|
|
if [[ ${TARGET} ]]; then
|
|
chroot ${TARGET} 'update-rc required'
|
|
else
|
|
update-rc required
|
|
fi
|
|
|
|
if [ ! -f ${TARGET}/etc/modules.conf ]; then
|
|
cp ${TARGET}/usr/share/initscripts/modules.conf \
|
|
${TARGET}/etc/modules.conf
|
|
fi
|
|
|
|
if [ ! -f ${TARGET}/etc/default/halt ]; then
|
|
cp ${TARGET}/usr/share/initscripts/halt.default \
|
|
${TARGET}/etc/default/halt
|
|
fi
|
|
|
|
if [ ! -f ${TARGET}/etc/default/rcS ]; then
|
|
cp ${TARGET}/usr/share/initscripts/rcS.default \
|
|
${TARGET}/etc/default/rcS
|
|
fi
|
|
;;
|
|
prerm)
|
|
exit 0
|
|
;;
|
|
postrm)
|
|
exit 0
|
|
;;
|
|
esac
|