More pppd fixes

This commit is contained in:
Roy Marples 2007-08-07 20:23:38 +00:00
parent d50a46a7a5
commit 01ea7e3186
2 changed files with 5 additions and 7 deletions

View File

@ -25,7 +25,7 @@ pppd_pre_start() {
eval config=\$config_${IFVAR}
# If no config for ppp then don't default to DHCP
if [ -z "${config}" ] ; then
eval config_${IFVAR}=\"null\"
eval config_${IFVAR}=null
fi
return 0
fi
@ -57,7 +57,7 @@ pppd_pre_start() {
eval $(_get_array "pppd_${IFVAR}")
opts="$@"
local mtu= hasmtu=false hasmru=false hasmaxfail=false haspersits=false
local mtu= hasmtu=false hasmru=false hasmaxfail=false haspersist=false
local hasupdetach=false
for i in "$@" ; do
set -- ${i}
@ -70,7 +70,7 @@ pppd_pre_start() {
mru) hasmru=true ;;
maxfail) hasmaxfail=true ;;
persist) haspersist=true ;;
updetach) hasupdetach=true;
updetach) hasupdetach=true ;;
esac
done
@ -78,7 +78,7 @@ pppd_pre_start() {
local username= password= passwordset=
eval username=\$username_${IFVAR}
eval password=\$password_${IFVAR}
eval passwordset=\${password_${IFVAR}-x}
eval passwordset=\$\{password_${IFVAR}-x\}
if [ -n "${username}" ] \
&& [ -n "${password}" -o -z "${passwordset}" ] ; then
opts="${opts} plugin passwordfd.so passwordfd 0"
@ -88,7 +88,7 @@ pppd_pre_start() {
${hasmtu} || opts="${opts} mtu ${mtu}"
${hasmru} || opts="${opts} mru ${mtu}"
fi
${hasmailfail} || opts="${opts} maxfail 0"
${hasmaxfail} || opts="${opts} maxfail 0"
${haspersist} || opts="${opts} persist"
# Set linkname because we need /var/run/ppp-${linkname}.pid

View File

@ -67,9 +67,7 @@ static void (*selinux_run_init_old) (void);
static void (*selinux_run_init_new) (int argc, char **argv);
static void setup_selinux (int argc, char **argv);
#endif
#ifdef __linux__
static void setup_selinux (int argc, char **argv)
{
void *lib_handle = NULL;