systemd-compat-units.bb 1013 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 = "${UNPACKDIR}"
  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_ontarget:${PN} () {
  20. test -d $D${sysconfdir}/init.d || exit 0
  21. cd $D${sysconfdir}/init.d
  22. echo "Disabling the following sysv scripts: "
  23. if [ -n "$D" ]; then
  24. OPTS="--root=$D"
  25. else
  26. OPTS=""
  27. fi
  28. for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do
  29. if [ -e $i -o -e $i.sh ] && ! [ -e $D${sysconfdir}/systemd/system/$i.service -o -e $D${systemd_system_unitdir}/$i.service ] ; then
  30. echo -n "$i: "
  31. systemctl $OPTS mask $i.service
  32. fi
  33. done
  34. echo
  35. }
  36. RDEPENDS:${PN} = "systemd"