More pppd fixes
This commit is contained in:
parent
d50a46a7a5
commit
01ea7e3186
@ -25,7 +25,7 @@ pppd_pre_start() {
|
|||||||
eval config=\$config_${IFVAR}
|
eval config=\$config_${IFVAR}
|
||||||
# If no config for ppp then don't default to DHCP
|
# If no config for ppp then don't default to DHCP
|
||||||
if [ -z "${config}" ] ; then
|
if [ -z "${config}" ] ; then
|
||||||
eval config_${IFVAR}=\"null\"
|
eval config_${IFVAR}=null
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@ -57,7 +57,7 @@ pppd_pre_start() {
|
|||||||
eval $(_get_array "pppd_${IFVAR}")
|
eval $(_get_array "pppd_${IFVAR}")
|
||||||
opts="$@"
|
opts="$@"
|
||||||
|
|
||||||
local mtu= hasmtu=false hasmru=false hasmaxfail=false haspersits=false
|
local mtu= hasmtu=false hasmru=false hasmaxfail=false haspersist=false
|
||||||
local hasupdetach=false
|
local hasupdetach=false
|
||||||
for i in "$@" ; do
|
for i in "$@" ; do
|
||||||
set -- ${i}
|
set -- ${i}
|
||||||
@ -70,7 +70,7 @@ pppd_pre_start() {
|
|||||||
mru) hasmru=true ;;
|
mru) hasmru=true ;;
|
||||||
maxfail) hasmaxfail=true ;;
|
maxfail) hasmaxfail=true ;;
|
||||||
persist) haspersist=true ;;
|
persist) haspersist=true ;;
|
||||||
updetach) hasupdetach=true;
|
updetach) hasupdetach=true ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ pppd_pre_start() {
|
|||||||
local username= password= passwordset=
|
local username= password= passwordset=
|
||||||
eval username=\$username_${IFVAR}
|
eval username=\$username_${IFVAR}
|
||||||
eval password=\$password_${IFVAR}
|
eval password=\$password_${IFVAR}
|
||||||
eval passwordset=\${password_${IFVAR}-x}
|
eval passwordset=\$\{password_${IFVAR}-x\}
|
||||||
if [ -n "${username}" ] \
|
if [ -n "${username}" ] \
|
||||||
&& [ -n "${password}" -o -z "${passwordset}" ] ; then
|
&& [ -n "${password}" -o -z "${passwordset}" ] ; then
|
||||||
opts="${opts} plugin passwordfd.so passwordfd 0"
|
opts="${opts} plugin passwordfd.so passwordfd 0"
|
||||||
@ -88,7 +88,7 @@ pppd_pre_start() {
|
|||||||
${hasmtu} || opts="${opts} mtu ${mtu}"
|
${hasmtu} || opts="${opts} mtu ${mtu}"
|
||||||
${hasmru} || opts="${opts} mru ${mtu}"
|
${hasmru} || opts="${opts} mru ${mtu}"
|
||||||
fi
|
fi
|
||||||
${hasmailfail} || opts="${opts} maxfail 0"
|
${hasmaxfail} || opts="${opts} maxfail 0"
|
||||||
${haspersist} || opts="${opts} persist"
|
${haspersist} || opts="${opts} persist"
|
||||||
|
|
||||||
# Set linkname because we need /var/run/ppp-${linkname}.pid
|
# Set linkname because we need /var/run/ppp-${linkname}.pid
|
||||||
|
@ -67,9 +67,7 @@ static void (*selinux_run_init_old) (void);
|
|||||||
static void (*selinux_run_init_new) (int argc, char **argv);
|
static void (*selinux_run_init_new) (int argc, char **argv);
|
||||||
|
|
||||||
static void setup_selinux (int argc, char **argv);
|
static void setup_selinux (int argc, char **argv);
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __linux__
|
|
||||||
static void setup_selinux (int argc, char **argv)
|
static void setup_selinux (int argc, char **argv)
|
||||||
{
|
{
|
||||||
void *lib_handle = NULL;
|
void *lib_handle = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user