Patchwork [2/3] gdm: do not hardcode /usr/sbin

login
register
mail settings
Submitter Andreas Müller
Date Sept. 3, 2012, 6:54 a.m.
Message ID <1346655278-3462-2-git-send-email-schnitzeltony@googlemail.com>
Download mbox | patch
Permalink /patch/35649/
State Superseded
Headers show

Comments

Andreas Müller - Sept. 3, 2012, 6:54 a.m.
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 .../gdm/gdm/{gdm.service => gdm.service.in}        |    2 +-
 .../recipes-gnome/gdm/gdm_2.32.2.bbappend          |   11 ++++++++---
 2 files changed, 9 insertions(+), 4 deletions(-)
 rename meta-systemd/meta-gnome/recipes-gnome/gdm/gdm/{gdm.service => gdm.service.in} (81%)

Patch

diff --git a/meta-systemd/meta-gnome/recipes-gnome/gdm/gdm/gdm.service b/meta-systemd/meta-gnome/recipes-gnome/gdm/gdm/gdm.service.in
similarity index 81%
rename from meta-systemd/meta-gnome/recipes-gnome/gdm/gdm/gdm.service
rename to meta-systemd/meta-gnome/recipes-gnome/gdm/gdm/gdm.service.in
index 0f94e0c..3e1556a 100644
--- a/meta-systemd/meta-gnome/recipes-gnome/gdm/gdm/gdm.service
+++ b/meta-systemd/meta-gnome/recipes-gnome/gdm/gdm/gdm.service.in
@@ -3,7 +3,7 @@  Description=Gnome Display Manager
 After=systemd-user-sessions.service
 
 [Service]
-ExecStart=/usr/sbin/gdm -nodaemon
+ExecStart=%sbindir%/gdm -nodaemon
 StandardOutput=syslog
 
 [Install]
diff --git a/meta-systemd/meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bbappend b/meta-systemd/meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bbappend
index 496a276..45b47c3 100644
--- a/meta-systemd/meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bbappend
+++ b/meta-systemd/meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bbappend
@@ -5,9 +5,14 @@  PRINC := "${@int(PRINC) + 3}"
 
 inherit systemd
 
-SRC_URI += " \
-            file://gdm.service \
-           "
+SRC_URI += "file://gdm.service.in"
+
+do_install_append() {
+	install -d ${D}${systemd_unitdir}/system
+	sed -e 's,%sbindir%,${sbindir},g' \
+		< ${WORKDIR}/gdm.service.in \
+		> ${D}${systemd_unitdir}/system/gdm.service
+}
 
 SYSTEMD_PACKAGES = "${PN}-systemd"
 SYSTEMD_SERVICE = "gdm.service"