S = "${WORKDIR}/sysvinit-${PV}"
B = "${S}/src"
-inherit update-alternatives
+inherit update-alternatives useradd
DEPENDS_append = " update-rc.d-native"
ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last mesg utmpdump wall"
ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system shutdown"
+
PACKAGES =+ "sysvinit-pidof sysvinit-sulogin"
FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*"
FILES_sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5"
install -m 0755 ${WORKDIR}/bootlogd.init ${D}${sysconfdir}/init.d/bootlogd
ln -sf bootlogd ${D}${sysconfdir}/init.d/stop-bootlogd
- update-rc.d -r ${D} bootlogd start 07 S .
- update-rc.d -r ${D} stop-bootlogd start 99 2 3 4 5 .
+ update-rc.d -r ${D} bootlogd start 07 S .
+ update-rc.d -r ${D} stop-bootlogd start 99 2 3 4 5 .
+
+ chown root.shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
+ chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
}