diff options
author | root <root@rshg047.dnsready.net> | 2011-04-08 04:18:44 +0000 |
---|---|---|
committer | root <root@rshg047.dnsready.net> | 2011-04-08 04:18:44 +0000 |
commit | 59075f0265483f32e9ac4c67ba9e69cb019ba044 (patch) | |
tree | d0384b724b17b888dcd1cf06dce9bc25655d1ba1 /testing/gdm/gdm.install | |
parent | 3b216f42d91b33161572550f4556a9ba93d1cecb (diff) |
Fri Apr 8 04:18:44 UTC 2011
Diffstat (limited to 'testing/gdm/gdm.install')
-rw-r--r-- | testing/gdm/gdm.install | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/testing/gdm/gdm.install b/testing/gdm/gdm.install new file mode 100644 index 000000000..c2b5e375e --- /dev/null +++ b/testing/gdm/gdm.install @@ -0,0 +1,44 @@ +pkgname=gdm + +post_install() { + getent group gdm >/dev/null 2>&1 || groupadd -g 120 gdm + if getent passwd gdm > /dev/null 2>&1; then + usr/sbin/usermod -d /var/lib/gdm -c 'Gnome Display Manager' -s /sbin/nologin gdm > /dev/null 2>&1 + else + usr/sbin/useradd -c 'Gnome Display Manager' -u 120 -g gdm -d /var/lib/gdm -s /sbin/nologin gdm + fi + passwd -l gdm > /dev/null + chown gdm:gdm /var/lib/gdm > /dev/null + chown -R gdm:gdm /var/lib/gdm/.gconf.mandatory + + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + gconfpkg --install ${pkgname} +} + +pre_upgrade() { + if [ -f opt/gnome/etc/gdm/custom.conf ]; then + mkdir -p etc/gdm + sed -e 's|/opt/gnome/libexec|usr/lib/gdm|g' \ + -e 's|/opt/gnome/etc|/etc|g' \ + -e 's|/opt/gnome/|/usr/|g' \ + opt/gnome/etc/gdm/custom.conf > etc/gdm/custom.conf + mv opt/gnome/etc/gdm/custom.conf opt/gnome/etc/gdm/custom.conf.pacsave + fi + pre_remove +} + +pre_remove() { + if [ -f usr/share/gconf/schemas/${pkgname}.schemas ]; then + gconfpkg --uninstall ${pkgname} + fi +} + +post_upgrade() { + post_install +} + +post_remove() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + getent passwd gdm >/dev/null 2>&1 && userdel gdm + getent group gdm >/dev/null 2>&1 && groupdel gdm +} |