PKGBUILDs/extra/gdm/gdm.install

33 lines
927 B
Text
Raw Normal View History

2009-10-10 02:23:22 +00:00
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 root:gdm /var/lib/gdm > /dev/null
chmod 1770 /var/lib/gdm > /dev/null
gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
}
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
}
post_upgrade() {
post_install
}
post_remove() {
gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
getent passwd gdm || userdel gdm
getent group gdm || groupdel gdm
}