SHA256
1
0
forked from pool/gdm
gdm/SuSEconfig.gdm
Vincent Untz c1cb311d64 Accepting request 29924 from home:vuntz:branches:GNOME:Factory
Copy from home:vuntz:branches:GNOME:Factory/gdm via accept of submit request 29924 revision 5.
Request was accepted with message:
Forwarding to openSUSE:Factory

OBS-URL: https://build.opensuse.org/request/show/29924
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gdm?expand=0&rev=112
2010-01-18 03:10:55 +00:00

30 lines
979 B
Bash

#!/bin/bash
#
# Copyright (c) 2004-2006 SuSE
# Author: Stanislav Brabec <sbrabec@suse.cz>
type -p cmp &> /dev/null || {
echo "${0##*/}: No cmp in PATH ... skipping"
exit 0
}
r=$ROOT
DISPLAYMANAGER_PASSWORD_LESS_LOGIN="no"
test -f $r/etc/sysconfig/displaymanager || {
echo "${0##*/}: No $r/etc/sysconfig/displaymanager found."
exit 1
}
. $r/etc/sysconfig/displaymanager
# Password-less login is implemented by PAM. Do the required change.
if [ "$DISPLAYMANAGER_PASSWORD_LESS_LOGIN" = "yes" ] ; then
sed 's/^\(auth[[:space:]][[:space:]]*\)include[[:space:]]\([[:space:]]*\)common-auth/\1required\2pam_permit.so/' <$r/etc/pam.d/gdm >$r/etc/pam.d/gdm.new
else
sed 's/^\(auth[[:space:]][[:space:]]*\)required\([[:space:]][[:space:]]*\)pam_permit\.so/\1include \2common-auth/' <$r/etc/pam.d/gdm >$r/etc/pam.d/gdm.new
fi
if cmp -s $r/etc/pam.d/gdm $r/etc/pam.d/gdm.new ; then
rm $r/etc/pam.d/gdm.new
else
mv $r/etc/pam.d/gdm.new $r/etc/pam.d/gdm
fi