install: install-staged strip perms
ifeq ($(BOOTINSTALL), 1)
+ if test ! -d script; then mkdir script ; fi
+ for F in sysVinit-launcher fcron.sh fcron.init.suse ; do \
+ $(SRCDIR)/script/gen-in.pl $(SRCDIR)/script/$${F}.in script/$${F} ./ ; \
+ done
$(SRCDIR)/script/boot-install "$(INSTALL) -o $(ROOTNAME)" $(DESTSBIN) $(DEBUG) $(FCRONTABS) $(ANSWERALL) $(SRCDIR)
endif
endif
install-boot: install
+ if test ! -d script; then mkdir script ; fi
+ for F in sysVinit-launcher fcron.sh fcron.init.suse ; do \
+ $(SRCDIR)/script/gen-in.pl $(SRCDIR)/script/$${F}.in script/$${F} ./ ; \
+ done
$(SRCDIR)/script/boot-install "$(INSTALL) -o $(ROOTNAME)" $(DESTSBIN) $(DEBUG) $(FCRONTABS) $(ANSWERALL) $(SRCDIR)
install-restart: install
rm -fR autom4te*
vclean: ciclean
- rm -f config.log config.status config.h config.cache Makefile PREVIOUS_VERSION
+ rm -f config.log config.status config.h config.cache Makefile PREVIOUS_VERSION \
+ files/fcron.conf script/fcron.init.suse script/fcron.sh script/sysVinit-launcher
make -C doc clean
--- /dev/null
+# Auto-generated files:
+fcron.sh
+sysVinit-launcher
+fcron.init.suse
INSTALL="n"
fi
if test \( -z "$INSTALL" \) -o \( "$INSTALL" = "y" \); then
- cp -f $SRCDIR/script/fcron.sh /usr/local/etc/rc.d/
+ cp -f script/fcron.sh /usr/local/etc/rc.d/
if test $DEBUG -eq 1; then
cat /usr/local/etc/rc.d/fcron.sh | sed 's: -b: -b -d:' > /usr/local/etc/rc.d/fcron.sh2
mv -f /usr/local/etc/rc.d/fcron.sh2 /usr/local/etc/rc.d/fcron.sh
fi
- cat /usr/local/etc/rc.d/fcron.sh | sed "s:@@DESTSBIN@:$DESTBIN:" > /usr/local/etc/rc.d/fcron.sh2
- mv -f /usr/local/etc/rc.d/fcron.sh2 /usr/local/etc/rc.d/fcron.sh
chmod +x /usr/local/etc/rc.d/fcron.sh
INSTALLED=1
else
INSTALL="n"
fi
if test \( -z "$INSTALL" \) -o \( "$INSTALL" = "y" \); then
- $INSPROG -c -m 755 $SRCDIR/script/sysVinit-launcher $ROOTDIR/init.d/fcron
+ $INSPROG -c -m 755 script/sysVinit-launcher $ROOTDIR/init.d/fcron
if test $DEBUG -eq 1; then
cat $ROOTDIR/init.d/fcron | sed 's: -b: -b -d:' >$ROOTDIR/init.d/fcron2
mv -f $ROOTDIR/init.d/fcron2 $ROOTDIR/init.d/fcron
chmod +x $ROOTDIR/init.d/fcron
fi
- cat $ROOTDIR/init.d/fcron | sed "s:@@DESTSBIN@:$DESTBIN:" >$ROOTDIR/init.d/fcron2
- mv -f $ROOTDIR/init.d/fcron2 $ROOTDIR/init.d/fcron
chmod +x $ROOTDIR/init.d/fcron
for j in 2 3 4 5
#DAEMON_OPT=""
DAEMON_USER="root"
SUPPORTS_HUP="yes"
+REBOOT_LOCK=@@REBOOT_LOCK@
pid_par=${DAEMON_PIDFILE:+"-p $DAEMON_PIDFILE"}
usr_par=${DAEMON_USER:+"-u $DAEMON_USER"}
echo -n " Warning: daemon not running. "
killproc $pid_par -t 10 ${DAEMON_BIN}
rc_status -v
+ if test \( "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "6" \) \
+ -a -f "$REBOOT_LOCK" ; then
+ # Make sure the lock file is deleted on reboot/shutdown
+ # in case the OS doesn't do it itself
+ rm -f "$REBOOT_LOCK"
+ fi
;;
try-restart|condrestart)
if test "$1" = "condrestart"; then
+++ /dev/null
-#!/bin/sh
-# Start fcron at boot time under FreeBSD
-
-SBIN=@@DESTSBIN@
-
-case "$1" in
- start)
- $SBIN/fcron -b && echo -n " fcron"
- ;;
- stop)
- killall -TERM fcron
- ;;
- *)
- echo "Usage: fcron start|stop"
- exit 1
- ;;
-esac
\ No newline at end of file
--- /dev/null
+#!/bin/sh
+# Start fcron at boot time under FreeBSD
+
+SBIN=@@DESTSBIN@
+REBOOT_LOCK=@@REBOOT_LOCK@
+
+case "$1" in
+ start)
+ $SBIN/fcron -b && echo -n " fcron"
+ ;;
+ stop)
+ killall -TERM fcron
+ if test \( "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "6" \) \
+ -a -f "$REBOOT_LOCK" ; then
+ # Make sure the lock file is deleted on reboot/shutdown
+ # in case the OS doesn't do it itself
+ rm -f "$REBOOT_LOCK"
+ fi
+ ;;
+ *)
+ echo "Usage: fcron start|stop"
+ exit 1
+ ;;
+esac
FUNCTION=0
SBIN=@@DESTSBIN@
+REBOOT_LOCK=@@REBOOT_LOCK@
EXEC="$SBIN/fcron"
if test -d /var/lock/subsys/; then
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/fcron
fi
+ if test \( "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "6" \) \
+ -a -f "$REBOOT_LOCK" ; then
+ # Make sure the lock file is deleted on reboot/shutdown
+ # in case the OS doesn't do it itself
+ rm -f "$REBOOT_LOCK"
+ fi
+
$FINALECHO
;;
status)