aboutsummaryrefslogtreecommitdiff
path: root/etc/rc.d/network3
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2000-08-10 00:13:02 +0000
committerBrian Somers <brian@FreeBSD.org>2000-08-10 00:13:02 +0000
commite2323071e6c46eb902f7d24b474e21d240b67366 (patch)
treeb432d7ce07178e8f903df520b827dc413ef3db59 /etc/rc.d/network3
parent1baeddb81bbc12d1c77536256354236a14978afb (diff)
downloadsrc-e2323071e6c46eb902f7d24b474e21d240b67366.tar.gz
src-e2323071e6c46eb902f7d24b474e21d240b67366.zip
Allow a ppp_user specification to run ppp at startup
PR: 20258
Notes
Notes: svn path=/head/; revision=64471
Diffstat (limited to 'etc/rc.d/network3')
-rw-r--r--etc/rc.d/network317
1 files changed, 9 insertions, 8 deletions
diff --git a/etc/rc.d/network3 b/etc/rc.d/network3
index 1c38d055c99e..2ba323ef3ddf 100644
--- a/etc/rc.d/network3
+++ b/etc/rc.d/network3
@@ -138,7 +138,7 @@ network_pass1() {
;;
esac
- # Warm up user ppp if required, must happen before natd.
+ # Start user ppp if required. This must happen before natd.
#
case ${ppp_enable} in
[Yy][Ee][Ss])
@@ -147,27 +147,28 @@ network_pass1() {
if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \
-a "${ppp_mode}" != "dedicated" \
-a "${ppp_mode}" != "background" ]; then
- ppp_mode="auto";
+ ppp_mode="auto"
fi
- ppp_command="-${ppp_mode} ";
+ ppp_command="/usr/sbin/ppp -quiet -${ppp_mode}"
- # Switch on alias mode?
+ # Switch on NAT mode?
#
case ${ppp_nat} in
[Yy][Ee][Ss])
- ppp_command="${ppp_command} -nat";
+ ppp_command="${ppp_command} -nat"
;;
esac
- echo -n 'Starting ppp: '; ppp ${ppp_command} -quiet ${ppp_profile}
+ ppp_command="${ppp_command} ${ppp_profile}"
+
+ echo -n "Starting ppp as \"${ppp_user}\""
+ su ${ppp_user} -c "exec ${ppp_command}"
;;
esac
# Initialize IP filtering using ipfw
#
- echo ''
-
if /sbin/ipfw -q flush > /dev/null 2>&1; then
firewall_in_kernel=1
else