Allow a ppp_user specification to run ppp at startup
PR: 20258
This commit is contained in:
parent
7cffeeb59d
commit
f7946f7c73
@ -82,6 +82,7 @@ ppp_mode="auto" # Choice of "auto", "ddial", "direct" or "dedicated".
|
||||
# For details see man page for ppp(8). Default is auto.
|
||||
ppp_nat="YES" # Use PPP's internal network address translation or NO.
|
||||
ppp_profile="papchap" # Which profile to use from /etc/ppp/ppp.conf.
|
||||
ppp_user="root" # Which user to run ppp as
|
||||
|
||||
### Network daemon (miscellaneous) & NFS options: ###
|
||||
syslogd_enable="YES" # Run syslog daemon (or NO).
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -340,6 +340,10 @@ this host as a network address translating router.
|
||||
.It Ar ppp_profile
|
||||
(str) The name of the profile to use from
|
||||
.Pa /etc/ppp/ppp.conf .
|
||||
.It Ar ppp_user
|
||||
(str) The name of the user under which ppp should be started. By
|
||||
default, ppp is started as
|
||||
.Ar root .
|
||||
.It Ar rc_conf_files
|
||||
(str) This option is used to specify a list of files that will override
|
||||
the settings in
|
||||
|
Loading…
Reference in New Issue
Block a user