mambawelcome: systemd support

This commit is contained in:
Silvan Calarco 2013-06-28 23:15:37 +02:00
parent d96f76cfb0
commit 6d6e72bc35
4 changed files with 41 additions and 7 deletions

View File

@ -68,6 +68,7 @@ xdg_appsdir = ${datadir}/applications
xdg_directorydir = ${datadir}/desktop-directories xdg_directorydir = ${datadir}/desktop-directories
xdg_menudir = ${sysconfdir}/xdg/menus xdg_menudir = ${sysconfdir}/xdg/menus
xdg_mergedmenudir = $(xdg_menudir)/applications-merged xdg_mergedmenudir = $(xdg_menudir)/applications-merged
systemdsystemdir = /lib/systemd/system
distrorootdir = ${datadir}/$(DISTROid) distrorootdir = ${datadir}/$(DISTROid)
distrobindir = ${distrorootdir}/bin distrobindir = ${distrorootdir}/bin
@ -257,17 +258,18 @@ endif
install-mambawelcome: install-mambawelcome:
ifeq ($(WITHKDE3TOOLS),1) ifeq ($(WITHKDE3TOOLS),1)
@$(INSTALL_DIR) $(DESTDIR)$(mambawelcomedatadir) @$(INSTALL_DIR) $(DESTDIR)$(mambawelcomedatadir)
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/rc.d/{init.d,rc5.d}
@$(INSTALL_DIR) $(DESTDIR)$(kdeconfigdir) @$(INSTALL_DIR) $(DESTDIR)$(kdeconfigdir)
@$(INSTALL_DIR) $(DESTDIR)$(systemdsystemdir)
$(INSTALL_SCRIPT) mambawelcome/mambawelcome.kmdr $(DESTDIR)$(mambawelcomedatadir) $(INSTALL_SCRIPT) mambawelcome/mambawelcome.kmdr $(DESTDIR)$(mambawelcomedatadir)
$(INSTALL_SCRIPT) mambawelcome/mambawelcome.sh $(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.html $(DESTDIR)$(mambawelcomedatadir)/gpl.html
$(INSTALL_DATA) gpl-it.html $(DESTDIR)$(mambawelcomedatadir)/gpl-it.html $(INSTALL_DATA) gpl-it.html $(DESTDIR)$(mambawelcomedatadir)/gpl-it.html
$(INSTALL_DATA) gpl-es.html $(DESTDIR)$(mambawelcomedatadir)/gpl-es.html $(INSTALL_DATA) gpl-es.html $(DESTDIR)$(mambawelcomedatadir)/gpl-es.html
$(INSTALL_DATA) kde/config/kcmfonts $(DESTDIR)$(kdeconfigdir)/kcmfonts $(INSTALL_DATA) kde/config/kcmfonts $(DESTDIR)$(kdeconfigdir)/kcmfonts
$(INSTALL_DATA) kde/config/kdeglobals $(DESTDIR)$(kdeconfigdir)/kdeglobals $(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 endif
install-xramdr: install-xramdr:

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# #
# mambawelcome - start mambawelcome on first time system execution # 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 if [ $UID != 0 ]; then
echo "$0: must be superuser." >&2 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 #/opt/kde3/bin/dcopserver_shutdown
killall -9 dcopserver killall -9 dcopserver
[ -e /root/.mambawelcome-not-completed ] && { if [ -e /root/.mambawelcome-not-completed ]; then
rm -f /root/.mambawelcome-not-completed rm -f /root/.mambawelcome-not-completed
halt poweroff
} else
systemctl disable mambawelcome.target
systemctl isolate graphical.target
fi
exit 0 exit 0

View 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

View 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