summaryrefslogtreecommitdiff
path: root/packages/gnome/gdm_2.24.1.bb
diff options
context:
space:
mode:
Diffstat (limited to 'packages/gnome/gdm_2.24.1.bb')
-rw-r--r--packages/gnome/gdm_2.24.1.bb42
1 files changed, 40 insertions, 2 deletions
diff --git a/packages/gnome/gdm_2.24.1.bb b/packages/gnome/gdm_2.24.1.bb
index 24e36f5a11..cdca2f87ae 100644
--- a/packages/gnome/gdm_2.24.1.bb
+++ b/packages/gnome/gdm_2.24.1.bb
@@ -3,18 +3,56 @@ LICENSE = "GPL"
DEPENDS = "libpam gnome-doc-utils gtk+ libglade libgnomecanvas librsvg libxml2 libart-lgpl"
-inherit gnome
+PR = "r1"
-SRC_URI += "file://%gconf-tree.xml"
+inherit gnome update-rc.d
+
+SRC_URI += "file://%gconf-tree.xml \
+ file://gdm.conf \
+ file://gdm \
+ "
do_install_prepend() {
mkdir -p ${D}/var/lib/gdm/.gconf.mandatory
cp ${WORKDIR}/%gconf-tree.xml ${D}/var/lib/gdm/.gconf.mandatory/
+ install -d ${D}/${sysconfdir}/gdm
+ install -m 0644 ${WORKDIR}/gdm.conf ${D}/${sysconfdir}/gdm/
+ install -d ${D}/${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/gdm ${D}/${sysconfdir}/init.d/
}
FILES_${PN} += "${datadir}/icon* \
${datadir}/xsession*"
+CONFFILES_${PN} += "${sysconfdir}/gdm/gdm.conf ${sysconfdir}/init.d/gdm"
+
+INITSCRIPT_NAME = "gdm"
+INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
+
+pkg_postinst_${PN} () {
+ # can't do this offline
+ if [ "x$D" != "x" ]; then
+ exit 1
+ fi
+ grep "^gdm:" /etc/group > /dev/null || addgroup gdm
+ grep "^gdm:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/lib/gdm gdm --ingroup gdm -g gdm
+
+if [ -d /var/lib/gdm ]; then
+ chown -R gdm:gdm /var/lib/gdm
+ chmod 0750 /var/lib/gdm
+fi
+
+# Register up as default dm
+mkdir -p ${sysconfdir}/X11/
+echo "${bindir}/gdm" > ${sysconfdir}/X11/default-display-manager
+
+}
+
+pkg_postrm_${PN} () {
+ deluser gdm || true
+ delgroup gdm || true
+ sed -i /gdm/d ${sysconfdir}/X11/default-display-manager || true
+}