osmo-*: Fix systemd services to run against old systemd

Change-Id: I821249615c7bc593cd5a68b1a9c48fe787016e87
Related: SYS#6340
diff --git a/recipes-osmocom/osmo-hlr/osmo-hlr.inc b/recipes-osmocom/osmo-hlr/osmo-hlr.inc
index c270746..4229e7b 100644
--- a/recipes-osmocom/osmo-hlr/osmo-hlr.inc
+++ b/recipes-osmocom/osmo-hlr/osmo-hlr.inc
@@ -5,7 +5,7 @@
 
 DEPENDS = "libtalloc libosmocore libosmo-abis sqlite3 sqlite3-native"
 
-INC_PR="r2.${META_TELEPHONY_OSMO_INC}"
+INC_PR="r3.${META_TELEPHONY_OSMO_INC}"
 
 inherit autotools pkgconfig systemd
 
@@ -17,6 +17,10 @@
 do_install_append() {
 	install -d ${D}${localstatedir}/lib/osmocom/
 	install -m 0644 ${WORKDIR}/hlr.db ${D}${localstatedir}/lib/osmocom/hlr.db
+
+	# StateDirectory requires systemd >= v235, but poky pyro ships with v232 (SYS#6340):
+	sed -i '/^StateDirectory=/d' "${D}${systemd_system_unitdir}/${PN}.service"
+	sed -i '/^WorkingDirectory=/d' "${D}${systemd_system_unitdir}/${PN}.service"
 }
 
 PACKAGECONFIG ??= "\