From f4bf38e765d81eefd69e5d9445db1a41781c25e5 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 16 Sep 2012 15:41:21 +0800 Subject: [PATCH] systemd: We do not want to run the dbus-daemon, do not install the service We have no other dbus users, do not install the dbus.service and dbus.socket by default. It only leads to wasting a bit of ram. --- recipes-fixes/systemd/systemd_sysmocom.inc | 31 ++++++++++++++++++++++ yocto-master/systemd_199.bbappend | 1 + 2 files changed, 32 insertions(+) create mode 100644 recipes-fixes/systemd/systemd_sysmocom.inc create mode 100644 yocto-master/systemd_199.bbappend diff --git a/recipes-fixes/systemd/systemd_sysmocom.inc b/recipes-fixes/systemd/systemd_sysmocom.inc new file mode 100644 index 0000000..771cb54 --- /dev/null +++ b/recipes-fixes/systemd/systemd_sysmocom.inc @@ -0,0 +1,31 @@ +S_THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}" +FILESPATH =. "${@base_set_filespath(["${S_THISDIR}/${PN}"], d)}:" + +PRINC="12" + +# Disable depedency on dbus +RDEPENDS_${PN} = "" + + +# TODO: disable systemd-logind as it needs dbus +SYSTEMD_DISABLED_NATIVE_SERVICES = " \ + systemd-logind \ +" + +pkg_postinst_${PN}_append () { + cd $D${sysconfdir}/init.d + + echo "Disabling the following native services: " + + OPTS="" + + if [ -n "$D" ]; then + OPTS="--root=$D" + fi + + for i in ${SYSTEMD_DISABLED_NATIVE_SERVICES} ; do + if [ \( -e $i -o $i.sh \) -a ! -e $D${sysconfdir}/systemd/system/$i.service ] ; then + echo -n "$i: " ; systemctl ${OPTS} mask $i.service + fi + done ; echo +} diff --git a/yocto-master/systemd_199.bbappend b/yocto-master/systemd_199.bbappend new file mode 100644 index 0000000..9e03591 --- /dev/null +++ b/yocto-master/systemd_199.bbappend @@ -0,0 +1 @@ +require recipes-fixes/${PN}/${PN}_sysmocom.inc