mambawelcome: systemd support
This commit is contained in:
parent
d96f76cfb0
commit
6d6e72bc35
8
Makefile
8
Makefile
@ -68,6 +68,7 @@ xdg_appsdir = ${datadir}/applications
|
||||
xdg_directorydir = ${datadir}/desktop-directories
|
||||
xdg_menudir = ${sysconfdir}/xdg/menus
|
||||
xdg_mergedmenudir = $(xdg_menudir)/applications-merged
|
||||
systemdsystemdir = /lib/systemd/system
|
||||
|
||||
distrorootdir = ${datadir}/$(DISTROid)
|
||||
distrobindir = ${distrorootdir}/bin
|
||||
@ -257,17 +258,18 @@ endif
|
||||
install-mambawelcome:
|
||||
ifeq ($(WITHKDE3TOOLS),1)
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(mambawelcomedatadir)
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/rc.d/{init.d,rc5.d}
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(kdeconfigdir)
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(systemdsystemdir)
|
||||
$(INSTALL_SCRIPT) mambawelcome/mambawelcome.kmdr $(DESTDIR)$(mambawelcomedatadir)
|
||||
$(INSTALL_SCRIPT) mambawelcome/mambawelcome.sh $(DESTDIR)$(mambawelcomedatadir)
|
||||
$(INSTALL_SCRIPT) mambawelcome/mambawelcome-init $(DESTDIR)$(sysconfdir)/rc.d/init.d/mambawelcome
|
||||
$(INSTALL_SCRIPT) mambawelcome/mambawelcome-init $(DESTDIR)$(mambawelcomedatadir)/mambawelcome
|
||||
$(INSTALL_DATA) gpl.html $(DESTDIR)$(mambawelcomedatadir)/gpl.html
|
||||
$(INSTALL_DATA) gpl-it.html $(DESTDIR)$(mambawelcomedatadir)/gpl-it.html
|
||||
$(INSTALL_DATA) gpl-es.html $(DESTDIR)$(mambawelcomedatadir)/gpl-es.html
|
||||
$(INSTALL_DATA) kde/config/kcmfonts $(DESTDIR)$(kdeconfigdir)/kcmfonts
|
||||
$(INSTALL_DATA) kde/config/kdeglobals $(DESTDIR)$(kdeconfigdir)/kdeglobals
|
||||
ln -s ../init.d/mambawelcome $(DESTDIR)$(sysconfdir)/rc.d/rc5.d/S99mambawelcome
|
||||
$(INSTALL_DATA) mambawelcome/mambawelcome.service $(DESTDIR)$(systemdsystemdir)/mambawelcome.service
|
||||
$(INSTALL_DATA) mambawelcome/mambawelcome.target $(DESTDIR)$(systemdsystemdir)/mambawelcome.target
|
||||
endif
|
||||
|
||||
install-xramdr:
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# mambawelcome - start mambawelcome on first time system execution
|
||||
# Copyright (c) 2007-2009 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (c) 2007-2013 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
|
||||
if [ $UID != 0 ]; then
|
||||
echo "$0: must be superuser." >&2
|
||||
@ -29,9 +29,12 @@ xinit /opt/kde3/bin/kmdr-executor /usr/share/openmamba/mambawelcome/mambawelcome
|
||||
#/opt/kde3/bin/dcopserver_shutdown
|
||||
killall -9 dcopserver
|
||||
|
||||
[ -e /root/.mambawelcome-not-completed ] && {
|
||||
if [ -e /root/.mambawelcome-not-completed ]; then
|
||||
rm -f /root/.mambawelcome-not-completed
|
||||
halt
|
||||
}
|
||||
poweroff
|
||||
else
|
||||
systemctl disable mambawelcome.target
|
||||
systemctl isolate graphical.target
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
12
mambawelcome/mambawelcome.service
Normal file
12
mambawelcome/mambawelcome.service
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=openmamba 2nd stage installation welcome dialog
|
||||
Conflicts=getty@tty1.service
|
||||
After=systemd-user-sessions.service getty@tty1.service plymouth-quit.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/share/openmamba/mambawelcome/mambawelcome
|
||||
Restart=always
|
||||
IgnoreSIGPIPE=no
|
||||
|
||||
[Install]
|
||||
WantedBy=mambawelcome.target
|
17
mambawelcome/mambawelcome.target
Normal file
17
mambawelcome/mambawelcome.target
Normal file
@ -0,0 +1,17 @@
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
[Unit]
|
||||
Description=Mambawelcome 2nd stage install target
|
||||
Documentation=man:systemd.special(7)
|
||||
Requires=multi-user.target
|
||||
After=multi-user.target
|
||||
Conflicts=rescue.target
|
||||
AllowIsolate=yes
|
||||
|
||||
[Install]
|
||||
Alias=default.target
|
Loading…
Reference in New Issue
Block a user