Skip to content

Commit

Permalink
de-hardcoded the ping target: moved to lime's system section
Browse files Browse the repository at this point in the history
  • Loading branch information
ilario committed Nov 25, 2024
1 parent 9ac0062 commit 89f9170
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#!/bin/sh

internet_gw_ip=4.2.2.2

unique_append()
{
grep -qF "$1" "$2" || echo "$1" >> "$2"
}

unique_append \
"*/3 * * * * ((if ping -c 10 -W 10 $internet_gw_ip &> /dev/null; then awk '{print \$1 + 800}' /proc/uptime > /tmp/deferable-reboot.defer ; fi )&) "\
"*/3 * * * * ((if ping -c 10 -W 10 \$(uci -q get lime-autogen.system.deferable_reboot_ping_target) &> /dev/null; then awk '{print \$1 + 800}' /proc/uptime > /tmp/deferable-reboot.defer ; fi )&) "\
/etc/crontabs/root

1 change: 1 addition & 0 deletions packages/lime-docs/files/www/docs/lime-example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ config lime system
option root_password_policy 'DO_NOTHING' # When configured to SET_SECRET, the root password secret will be configured as specified in root_password_secret. When set to RANDOM a strong random password will be set if root has no password, use this if your firmware is built with the ssh keys inside. DO_NOTHING does nothing, leaving the root password empty (you will have to set it manually or through FirstBootWizard).
option root_password_secret '' # This is the password hash as stored in /etc/shadow, it is only used when root_password_policy=SET_SECRET. You can generate the secret with 'openssl passwd -1' to be compatible with most openwrt firmwares, use a strong password with at least 10 numbers and letters, the longer the better!. For improved security use "openssl passwd -6" for SHA512 (or -5 for SHA256) but be aware that not all firmwares support this.
option deferable_reboot_uptime_s '97200'
option deferable_reboot_ping_target '4.2.2.2' # b.resolvers.Level3.net # the reboot scheduled by deferable_reboot, if installed, will be deferred if the ping to this IP is succesful
option firstbootwizard_configured false
option firstbootwizard_dismissed false # When true fbw banner will be hidden.

Expand Down
1 change: 1 addition & 0 deletions packages/lime-system/files/etc/config/lime-defaults
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ config lime system
option root_password_policy 'DO_NOTHING'
option root_password_secret ''
option deferable_reboot_uptime_s '97200'
option deferable_reboot_ping_target '4.2.2.2'
option firstbootwizard_configured false
option firstbootwizard_dismissed false

Expand Down

0 comments on commit 89f9170

Please sign in to comment.