@@ -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.