diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-05-15 18:33:05 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-30 12:04:40 +0100 |
commit | b607fa765826becd7d3d80b2eb57dbb1ef6725e2 (patch) | |
tree | b6d27dcc58c6bc5c0380571dc06da62e2b81f40f /meta/recipes-core | |
parent | b630ee12585610ad4b8d9eabcf2dd6d472d18c3d (diff) | |
download | poky-b607fa765826becd7d3d80b2eb57dbb1ef6725e2.tar.gz |
sysvinit: use new update-alternatives
Also remove postinst and prerm which were not being used.
(From OE-Core rev: 60fd9974e5c9a0576059ebded6de7b599f9574e5)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit/postinst | 17 | ||||
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit/prerm | 9 | ||||
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb | 65 |
3 files changed, 17 insertions, 74 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit/postinst b/meta/recipes-core/sysvinit/sysvinit/postinst deleted file mode 100644 index b6fe547fa4..0000000000 --- a/meta/recipes-core/sysvinit/sysvinit/postinst +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #!/bin/busybox ash | ||
2 | |||
3 | action="$1" | ||
4 | oldversion="$2" | ||
5 | |||
6 | umask 022 | ||
7 | |||
8 | if [ "$action" != configure ] | ||
9 | then | ||
10 | exit 0 | ||
11 | fi | ||
12 | |||
13 | update-alternatives --install /sbin/init init /sbin/sysvinit 25 | ||
14 | update-alternatives --install /sbin/need need /sbin/need.sysvinit 25 | ||
15 | update-alternatives --install /sbin/provide provide /sbin/provide.sysvinit 25 | ||
16 | |||
17 | exit 0 | ||
diff --git a/meta/recipes-core/sysvinit/sysvinit/prerm b/meta/recipes-core/sysvinit/sysvinit/prerm deleted file mode 100644 index 704a29ffd5..0000000000 --- a/meta/recipes-core/sysvinit/sysvinit/prerm +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | if [ "$1" != "upgrade" ]; then | ||
4 | update-alternatives --remove need /sbin/need.sysvinit | ||
5 | update-alternatives --remove provide /sbin/provide.sysvinit | ||
6 | update-alternatives --remove init /sbin/sysvinit | ||
7 | fi | ||
8 | |||
9 | exit 0 | ||
diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb index d3e430c76a..63333b06f4 100644 --- a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb +++ b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb | |||
@@ -5,7 +5,7 @@ SECTION = "base" | |||
5 | LICENSE = "GPLv2+" | 5 | LICENSE = "GPLv2+" |
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ |
7 | file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4" | 7 | file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4" |
8 | PR = "r6" | 8 | PR = "r7" |
9 | 9 | ||
10 | RDEPENDS_${PN} = "${PN}-inittab" | 10 | RDEPENDS_${PN} = "${PN}-inittab" |
11 | 11 | ||
@@ -27,10 +27,22 @@ B = "${S}/src" | |||
27 | 27 | ||
28 | inherit update-alternatives | 28 | inherit update-alternatives |
29 | 29 | ||
30 | ALTERNATIVE_NAME = "init" | 30 | ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last mesg wall" |
31 | ALTERNATIVE_LINK = "${base_sbindir}/init" | 31 | |
32 | ALTERNATIVE_PATH = "${base_sbindir}/init.sysvinit" | 32 | ALTERNATIVE_PRIORITY = "200" |
33 | ALTERNATIVE_PRIORITY = "50" | 33 | |
34 | ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" | ||
35 | ALTERNATIVE_PRIORITY[init] = "50" | ||
36 | |||
37 | ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint" | ||
38 | ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" | ||
39 | ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot" | ||
40 | ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" | ||
41 | ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" | ||
42 | ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" | ||
43 | |||
44 | ALTERNATIVE_${PN}-pidof = "pidof" | ||
45 | ALTERNATIVE_LINK_NAME[pidof] = "${base_bindir}/pidof" | ||
34 | 46 | ||
35 | PACKAGES =+ "sysvinit-pidof sysvinit-sulogin" | 47 | PACKAGES =+ "sysvinit-pidof sysvinit-sulogin" |
36 | FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*" | 48 | FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*" |
@@ -65,47 +77,4 @@ do_install () { | |||
65 | install -d ${D}${sysconfdir}/rc$level.d | 77 | install -d ${D}${sysconfdir}/rc$level.d |
66 | ln -s ../init.d/stop-bootlogd ${D}${sysconfdir}/rc$level.d/S99stop-bootlogd | 78 | ln -s ../init.d/stop-bootlogd ${D}${sysconfdir}/rc$level.d/S99stop-bootlogd |
67 | done | 79 | done |
68 | mv ${D}${base_sbindir}/init ${D}${base_sbindir}/init.${BPN} | ||
69 | mv ${D}${base_bindir}/mountpoint ${D}${base_bindir}/mountpoint.${BPN} | ||
70 | mv ${D}${base_bindir}/pidof ${D}${base_bindir}/pidof.${BPN} | ||
71 | mv ${D}${base_sbindir}/halt ${D}${base_sbindir}/halt.${BPN} | ||
72 | mv ${D}${base_sbindir}/reboot ${D}${base_sbindir}/reboot.${BPN} | ||
73 | mv ${D}${base_sbindir}/runlevel ${D}${base_sbindir}/runlevel.${BPN} | ||
74 | mv ${D}${base_sbindir}/shutdown ${D}${base_sbindir}/shutdown.${BPN} | ||
75 | mv ${D}${base_sbindir}/poweroff ${D}${base_sbindir}/poweroff.${BPN} | ||
76 | mv ${D}${bindir}/last ${D}${bindir}/last.${BPN} | ||
77 | mv ${D}${bindir}/mesg ${D}${bindir}/mesg.${BPN} | ||
78 | mv ${D}${bindir}/wall ${D}${bindir}/wall.${BPN} | ||
79 | } | ||
80 | |||
81 | pkg_postinst_${PN} () { | ||
82 | update-alternatives --install ${base_bindir}/mountpoint mountpoint mountpoint.${BPN} 200 | ||
83 | update-alternatives --install ${base_sbindir}/halt halt halt.${BPN} 200 | ||
84 | update-alternatives --install ${base_sbindir}/reboot reboot reboot.${BPN} 200 | ||
85 | update-alternatives --install ${base_sbindir}/runlevel runlevel runlevel.${BPN} 200 | ||
86 | update-alternatives --install ${base_sbindir}/shutdown shutdown shutdown.${BPN} 200 | ||
87 | update-alternatives --install ${base_sbindir}/poweroff poweroff poweroff.${BPN} 200 | ||
88 | update-alternatives --install ${bindir}/last last last.${BPN} 200 | ||
89 | update-alternatives --install ${bindir}/mesg mesg mesg.${BPN} 200 | ||
90 | update-alternatives --install ${bindir}/wall wall wall.${BPN} 200 | ||
91 | } | ||
92 | |||
93 | pkg_prerm_${PN} () { | ||
94 | update-alternatives --remove mountpoint mountpoint.${BPN} | ||
95 | update-alternatives --remove halt halt.${BPN} | ||
96 | update-alternatives --remove reboot reboot.${BPN} | ||
97 | update-alternatives --remove runlevel runlevel.${BPN} | ||
98 | update-alternatives --remove shutdown shutdown.${BPN} | ||
99 | update-alternatives --remove poweroff poweroff.${BPN} | ||
100 | update-alternatives --remove last last.${BPN} | ||
101 | update-alternatives --remove mesg mesg.${BPN} | ||
102 | update-alternatives --remove wall wall.${BPN} | ||
103 | } | ||
104 | |||
105 | pkg_postinst_sysvinit-pidof () { | ||
106 | update-alternatives --install ${base_bindir}/pidof pidof pidof.${BPN} 200 | ||
107 | } | ||
108 | |||
109 | pkg_prerm_sysvinit-pidof () { | ||
110 | update-alternatives --remove pidof pidof.${BPN} | ||
111 | } | 80 | } |