systemd-compat-units.bb 970 B

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