aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am8
-rw-r--r--configure.ac2
-rw-r--r--etc/40-ntpsetdate.in7
4 files changed, 18 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index a82d534..2876249 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,4 +30,5 @@ services/sysfs
services/mountusr
services/tmpfsvar
crontab/swclock
+etc/40-ntpsetdate
.#* \ No newline at end of file
diff --git a/Makefile.am b/Makefile.am
index 3fb4686..a74c62d 100644
--- a/Makefile.am
+++ b/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
diff --git a/configure.ac b/configure.ac
index f447465..6d545e2 100644
--- a/configure.ac
+++ b/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])],
diff --git a/etc/40-ntpsetdate.in b/etc/40-ntpsetdate.in
new file mode 100644
index 0000000..ebad7fe
--- /dev/null
+++ b/etc/40-ntpsetdate.in
@@ -0,0 +1,7 @@
+case "$reason" in
+BOUND*)
+ @SCRIPTDIR@/setntpdate.sh
+ ;;
+*)
+ ;;
+esac