summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb')
-rw-r--r--meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb97
1 files changed, 97 insertions, 0 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
new file mode 100644
index 0000000..c06eac4
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
@@ -0,0 +1,97 @@
1SUMMARY = "System-V like init"
2DESCRIPTION = "This package is required to boot in most configurations. It provides the /sbin/init program. This is the first process started on boot, and the last process terminated before the system halts."
3HOMEPAGE = "http://savannah.nongnu.org/projects/sysvinit/"
4SECTION = "base"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
7 file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4"
8PR = "r11"
9
10RDEPENDS_${PN} = "${PN}-inittab"
11
12SRC_URI = "http://download.savannah.gnu.org/releases-noredirect/sysvinit/sysvinit-${PV}.tar.bz2 \
13 file://install.patch \
14 file://crypt-lib.patch \
15 file://pidof-add-m-option.patch \
16 file://rcS-default \
17 file://rc \
18 file://rcS \
19 file://bootlogd.init"
20
21SRC_URI[md5sum] = "6eda8a97b86e0a6f59dabbf25202aa6f"
22SRC_URI[sha256sum] = "60bbc8c1e1792056e23761d22960b30bb13eccc2cabff8c7310a01f4d5df1519"
23
24S = "${WORKDIR}/sysvinit-${PV}"
25B = "${S}/src"
26
27inherit update-alternatives
28DEPENDS_append = " update-rc.d-native base-passwd"
29
30ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last mesg utmpdump wall"
31
32ALTERNATIVE_PRIORITY = "200"
33
34ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
35ALTERNATIVE_PRIORITY[init] = "50"
36
37ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint"
38ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
39ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
40ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
41ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
42ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
43
44ALTERNATIVE_${PN}-pidof = "pidof"
45ALTERNATIVE_LINK_NAME[pidof] = "${base_bindir}/pidof"
46
47ALTERNATIVE_${PN}-sulogin = "sulogin"
48ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
49
50ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 mesg.1 wall.1 sulogin.8 utmpdump.1"
51
52ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1"
53ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1"
54ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1"
55ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8"
56ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
57ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
58
59PACKAGES =+ "sysvinit-pidof sysvinit-sulogin"
60FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*"
61FILES_sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5"
62FILES_sysvinit-sulogin = "${base_sbindir}/sulogin.sysvinit"
63
64RDEPENDS_${PN} += "sysvinit-pidof initscripts-functions"
65
66CFLAGS_prepend = "-D_GNU_SOURCE "
67export LCRYPT = "-lcrypt"
68EXTRA_OEMAKE += "'base_bindir=${base_bindir}' \
69 'base_sbindir=${base_sbindir}' \
70 'bindir=${bindir}' \
71 'sbindir=${sbindir}' \
72 'sysconfdir=${sysconfdir}' \
73 'includedir=${includedir}' \
74 'mandir=${mandir}'"
75
76do_install () {
77 oe_runmake 'ROOT=${D}' install
78
79 install -d ${D}${sysconfdir} \
80 ${D}${sysconfdir}/default \
81 ${D}${sysconfdir}/init.d
82 for level in S 0 1 2 3 4 5 6; do
83 install -d ${D}${sysconfdir}/rc$level.d
84 done
85
86 install -m 0644 ${WORKDIR}/rcS-default ${D}${sysconfdir}/default/rcS
87 install -m 0755 ${WORKDIR}/rc ${D}${sysconfdir}/init.d
88 install -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d
89 install -m 0755 ${WORKDIR}/bootlogd.init ${D}${sysconfdir}/init.d/bootlogd
90 ln -sf bootlogd ${D}${sysconfdir}/init.d/stop-bootlogd
91
92 update-rc.d -r ${D} bootlogd start 07 S .
93 update-rc.d -r ${D} stop-bootlogd start 99 2 3 4 5 .
94
95 chown root.shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
96 chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
97}