Skip to content

Commit

Permalink
v6.10
Browse files Browse the repository at this point in the history
+ Only run ntpd when we need it: https://github.com/Fourdee/DietPi/issues/1829
  • Loading branch information
Daniel (Fourdee) committed Jun 19, 2018
1 parent 2f4b6fa commit fcd9346
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dietpi/boot
Expand Up @@ -230,7 +230,7 @@
# - Wait for active connection, then update network details file
Wait_For_Valid_Network_Connection

# - Set NTPD
# - Set NTPD mode
/DietPi/dietpi/func/dietpi-set_software ntpd-mode $(grep -m1 '^[[:blank:]]*CONFIG_NTP_MODE=' /DietPi/dietpi.txt | sed 's/^.*=//')

}
Expand Down
2 changes: 2 additions & 0 deletions dietpi/dietpi-config
Expand Up @@ -1430,6 +1430,7 @@
if (( $? == 0 )); then

/DietPi/dietpi/func/dietpi-set_software ntpd-mode $G_WHIP_RETURNED_VALUE
/DietPi/dietpi/func/run_ntpd

fi

Expand Down Expand Up @@ -5559,6 +5560,7 @@ Custom : Write = $CUSTOM_WRITE | Read = $CUSTOM_READ"

sed -i "/CONFIG_NTP_MIRROR=/c\CONFIG_NTP_MIRROR=$G_WHIP_RETURNED_VALUE" /DietPi/dietpi.txt
/DietPi/dietpi/func/dietpi-set_software ntpd-mode $(grep -m1 '^CONFIG_NTP_MODE=' /DietPi/dietpi.txt | sed 's/.*=//')
/DietPi/dietpi/func/run_ntpd

#Return to this Menu
TARGETMENUID=16
Expand Down
3 changes: 0 additions & 3 deletions dietpi/func/dietpi-set_software
Expand Up @@ -225,9 +225,6 @@ _EOF_
# - Update DietPi.txt
G_CONFIG_INJECT 'CONFIG_NTP_MODE=' "CONFIG_NTP_MODE=$INPUT_MODE_VALUE" /DietPi/dietpi.txt

# - Update now
/DietPi/dietpi/func/run_ntpd

else

Unknown_Input_Mode
Expand Down

0 comments on commit fcd9346

Please sign in to comment.