Browse Source

Implement init/cron split

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
master
David Oberhollenzer 3 years ago
parent
commit
49fe9bd77d
  1. 3
      .gitignore
  2. 2
      Makefile.am
  3. 6
      configure.ac
  4. 2
      crontab/Makemodule.am
  5. 2
      crontab/swclock.in
  6. 3
      services/Makemodule.am
  7. 7
      services/ntpsetdate.gcron.in
  8. 3
      services/swclocksave.gcron.in

3
.gitignore

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

2
Makefile.am

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

6
configure.ac

@ -9,7 +9,7 @@ AC_PROG_MKDIR_P
AC_PROG_LN_S
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(SCRIPTDIR, libexecdir/init, [Helper script directory])
@ -29,16 +29,16 @@ AC_CONFIG_FILES([services/modules])
AC_CONFIG_FILES([services/hostapd])
AC_CONFIG_FILES([services/swclock])
AC_CONFIG_FILES([services/swclocksave])
AC_CONFIG_FILES([services/swclocksave.gcron])
AC_CONFIG_FILES([services/nft])
AC_CONFIG_FILES([services/sshd])
AC_CONFIG_FILES([services/sshd_keygen])
AC_CONFIG_FILES([services/mountusr])
AC_CONFIG_FILES([services/ntpsetdate.gcron])
AC_CONFIG_FILES([services/tmpfsvar])
AC_CONFIG_FILES([scripts/devfs.sh])
AC_CONFIG_FILES([scripts/ifrename.sh])
AC_CONFIG_FILES([scripts/ifcfg.sh])
AC_CONFIG_FILES([scripts/modules_load.sh])
AC_CONFIG_FILES([crontab/swclock])
AC_OUTPUT([Makefile])

2
crontab/Makemodule.am

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

2
crontab/swclock.in

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

3
services/Makemodule.am

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

7
services/ntpsetdate.gcron.in

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

3
services/swclocksave.gcron.in

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