#!/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