--- sysvinit-2.86-r10.ebuild 2008-01-10 09:06:39.000000000 +0000 +++ sysvinit-2.86-r11.ebuild 2008-11-12 16:17:06.178504017 +0000 @@ -78,8 +78,18 @@ insinto /etc doins "${WORKDIR}"/inittab || die "inittab" + doins "${FILESDIR}"/reboot.sh || die "reboot.sh" + doins "${FILESDIR}"/shutdown.sh || die "shutdown.sh" - doinitd "${FILESDIR}"/{reboot,shutdown}.sh || die + newinitd "${FILESDIR}"/halt.initd halt +} + +pkg_preinst() { + # First time installs add halt to the shutdown runlevel + if [ ! -e "${ROOT}"/etc/init.d/halt ]; then + einfo "Auto adding halt init script to the shutdown runlevel" + ln -sf /etc/init.d/halt "${ROOT}"/etc/runlevels/shutdown + fi } pkg_postinst() {