summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2013-05-21 12:38:54 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2013-05-21 12:38:54 +0200
commit01254fe7efa7f71013662a73d73e28fe702ba8fb (patch)
tree86333af94f02ab55b649d8bb446a6bd643f01f33
parenta2f57c5f5ef8d702359a0ed3b8b9e019b70dd482 (diff)
downloadnetctl-01254fe7efa7f71013662a73d73e28fe702ba8fb.tar.gz
netctl-01254fe7efa7f71013662a73d73e28fe702ba8fb.tar.xz
Expose the 'maxfail' option for ppp connections
-rw-r--r--docs/netctl.profile.5.txt17
-rw-r--r--src/lib/connections/mobile_ppp2
-rw-r--r--src/lib/connections/pppoe2
3 files changed, 13 insertions, 8 deletions
diff --git a/docs/netctl.profile.5.txt b/docs/netctl.profile.5.txt
index 711c0db..caffdc9 100644
--- a/docs/netctl.profile.5.txt
+++ b/docs/netctl.profile.5.txt
@@ -301,9 +301,12 @@ the `pppoe' type:
should disconnect. This option is only valid if 'ConnectionMode' is
set to `demand'.
+'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')
+ Use the default route provided by the peer (defaults to `true')
'UsePeerDNS='::
Use the DNS provided by the peer (defaults to `true')
@@ -337,9 +340,12 @@ 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')
+ Use the default route provided by the peer (defaults to `true')
'UsePeerDNS='::
Use the DNS provided by the peer (defaults to `true')
@@ -349,8 +355,7 @@ type:
default, as they are often not required.
'AccessPointName='::
- The access point (apn) to connect on. This is specific to your
- ISP.
+ 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.
diff --git a/src/lib/connections/mobile_ppp b/src/lib/connections/mobile_ppp
index 2466ad7..b966390 100644
--- a/src/lib/connections/mobile_ppp
+++ b/src/lib/connections/mobile_ppp
@@ -30,7 +30,7 @@ modem
passive
novj
holdoff 10
-maxfail 5
+maxfail ${MaxFail:-5}
EOF
# Debug pppd output separately from netctl
diff --git a/src/lib/connections/pppoe b/src/lib/connections/pppoe
index 87f9ee5..65fee79 100644
--- a/src/lib/connections/pppoe
+++ b/src/lib/connections/pppoe
@@ -36,7 +36,7 @@ pppoe_up() {
if is_yes "${UsePeerDNS:-yes}"; then
echo "usepeerdns" >> "${cfg}"
fi
- echo "maxfail 5" >> "${cfg}"
+ echo "maxfail ${MaxFail:-5}" >> "${cfg}"
echo "updetach" >> "${cfg}"
if [[ ${ConnectionMode} == demand ]]; then
echo "demand" >> "${cfg}"