From: Thibault Godouet Date: Sat, 30 Jun 2018 21:37:17 +0000 (+0100) Subject: fixed @reboot on systemd X-Git-Tag: ver3_3_1~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1ac7b8737f8879e87f04fa828ef3c03af6edcdab;p=thirdparty%2Ffcron.git fixed @reboot on systemd --- diff --git a/Makefile.in b/Makefile.in index f83dbbc..c75c475 100644 --- a/Makefile.in +++ b/Makefile.in @@ -98,7 +98,7 @@ endif ifeq ($(FCRONDYN), 1) all: fcron fcrontab fcrondyn convert-fcrontab files/fcron.conf initscripts documentation else -all: fcron fcrontab convert-fcrontab files/fcron.conf +all: fcron fcrontab convert-fcrontab files/fcron.conf initscripts documentation endif fcron: $(OBJSD) @@ -131,7 +131,7 @@ exe_list_test: exe_list.o u_list.o exe_list_test.o log.o subs.o initscripts: @(if test ! -d script; then mkdir script ; fi ; \ - for F in sysVinit-launcher fcron.sh fcron.init.suse fcron.init.systemd fcron.suspend.sh ; do \ + for F in sysVinit-launcher fcron.sh fcron.init.suse fcron.init.systemd fcron.init.systemd.reboot fcron.suspend.sh ; do \ $(SRCDIR)/script/gen-in.pl $(SRCDIR)/script/$${F}.in script/$${F} ./ ; \ done) @@ -145,6 +145,7 @@ endif ifneq ($(SYSTEMD_DIR), no) if test ! -d $(DESTDIR)$(SYSTEMD_DIR); then $(INSTALL) -m 755 -d $(DESTDIR)$(SYSTEMD_DIR) ; fi $(INSTALL) -m 644 script/fcron.init.systemd $(DESTDIR)$(SYSTEMD_DIR)/fcron.service + $(INSTALL) -m 644 script/fcron.init.systemd.reboot $(DESTDIR)$(SYSTEMD_DIR)/fcronreboot.service endif install-staged: all @@ -271,7 +272,7 @@ ciclean: clean vclean: ciclean rm -f config.log config.status config.h config.cache Makefile PREVIOUS_VERSION \ - files/fcron.conf script/fcron.init.suse script/fcron.init.systemd \ + files/fcron.conf script/fcron.init.suse script/fcron.init.systemd script/fcron.init.systemd.reboot \ script/fcron.sh script/sysVinit-launcher $(MAKE) -C doc clean diff --git a/files/fcron.conf.in b/files/fcron.conf.in index 7b6c292..f3bee22 100644 --- a/files/fcron.conf.in +++ b/files/fcron.conf.in @@ -8,6 +8,7 @@ fcrontabs = @@FCRONTABS@ # The locations of the pid file, suspend file and the fifo file +# Note: if you change these paths, you will need to change your start-up scripts pidfile = @@PIDFILE@ suspendfile = @@SUSPEND_FILE@ fifofile = @@FIFOFILE@ diff --git a/script/.gitignore b/script/.gitignore index 9ddd62a..148aafa 100644 --- a/script/.gitignore +++ b/script/.gitignore @@ -3,4 +3,5 @@ fcron.sh sysVinit-launcher fcron.init.suse fcron.init.systemd +fcron.init.systemd.reboot fcron.suspend.sh diff --git a/script/boot-install b/script/boot-install index 93c2cf5..a7bdfb4 100755 --- a/script/boot-install +++ b/script/boot-install @@ -186,7 +186,10 @@ if test \( ! "$INSTALLED" -eq 1 \) -a \( "$SYSTEMD_ROOTDIR" != "" \); then fi if test \( -z "$INSTALL" \) -o \( "$INSTALL" = "y" \); then $INSPROG -c -m 755 script/fcron.init.systemd $SYSTEMD_ROOTDIR/system/fcron.service + $INSPROG -c -m 755 script/fcron.init.systemd.reboot $SYSTEMD_ROOTDIR/system/fcronreboot.service systemctl daemon-reload + systemctl enable fcron.service + systemctl enable fcronreboot.service INSTALLED=1 INSTALL_TYPE=SYSTEMD else @@ -359,7 +362,7 @@ if test $NEED_UPDATE -eq 0; then fi if test \( -z "$RESTART" \) -o \( "$RESTART" = "y" \); then $KILL - sleep 2 # wait for fcron to stop + sleep 5 # wait for fcron to stop $CMD fi