summaryrefslogtreecommitdiff
path: root/extra/gdm/gdm.install
blob: 6cd981d770eecf13ced10354b6f5d5e0f6b21d7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
pkgname=gdm

post_install() {
  getent group gdm >/dev/null 2>&1 || groupadd -g 120 gdm
  getent passwd gdm > /dev/null 2>&1 || usr/sbin/useradd -c 'Gnome Display Manager' -u 120 -g gdm -d /var/lib/gdm -s /sbin/nologin gdm
  passwd -l gdm > /dev/null
  chown -R gdm:gdm /var/lib/gdm > /dev/null

  gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
  gconfpkg --install ${pkgname}
}

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
}