installer: Set the clock correctly when installing over network
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 13 Mar 2019 08:05:27 +0000 (08:05 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 13 Mar 2019 09:35:07 +0000 (09:35 +0000)
If a system has a not very up to date clock, downloading files
over HTTPS is impossible.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/installer/dracut-module/70-dhcpcd.exe
src/installer/dracut-module/module-setup.sh

index 660f269..d801c8a 100755 (executable)
@@ -46,6 +46,9 @@ case "${reason}" in
 
                # Create system configuration files
                make_resolvconf
+
+               # Set time
+               ntpdate "ntp.ipfire.org"
                ;;
 
        EXPIRE|FAIL|IPV4LL|NAK|NOCARRIER|RELEASE|STOP)
index 103f754..ef4b15b 100755 (executable)
@@ -50,7 +50,7 @@ install() {
     inst_libdir_file "libnss_dns.so.*"
 
     # Misc. tools
-    inst_multiple chmod cut grep eject id killall md5sum touch
+    inst_multiple chmod cut grep eject id killall md5sum ntpdate touch
     inst_multiple -o fdisk cfdisk df ps top
 
     # Hardware IDs