From 4c44202fdc79d3e3cf59c1772b67c54f2dd8c706 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Fri, 10 Aug 2001 00:02:17 +0000 Subject: - don't set MSN if it' empty (it's now optional) - don't give login name as a cmdline-option (Bug #23066) --- ChangeLog | 5 +++++ initscripts.spec | 6 +++++- sysconfig/network-scripts/ifup-ippp | 28 ++++++++++++++++------------ 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad8c50cc..16939508 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-08-10 Than Ngo + * sysconfig/network-scripts/ifup-ippp + don't set MSN if it' empty (it's now optional) + don't give login name as a cmdline-option (Bug #23066) + 2001-08-09 Bill Nottingham * initscripts.spec, ChangeLog: 6.13-1 diff --git a/initscripts.spec b/initscripts.spec index 8b101852..6a6304a1 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -1,6 +1,6 @@ Summary: The inittab file and the /etc/init.d scripts. Name: initscripts -Version: 6.13 +Version: 6.14 License: GPL Group: System Environment/Base Release: 1 @@ -238,6 +238,10 @@ rm -rf $RPM_BUILD_ROOT %dir /etc/locale/*/LC_MESSAGES %changelog +* Fri Aug 10 2001 Than Ngo +- don't set MSN if it' empty (it's now optional) +- don't give login name as a cmdline-option (Bug #23066) + * Thu Aug 9 2001 Bill Nottingham - require SysVinit (#51335) diff --git a/sysconfig/network-scripts/ifup-ippp b/sysconfig/network-scripts/ifup-ippp index 45c2138c..215ae59e 100755 --- a/sysconfig/network-scripts/ifup-ippp +++ b/sysconfig/network-scripts/ifup-ippp @@ -46,6 +46,13 @@ function log_isdnctrl() isdnctrl $* >/dev/null 2>&1 } +function create_option_file() +{ + umask 066 + echo "$1" > /etc/ppp/ioption-secret-$DEVICE + umask 022 +} + function start_ibod() { # don't start ibod, if it's running @@ -62,10 +69,6 @@ function start_ibod() function addprovider() { options= - if [ -z "$MSN" ]; then - log_echo "Error: $1: MSN not set" - return 1 - fi if [ -z "$PHONE_OUT" ]; then log_echo "Error: $1: no outgoing phone number set" return 1 @@ -77,7 +80,7 @@ function addprovider() # set the dial mode [ -z "$DIALMODE" ] && DIALMODE="off" - [ "$AUTH" = "none" ] && AUTH="" + [ "$AUTH" = "none" ] && AUTH="noauth" # set layer-2/3 protocol [ -z "$L2_PROT" ] && L2_PROT="hdlc" @@ -93,16 +96,17 @@ function addprovider() # set authentication [ -z "$USER" ] && USER="dialup" if [ "$AUTH" = "-pap +chap" ]; then - options="$options name $USER" + create_option_file "name \"$USER\"" else - options="$options user $USER" + create_option_file "user \"$USER\"" fi + options="$options file /etc/ppp/ioption-secret-$DEVICE" # add ISDN device log_isdnctrl addif $DEVICE # set local MSN - log_isdnctrl eaz $DEVICE $MSN + [ -z "$MSN" ] || log_isdnctrl eaz $DEVICE $MSN # set dialout numbers if echo $COUNTRYCODE | grep ":" >/dev/null 2>&1 ; then @@ -178,7 +182,7 @@ function addprovider() # Create slave and set options log_isdnctrl addslave $DEVICE $slave - log_isdnctrl eaz $slave $SLAVE_MSN + [ -z $SLAVE_MSN ] || log_isdnctrl eaz $slave $SLAVE_MSN # set phone number for i in $SLAVE_PHONE_OUT; do @@ -252,9 +256,9 @@ function addprovider() [ -n "$ISDN_HOSTNAME" ] && options="$options hostname $ISDN_HOSTNAME" # Set authentication - #for i in $AUTH ; do - # options="$options $i" - #done + for i in $AUTH ; do + options="$options $i" + done # add ppp options for i in $PPPOPTIONS ; do -- cgit v1.2.1