diff --git a/Makefile b/Makefile index b6918d5..08e3994 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ datadir = $(prefix)/share initrddir = $(sysconfdir)/rc.d/init.d logrotatedir = $(sysconfdir)/logrotate.d/ sysconfigdir= $(sysconfdir)/sysconfig +systemdunitdir = /lib/systemd/system localesdir = $(datadir)/locale srcdir = . @@ -72,7 +73,9 @@ install-defs: $(pck_defs) install-initscript: $(pck_initscript) @echo "installing initscript...";\ $(INSTALL_DIR) $(DESTDIR)$(initrddir) + $(INSTALL_DIR) $(DESTDIR)$(systemdunitdir) $(INSTALL_SCRIPT) $^ $(DESTDIR)$(initrddir)/$(PACKAGE) + $(INSTALL_SCRIPT) postplug/postplug-service $(DESTDIR)$(systemdunitdir)/postplug.service install-logrotate: $(pck_logrotate) @echo "installing logrotate file...";\ @@ -122,6 +125,7 @@ uninstall: -rmdir $(DESTDIR)$(postplugdir) -rmdir $(DESTDIR)$(postplugrcdir) rm -f $(DESTDIR)$(initrddir)/$(PACKAGE) + rm -f $(DESTDIR)$(systemdunitdir)/postplug.service rm -f $(DESTDIR)$(localesdir)/*/LC_MESSAGES/$(PACKAGE).mo dist: clean diff --git a/postplug.d/10filesystems b/postplug.d/10filesystems index 812c052..4b32095 100644 --- a/postplug.d/10filesystems +++ b/postplug.d/10filesystems @@ -3,7 +3,10 @@ # filesystems - filesystems plugin for postplug # Copyright (c) 2004-2007 by Davide Madrisan # Copyright (c) 2007 by Stefano Cotta Ramusino -# Copyright (c) 2009-2011 by Silvan Calarco +# Copyright (c) 2009-2013 by Silvan Calarco + +# systemd: completely disable for now +[ -d /run/systemd ] && exit 0 if [ $UID != 0 ]; then echo "$0: must be superuser." >&2 diff --git a/postplug.d/50console b/postplug.d/50console index 79ac089..2eb0d0b 100644 --- a/postplug.d/50console +++ b/postplug.d/50console @@ -2,6 +2,9 @@ # console - virtual consoles plugin for postplug # Copyright (c) 2012 by Silvan Calarco +# systemd: no need to manage inittab +[ -d /run/systemd ] && exit 0 + if [ $UID != 0 ]; then echo "$0: must be superuser." >&2 exit 1 diff --git a/postplug/postplug-service b/postplug/postplug-service new file mode 100644 index 0000000..2d41c01 --- /dev/null +++ b/postplug/postplug-service @@ -0,0 +1,13 @@ +[Unit] +Description=openmamba system configuration script +DefaultDependencies=no +After=systemd-udev-trigger.service +Before=systemd-remount-fs.service + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/sbin/postplug + +[Install] +WantedBy=sysinit.target