systemd-compat-units.bb 913 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. SUMMARY = "Enhances systemd compatilibity with existing SysVinit scripts"
  2. HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
  3. LICENSE = "MIT"
  4. PR = "r29"
  5. PACKAGE_WRITE_DEPS += "systemd-systemctl-native"
  6. S = "${WORKDIR}"
  7. inherit features_check
  8. ALLOW_EMPTY_${PN} = "1"
  9. REQUIRED_DISTRO_FEATURES = "systemd"
  10. SYSTEMD_DISABLED_SYSV_SERVICES = " \
  11. busybox-udhcpc \
  12. hwclock \
  13. networking \
  14. nfsserver \
  15. nfscommon \
  16. syslog.busybox \
  17. "
  18. pkg_postinst_${PN} () {
  19. cd $D${sysconfdir}/init.d || exit 0
  20. echo "Disabling the following sysv scripts: "
  21. if [ -n "$D" ]; then
  22. OPTS="--root=$D"
  23. else
  24. OPTS=""
  25. fi
  26. for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do
  27. if [ -e $i -o -e $i.sh ] && ! [ -e $D${sysconfdir}/systemd/system/$i.service -o -e $D${systemd_unitdir}/system/$i.service ] ; then
  28. echo -n "$i: "
  29. systemctl $OPTS mask $i.service
  30. fi
  31. done
  32. echo
  33. }
  34. RDEPENDS_${PN} = "systemd"