Browse Source

Add dhcpcd hook for swclock

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
master
David Oberhollenzer 3 years ago
parent
commit
f86d76513a
  1. 1
      .gitignore
  2. 8
      Makefile.am
  3. 2
      configure.ac
  4. 7
      etc/40-ntpsetdate.in

1
.gitignore

@ -30,4 +30,5 @@ services/sysfs
services/mountusr
services/tmpfsvar
crontab/swclock
etc/40-ntpsetdate
.#*

8
Makefile.am

@ -8,6 +8,14 @@ helperdir = @SCRIPTDIR@
helper_PROGRAMS =
helper_SCRIPTS =
dhcpcddir = @DHCPCDHOOKDIR@
if SWCLOCK
if DHCPCLIENT
dhcpcd_DATA = etc/40-ntpsetdate
endif
endif
include scripts/Makemodule.am
include services/Makemodule.am
include crontab/Makemodule.am

2
configure.ac

@ -12,6 +12,7 @@ AC_DEFINE_DIR(SVCDIR, sysconfdir/init.d, [Startup 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])
AC_DEFINE_DIR(DHCPCDHOOKDIR, libexecdir/dhcpcd-hooks, [DHCPCD hook directory])
AC_DEFINE_DIR(SBINPATH, sbindir, [Fully evaluated sbin directory])
AC_DEFINE_DIR(ETCPATH, sysconfdir, [Fulle evaluated etc directory])
@ -40,6 +41,7 @@ AC_CONFIG_FILES([scripts/ifcfg.sh])
AC_CONFIG_FILES([scripts/modules_load.sh])
AC_CONFIG_FILES([crontab/swclock])
AC_CONFIG_FILES([etc/40-ntpsetdate])
AC_ARG_ENABLE([swclock],
[AS_HELP_STRING([--enable-swclock], [Enable software pseudo RTC])],

7
etc/40-ntpsetdate.in

@ -0,0 +1,7 @@
case "$reason" in
BOUND*)
@SCRIPTDIR@/setntpdate.sh
;;
*)
;;
esac
Loading…
Cancel
Save