Skip to content
Snippets Groups Projects
Commit 02ecc4e1 authored by Jouke Witteveen's avatar Jouke Witteveen
Browse files

Reach network.target before communicating

Let the netctl profile service yield at the last moment before any
communication on the interface takes place. That way, we catch as many
problems as possible without suffering unpredictable delays.
This means network.target is reached earlier for wireless connections.
parent 479689ad
No related branches found
No related tags found
No related merge requests found
......@@ -19,8 +19,6 @@ mobile_ppp_up() {
rf_enable "$Interface" "$RFKill" || return 1
fi
network_ready
mkdir -p "$options_dir"
if [[ -z $ChatScript ]]; then
ChatScript="$options_dir/modem.chat"
......@@ -83,6 +81,7 @@ connect $(quote_word "/usr/sbin/chat -v -t15 -f $(quote_word "$ChatScript")")
${OptionsFile:+file $(quote_word "$OptionsFile")}
EOF
network_ready
if ! $PPPD file "$options_dir/options"; then
rm -r "$options_dir"
report_error "Could not establish a ppp connection for profile '$Profile'."
......
......@@ -18,7 +18,6 @@ pppoe_up() {
report_error "Failed to bring interface '$Interface' up"
return 1
fi
network_ready
mkdir -p "$(dirname "$options")"
cat >> "$options" << EOF
......@@ -48,6 +47,7 @@ password $(quote_word "$Password")
${OptionsFile:+file $(quote_word "$OptionsFile")}
EOF
network_ready
if ! $PPPD file "$options"; then
rm "$options"
rmdir "$(dirname "$options")"
......
......@@ -49,6 +49,7 @@ wireless_up() {
return 1
fi
network_ready
# Bring interface up after starting wpa_supplicant
# This is important since cards such as iwl3945 do not support
# mode switching when they are already up.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment