diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2019-05-04 00:10:26 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2019-05-04 00:10:26 +0000 |
| commit | 7bb2006007c1996f33758e41db070252d4d3607f (patch) | |
| tree | 3dc03d4f6a8867742961a3dea9ecc96c52d00a10 /layout/rootfs/etc/s6-rc/source-base/ntpclient | |
| parent | 1202c964c4e91083a3c60b41b9c11e220bfa759d (diff) | |
| download | lh-bootstrap-7bb2006007c1996f33758e41db070252d4d3607f.tar.gz | |
Make a lean and mean version, as a basis for filling an initramfs
Diffstat (limited to 'layout/rootfs/etc/s6-rc/source-base/ntpclient')
5 files changed, 0 insertions, 64 deletions
diff --git a/layout/rootfs/etc/s6-rc/source-base/ntpclient/dependencies b/layout/rootfs/etc/s6-rc/source-base/ntpclient/dependencies deleted file mode 100644 index a328ed2..0000000 --- a/layout/rootfs/etc/s6-rc/source-base/ntpclient/dependencies +++ /dev/null @@ -1,3 +0,0 @@ -activate-eth0 -dnscache -init-clock diff --git a/layout/rootfs/etc/s6-rc/source-base/ntpclient/notification-fd b/layout/rootfs/etc/s6-rc/source-base/ntpclient/notification-fd deleted file mode 100644 index 00750ed..0000000 --- a/layout/rootfs/etc/s6-rc/source-base/ntpclient/notification-fd +++ /dev/null @@ -1 +0,0 @@ -3 diff --git a/layout/rootfs/etc/s6-rc/source-base/ntpclient/producer-for b/layout/rootfs/etc/s6-rc/source-base/ntpclient/producer-for deleted file mode 100644 index c51cd0b..0000000 --- a/layout/rootfs/etc/s6-rc/source-base/ntpclient/producer-for +++ /dev/null @@ -1 +0,0 @@ -ntpclient-log diff --git a/layout/rootfs/etc/s6-rc/source-base/ntpclient/run b/layout/rootfs/etc/s6-rc/source-base/ntpclient/run deleted file mode 100755 index 3eebee0..0000000 --- a/layout/rootfs/etc/s6-rc/source-base/ntpclient/run +++ /dev/null @@ -1,58 +0,0 @@ -#!/command/execlineb -P - -fdmove -c 2 1 - - -# Get the IP addresses for some NTP servers in our country. -# Limit the DNS queries to 30 seconds: if the DNS is slower than -# that, chances are the server isn't good for us anyway. -# All the queries are parallelized, so it's fast. - -pipeline -{ - s6-setuidgid nobody - s6-envdir /etc/s6-linux-init/env-stage2 - importas -u COUNTRY_CODE COUNTRY_CODE - forx -p I { 0 1 } - importas -u I I - s6-dnsip4 -t 30000 -- ${I}.${COUNTRY_CODE}.pool.ntp.org -} -importas -u p1 ! - - -# Ask for a NTP exchange with the servers we get. -# If the exchange can't be completed in 5 seconds, kill it. -# All the queries are parallelized. - -pipeline -{ - s6-setuidgid ntp - forstdin -p -d"\n" NTPSERVERIP - importas -u NTPSERVERIP NTPSERVERIP - s6-sntpclock -T 5000 ${NTPSERVERIP} -} -importas -u p2 ! - - -# Take the first answer we get - -pipeline -{ - s6-setuidgid nobody - s6-head -Sc 12 -} -importas -u p3 ! - - -# Update the system clock. Accept 10 minutes of discrepancy. - -if { s6-clockadd -e 600000 } - - -# Success. Send a readiness notification, reap zombies, -# and sleep for 4 hours. - -s6-setuidgid nobody -if { fdmove 1 3 s6-echo } -wait { ${p1} ${p2} ${p3} } -s6-sleep 14400 diff --git a/layout/rootfs/etc/s6-rc/source-base/ntpclient/type b/layout/rootfs/etc/s6-rc/source-base/ntpclient/type deleted file mode 100644 index 5883cff..0000000 --- a/layout/rootfs/etc/s6-rc/source-base/ntpclient/type +++ /dev/null @@ -1 +0,0 @@ -longrun |
