summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd
diff options
context:
space:
mode:
authorRadu Moisan <radu.moisan@intel.com>2013-04-09 17:02:23 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-10 13:14:08 +0100
commite33e0a0da6fd6f59e5e8244da9f23b590cf066e1 (patch)
tree61bd967cc635b981a370e97b7fdfe175e72c241c /meta/recipes-core/systemd
parent05d4f94c25b14ca99a1df01030edc00125f95405 (diff)
downloadpoky-e33e0a0da6fd6f59e5e8244da9f23b590cf066e1.tar.gz
systemd: use update-alternatives.bbclass
switch from using plain update-alternatives command to update-alternatives.bbclass style (From OE-Core rev: 6e86da976d296b926b462e976d1f79f524f061b3) Signed-off-by: Radu Moisan <radu.moisan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd')
-rw-r--r--meta/recipes-core/systemd/systemd_199.bb36
1 files changed, 21 insertions, 15 deletions
diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_199.bb
index 2464b83e1f..354e55733c 100644
--- a/meta/recipes-core/systemd/systemd_199.bb
+++ b/meta/recipes-core/systemd/systemd_199.bb
@@ -16,7 +16,7 @@ DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
16 16
17SECTION = "base/shell" 17SECTION = "base/shell"
18 18
19inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d 19inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives
20 20
21SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \ 21SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
22 file://touchscreen.rules \ 22 file://touchscreen.rules \
@@ -251,21 +251,27 @@ python __anonymous() {
251# TODO: 251# TODO:
252# u-a for runlevel and telinit 252# u-a for runlevel and telinit
253 253
254pkg_postinst_systemd () { 254ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff"
255update-alternatives --install ${base_sbindir}/init init ${systemd_unitdir}/systemd 300
256update-alternatives --install ${base_sbindir}/halt halt ${base_bindir}/systemctl 300
257update-alternatives --install ${base_sbindir}/reboot reboot ${base_bindir}/systemctl 300
258update-alternatives --install ${base_sbindir}/shutdown shutdown ${base_bindir}/systemctl 300
259update-alternatives --install ${base_sbindir}/poweroff poweroff ${base_bindir}/systemctl 300
260}
261 255
262pkg_prerm_systemd () { 256ALTERNATIVE_TARGET[init] = "${systemd_unitdir}/systemd"
263update-alternatives --remove init ${systemd_unitdir}/systemd 257ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
264update-alternatives --remove halt ${base_bindir}/systemctl 258ALTERNATIVE_PRIORITY[init] ?= "300"
265update-alternatives --remove reboot ${base_bindir}/systemctl 259
266update-alternatives --remove shutdown ${base_bindir}/systemctl 260ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
267update-alternatives --remove poweroff ${base_bindir}/systemctl 261ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
268} 262ALTERNATIVE_PRIORITY[halt] ?= "300"
263
264ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
265ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
266ALTERNATIVE_PRIORITY[reboot] ?= "300"
267
268ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
269ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
270ALTERNATIVE_PRIORITY[shutdown] ?= "300"
271
272ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
273ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
274ALTERNATIVE_PRIORITY[poweroff] ?= "300"
269 275
270pkg_postinst_udev-hwdb () { 276pkg_postinst_udev-hwdb () {
271 if test -n "$D"; then 277 if test -n "$D"; then