Commit 57f14646 authored by Martin Peres's avatar Martin Peres
Browse files

initscript: be more resistant to network-setting failures

parent f90cfd20
...@@ -130,9 +130,8 @@ function load_modules { ...@@ -130,9 +130,8 @@ function load_modules {
} }
function connect { function connect {
ip link set eth0 up ip link set eth0 up || return 1
udhcpc -i eth0 -s /etc/uhdcp-default.sh -T 1 udhcpc -i eth0 -s /etc/uhdcp-default.sh -T 1 || return 1
log "Getting IP: DONE" log "Getting IP: DONE"
} }
...@@ -434,13 +433,15 @@ load_modules $ARG_MODULES ...@@ -434,13 +433,15 @@ load_modules $ARG_MODULES
mount_cache_partition mount_cache_partition
# Connect to the network, now that the modules are loaded # Connect to the network, now that the modules are loaded
connect if connect; then
# Set the time
# Set the time ntp_set $ARG_NTP_PEER
ntp_set $ARG_NTP_PEER
# Start the containers
# Start the containers run_containers
run_containers else
log "ERROR: Could not connect to the network, shutting down!"
fi
# Shutdown command # Shutdown command
sync sync
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment