1
0
Fork 0
mirror of https://github.com/pygos/init-scripts.git synced 2024-11-25 13:40:44 +01:00

Implement init/cron split

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-11-23 12:13:06 +01:00
parent b6c97e117c
commit 49fe9bd77d
8 changed files with 10 additions and 18 deletions

3
.gitignore vendored
View file

@ -26,9 +26,8 @@ services/sshd
services/sshd_keygen services/sshd_keygen
services/swclock services/swclock
services/swclocksave services/swclocksave
services/swclocksave.gcron
services/sysfs services/sysfs
services/mountusr services/mountusr
services/ntpsetdate.gcron
services/tmpfsvar services/tmpfsvar
crontab/swclock
.#* .#*

View file

@ -10,6 +10,7 @@ helper_SCRIPTS =
include scripts/Makemodule.am include scripts/Makemodule.am
include services/Makemodule.am include services/Makemodule.am
include crontab/Makemodule.am
install-data-local: install-data-local:
$(MKDIR_P) $(DESTDIR)$(SVCDIR) $(MKDIR_P) $(DESTDIR)$(SVCDIR)
@ -38,5 +39,4 @@ install-data-local:
$(LN_S) $(TEMPLATEDIR)/mountusr $(DESTDIR)$(SVCDIR)/mountusr $(LN_S) $(TEMPLATEDIR)/mountusr $(DESTDIR)$(SVCDIR)/mountusr
$(LN_S) $(TEMPLATEDIR)/tmpfsrun $(DESTDIR)$(SVCDIR)/tmpfsrun $(LN_S) $(TEMPLATEDIR)/tmpfsrun $(DESTDIR)$(SVCDIR)/tmpfsrun
$(LN_S) $(TEMPLATEDIR)/tmpfsvar $(DESTDIR)$(SVCDIR)/tmpfsvar $(LN_S) $(TEMPLATEDIR)/tmpfsvar $(DESTDIR)$(SVCDIR)/tmpfsvar
$(MKDIR_P) $(DESTDIR)$(GCRONDIR)
$(LN_S) $(TEMPLATEDIR)/gcrond $(DESTDIR)$(SVCDIR)/gcrond $(LN_S) $(TEMPLATEDIR)/gcrond $(DESTDIR)$(SVCDIR)/gcrond

View file

@ -9,7 +9,7 @@ AC_PROG_MKDIR_P
AC_PROG_LN_S AC_PROG_LN_S
AC_DEFINE_DIR(SVCDIR, sysconfdir/init.d, [Startup service directory]) AC_DEFINE_DIR(SVCDIR, sysconfdir/init.d, [Startup service directory])
AC_DEFINE_DIR(GCRONDIR, sysconfdir/gcron.d, [Cron service directory]) AC_DEFINE_DIR(GCRONDIR, sysconfdir/crontab.d, [Cron service directory])
AC_DEFINE_DIR(TEMPLATEDIR, datadir/init, [Service template directory]) AC_DEFINE_DIR(TEMPLATEDIR, datadir/init, [Service template directory])
AC_DEFINE_DIR(SCRIPTDIR, libexecdir/init, [Helper script directory]) AC_DEFINE_DIR(SCRIPTDIR, libexecdir/init, [Helper script directory])
@ -29,16 +29,16 @@ AC_CONFIG_FILES([services/modules])
AC_CONFIG_FILES([services/hostapd]) AC_CONFIG_FILES([services/hostapd])
AC_CONFIG_FILES([services/swclock]) AC_CONFIG_FILES([services/swclock])
AC_CONFIG_FILES([services/swclocksave]) AC_CONFIG_FILES([services/swclocksave])
AC_CONFIG_FILES([services/swclocksave.gcron])
AC_CONFIG_FILES([services/nft]) AC_CONFIG_FILES([services/nft])
AC_CONFIG_FILES([services/sshd]) AC_CONFIG_FILES([services/sshd])
AC_CONFIG_FILES([services/sshd_keygen]) AC_CONFIG_FILES([services/sshd_keygen])
AC_CONFIG_FILES([services/mountusr]) AC_CONFIG_FILES([services/mountusr])
AC_CONFIG_FILES([services/ntpsetdate.gcron])
AC_CONFIG_FILES([services/tmpfsvar]) AC_CONFIG_FILES([services/tmpfsvar])
AC_CONFIG_FILES([scripts/devfs.sh]) AC_CONFIG_FILES([scripts/devfs.sh])
AC_CONFIG_FILES([scripts/ifrename.sh]) AC_CONFIG_FILES([scripts/ifrename.sh])
AC_CONFIG_FILES([scripts/ifcfg.sh]) AC_CONFIG_FILES([scripts/ifcfg.sh])
AC_CONFIG_FILES([scripts/modules_load.sh]) AC_CONFIG_FILES([scripts/modules_load.sh])
AC_CONFIG_FILES([crontab/swclock])
AC_OUTPUT([Makefile]) AC_OUTPUT([Makefile])

2
crontab/Makemodule.am Normal file
View file

@ -0,0 +1,2 @@
crondir = @GCRONDIR@
cron_DATA = crontab/swclock

2
crontab/swclock.in Normal file
View file

@ -0,0 +1,2 @@
5 */4 * * * @SCRIPTDIR@/setntpdate.sh > /dev/null
@hourly date --utc +%%m%%d%%H%%M%%Y.%%S > @STATEFILESPATH@/swclock

View file

@ -10,8 +10,7 @@ init_DATA += services/network services/hostapd services/swclock
init_DATA += services/swclocksave services/nft services/sigkill init_DATA += services/swclocksave services/nft services/sigkill
init_DATA += services/sshd services/sshd_keygen services/consolefont init_DATA += services/sshd services/sshd_keygen services/consolefont
init_DATA += services/nginx services/usyslogd services/klogd init_DATA += services/nginx services/usyslogd services/klogd
init_DATA += services/swclocksave.gcron services/gcrond init_DATA += services/gcrond services/mountusr
init_DATA += services/mountusr services/ntpsetdate.gcron
init_DATA += services/tmpfsrun services/tmpfsvar init_DATA += services/tmpfsrun services/tmpfsvar
EXTRA_DIST += services/sysinit services/vfs services/agetty services/hostname EXTRA_DIST += services/sysinit services/vfs services/agetty services/hostname

View file

@ -1,7 +0,0 @@
hour */4
minute 5
dayofmonth *
dayofweek *
month *
tty /dev/null
exec "@SCRIPTDIR@/setntpdate.sh"

View file

@ -1,3 +0,0 @@
interval hourly
tty truncate @STATEFILESPATH@/swclock
exec date --utc +%%m%%d%%H%%M%%Y.%%S