systemd-compat-units.bb 847 B

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