summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2014-03-10 14:19:27 +0100
committerJouke Witteveen <j.witteveen@gmail.com>2014-03-10 14:19:27 +0100
commitd3380715e629e921efb9491a0b1e40a7c1c48e7f (patch)
tree5b07d34535b57cb0bf16dd2370828fa587e45c80
parentab0d58c5b6d2a52fa02d951308875a99c0f2e9d1 (diff)
downloadnetctl-d3380715e629e921efb9491a0b1e40a7c1c48e7f.tar.gz
netctl-d3380715e629e921efb9491a0b1e40a7c1c48e7f.tar.xz
mobile_ppp: Unhardcode the phone number to dial
-rw-r--r--docs/netctl.profile.5.txt25
-rw-r--r--src/lib/connections/mobile_ppp2
2 files changed, 15 insertions, 12 deletions
diff --git a/docs/netctl.profile.5.txt b/docs/netctl.profile.5.txt
index 3ef940c..c125ce5 100644
--- a/docs/netctl.profile.5.txt
+++ b/docs/netctl.profile.5.txt
@@ -389,16 +389,6 @@ The name of the USB serial device is specified in 'Interface'. The
following options are understood for connections of the `mobile_ppp'
type:
-'MaxFail='::
- The number of consecutive failed connection attempts to tolerate.
- A value of 0 means no limit. Defaults to `++5++'.
-
-'DefaultRoute='::
- Use the default route provided by the peer (defaults to `true')
-
-'UsePeerDNS='::
- Use the DNS provided by the peer (defaults to `true')
-
'User=' and 'Password='::
The username and password to connect with. These are unset by
default, as they are often not required.
@@ -407,7 +397,10 @@ type:
The access point (apn) to connect on. This is specific to your ISP.
'Pin='::
- If your modem requires a PIN to unlock, use this option.
+ If your modem requires a PIN to unlock, set it here.
+
+'PhoneNumber'::
+ The number to dial. Defaults to `++&ast;99&num;++'.
'Mode='::
This option is used to specify the connection mode. Can be one of
@@ -415,6 +408,16 @@ type:
AT commands specific to certain Huawei modems; all other devices
should use `None'.
+'MaxFail='::
+ The number of consecutive failed connection attempts to tolerate.
+ A value of 0 means no limit. Defaults to `++5++'.
+
+'DefaultRoute='::
+ Use the default route provided by the peer. Defaults to `++true++'.
+
+'UsePeerDNS='::
+ Use the DNS provided by the peer. Defaults to `++true++'.
+
'OptionsFile='::
A file to read additional pppd options from.
diff --git a/src/lib/connections/mobile_ppp b/src/lib/connections/mobile_ppp
index 5006c6c..6df30d8 100644
--- a/src/lib/connections/mobile_ppp
+++ b/src/lib/connections/mobile_ppp
@@ -65,7 +65,7 @@ TIMEOUT 3
GPRSpref) printf "\^SYSCFG=2,1,3fffffff,0,0";;
esac)'
'OK-AT-OK' 'AT+CGDCONT=1,"IP",$(quote_word "$AccessPointName")'
-'OK' 'ATDT*99#'
+'OK' 'ATDT${PhoneNumber:-*99#}'
TIMEOUT 30
CONNECT ''
EOF