gdm: shorten post script
This commit is contained in:
parent
0073366f9d
commit
7235fd11ac
35
gdm.spec
35
gdm.spec
@ -97,7 +97,7 @@ install -p -m644 -D %{SOURCE2} %{buildroot}%{_localstatedir}/lib/gdm/.config/pul
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%post
|
%post
|
||||||
custom=/etc/gdm/custom.conf
|
newconffile=/etc/gdm/custom.conf
|
||||||
|
|
||||||
if [ $1 -ge 2 ] ; then
|
if [ $1 -ge 2 ] ; then
|
||||||
if [ -f /usr/share/gdm/config/gdm.conf-custom ]; then
|
if [ -f /usr/share/gdm/config/gdm.conf-custom ]; then
|
||||||
@ -106,35 +106,10 @@ if [ $1 -ge 2 ] ; then
|
|||||||
oldconffile=/etc/X11/gdm/gdm.conf
|
oldconffile=/etc/X11/gdm/gdm.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -n "$oldconffile" ] && sed \
|
if [ -n "$oldconffile" ]; then
|
||||||
-e 's@^command=/usr/X11R6/bin/X@#command=/usr/bin/Xorg@' \
|
sed -e 's@^Greeter=/usr/bin/gdmlogin@Greeter=/usr/libexec/gdmlogin@' $oldconffile > $newconffile
|
||||||
-e 's@^Xnest=/usr/X11R6/bin/Xnest@#Xnest=/usr/X11R6/bin/Xnest@' \
|
sed -e 's@^RemoteGreeter=/usr/bin/gdmgreeter@RemoteGreeter=/usr/libexec/gdmgreeter@' $oldconffile >> $newconffile
|
||||||
-e 's@^BaseXsession=/etc/X11/xdm/Xsession@#BaseXsession=/etc/X11/xinit/Xsession@' \
|
fi
|
||||||
-e 's@^BaseXsession=/etc/X11/gdm/Xsession@#&@' \
|
|
||||||
-e 's@^BaseXsession=/etc/gdm/Xsession@#&@' \
|
|
||||||
-e 's@^Greeter=/usr/bin/gdmgreeter@#Greeter=/usr/libexec/gdmgreeter@' \
|
|
||||||
-e 's@^RemoteGreeter=/usr/bin/gdmlogin@#RemoteGreeter=/usr/libexec/gdmlogin@' \
|
|
||||||
-e 's@^GraphicalTheme=Bluecurve@#&@' \
|
|
||||||
-e 's@^BackgroundColor=#20305a@#&@' \
|
|
||||||
-e 's@^DefaultPath=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin@#&@' \
|
|
||||||
-e 's@^RootPath=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin@#&@' \
|
|
||||||
-e 's@^HostImageDir=/usr/share/hosts/@#HostImageDir=/usr/share/pixmaps/faces/@' \
|
|
||||||
-e 's@^LogDir=/var/log/gdm@#&@' \
|
|
||||||
-e 's@^PostLoginScriptDir=/etc/X11/gdm/PostLogin@#&@' \
|
|
||||||
-e 's@^PreLoginScriptDir=/etc/X11/gdm/PreLogin@#&@' \
|
|
||||||
-e 's@^PreSessionScriptDir=/etc/X11/gdm/PreSession@#&@' \
|
|
||||||
-e 's@^PostSessionScriptDir=/etc/X11/gdm/PostSession@#&@' \
|
|
||||||
-e 's@^DisplayInitDir=/var/run/gdm.pid@#&@' \
|
|
||||||
-e 's@^RebootCommand=/sbin/reboot;/sbin/shutdown -r now;/usr/sbin/shutdown -r now;/usr/bin/reboot@#&@' \
|
|
||||||
-e 's@^HaltCommand=/sbin/poweroff;/sbin/shutdown -h now;/usr/sbin/shutdown -h now;/usr/bin/poweroff@#&@' \
|
|
||||||
-e 's@^ServAuthDir=/var/gdm@#&@' \
|
|
||||||
-e 's@^Greeter=/usr/bin/gdmlogin@Greeter=/usr/libexec/gdmlogin@' \
|
|
||||||
-e 's@^RemoteGreeter=/usr/bin/gdmgreeter@RemoteGreeter=/usr/libexec/gdmgreeter@' \
|
|
||||||
$oldconffile > $custom
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $1 -ge 2 -a -f $custom ] && grep -q /etc/X11/gdm $custom ; then
|
|
||||||
sed -i -e 's@/etc/X11/gdm@/etc/gdm@g' $custom
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%systemd_post gdm.service
|
%systemd_post gdm.service
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user