avatar
akdengi has added e5ec0343a5
Merge pull request #2 from akdengi/kdebase4-workspace:rosa2012.1 Add...

... systemd support for KDM

view file @ e5ec0343a5
... ... --- a/kdebase4-workspace.spec
... ... +++ b/kdebase4-workspace.spec
... ... @@ -11,7 +11,7 @@
11 11
Name:		kdebase4-workspace
12 12
Summary:	KDE 4 application workspace components
13 13
Version:	4.9.5
14
Release:	3
14
Release:	9
15 15
Epoch:		2
16 16
Group:		Graphical desktop/KDE
17 17
License:	GPL
... ... @@ -1366,9 +1366,15 @@ KDE Desktop Login Manager.
1366 1366
1367 1367
%post -n kdm
1368 1368
chksession -K
1369
/bin/systemctl enable kdm.service 2>&1 || :
1370
1371
%preun -n kdm
1372
 /bin/systemctl disable kdm.service 2>&1 || :
1373
1369 1374
1370 1375
%postun -n kdm
1371 1376
chksession -K
1377
/bin/systemctl daemon-reload 2>&1 || :
1372 1378
1373 1379
%files -n kdm
1374 1380
%config(noreplace) %{_sysconfdir}/pam.d/kde
... ... @@ -1400,6 +1406,7 @@ chksession -K
1406 1406
%{_kde_libdir}/kde4/libexec/backlighthelper
1407 1407
%{_kde_datadir}/dbus-1/system-services/org.kde.powerdevil.backlighthelper.service
1408 1408
%{_kde_datadir}/polkit-1/actions/org.kde.powerdevil.backlighthelper.policy
1409
%{_unitdir}/kdm.service
1409 1410
%attr(0775,root,root) %dir %{_localstatedir}/spool/gdm
1410 1411
%attr(0770, root, root) %dir %{_localstatedir}/lib/kdm
1411 1412
... ... @@ -1556,6 +1563,29 @@ SCRIPT:
1563 1563
exec %{_kde_bindir}/startkde
1564 1564
EOF
1565 1565
1566
#systemd implimentation
1567
install -d -m 0775 %{buildroot}/%{_unitdir}
1568
cat << EOF > %{buildroot}/%{_unitdir}/kdm.service
1569
[Unit]
1570
Description=K Display Manager
1571
After=livesys-late.service systemd-user-sessions.service
1572
1573
# On mandriva gdm/X11 is on tty1. We explicitly cancel the getty here to
1574
# avoid any races around that.
1575
# Do not stop plymouth, it is done in prefdm if required (or left to the dm)
1576
Conflicts=getty@tty1.service plymouth-quit.service
1577
After=getty@tty1.service plymouth-quit.service
1578
1579
[Service]
1580
ExecStart=/usr/bin/kdm -nodaemon
1581
Restart=always
1582
RestartSec=0
1583
IgnoreSIGPIPE=no
1584
1585
[Install]
1586
Alias=display-manager.service
1587
EOF
1588
1566 1589
# Env entry for start kde4
1567 1590
install -d -m 0755 %{buildroot}/etc/profile.d
1568 1591
... ... @@ -1590,6 +1620,8 @@ nocompress
1620 1620
}
1621 1621
EOF
1622 1622
1623
1624
1623 1625
# We use our desktop files. Write over is a better decision than a patch that breaks most of the times
1624 1626
cp -f %{SOURCE4} %{buildroot}%{_kde_applicationsdir}/
1625 1627

Comments