diff options
| -rw-r--r-- | meta/recipes-core/systemd/systemd_199.bb | 36 |
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 | ||
| 17 | SECTION = "base/shell" | 17 | SECTION = "base/shell" |
| 18 | 18 | ||
| 19 | inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d | 19 | inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives |
| 20 | 20 | ||
| 21 | SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \ | 21 | SRC_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 | ||
| 254 | pkg_postinst_systemd () { | 254 | ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff" |
| 255 | update-alternatives --install ${base_sbindir}/init init ${systemd_unitdir}/systemd 300 | ||
| 256 | update-alternatives --install ${base_sbindir}/halt halt ${base_bindir}/systemctl 300 | ||
| 257 | update-alternatives --install ${base_sbindir}/reboot reboot ${base_bindir}/systemctl 300 | ||
| 258 | update-alternatives --install ${base_sbindir}/shutdown shutdown ${base_bindir}/systemctl 300 | ||
| 259 | update-alternatives --install ${base_sbindir}/poweroff poweroff ${base_bindir}/systemctl 300 | ||
| 260 | } | ||
| 261 | 255 | ||
| 262 | pkg_prerm_systemd () { | 256 | ALTERNATIVE_TARGET[init] = "${systemd_unitdir}/systemd" |
| 263 | update-alternatives --remove init ${systemd_unitdir}/systemd | 257 | ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" |
| 264 | update-alternatives --remove halt ${base_bindir}/systemctl | 258 | ALTERNATIVE_PRIORITY[init] ?= "300" |
| 265 | update-alternatives --remove reboot ${base_bindir}/systemctl | 259 | |
| 266 | update-alternatives --remove shutdown ${base_bindir}/systemctl | 260 | ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl" |
| 267 | update-alternatives --remove poweroff ${base_bindir}/systemctl | 261 | ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" |
| 268 | } | 262 | ALTERNATIVE_PRIORITY[halt] ?= "300" |
| 263 | |||
| 264 | ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl" | ||
| 265 | ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot" | ||
| 266 | ALTERNATIVE_PRIORITY[reboot] ?= "300" | ||
| 267 | |||
| 268 | ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl" | ||
| 269 | ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" | ||
| 270 | ALTERNATIVE_PRIORITY[shutdown] ?= "300" | ||
| 271 | |||
| 272 | ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl" | ||
| 273 | ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" | ||
| 274 | ALTERNATIVE_PRIORITY[poweroff] ?= "300" | ||
| 269 | 275 | ||
| 270 | pkg_postinst_udev-hwdb () { | 276 | pkg_postinst_udev-hwdb () { |
| 271 | if test -n "$D"; then | 277 | if test -n "$D"; then |
