From: ivan Date: Thu, 8 Jul 1999 01:49:00 +0000 (+0000) Subject: updates to avoid -w warnings from Joel Griffiths X-Git-Tag: freeside_1_2_2~57 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=fe1fe9e3c076c7e4f45a810d6cd07c9008cb2e5b updates to avoid -w warnings from Joel Griffiths --- diff --git a/bin/svc_acct.import b/bin/svc_acct.import index 512572251..85bc2f5eb 100755 --- a/bin/svc_acct.import +++ b/bin/svc_acct.import @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct.import,v 1.5 1999-03-25 08:42:19 ivan Exp $ +# $Id: svc_acct.import,v 1.6 1999-07-08 01:49:00 ivan Exp $ # # ivan@sisd.com 98-mar-9 # @@ -17,7 +17,10 @@ # don't import /var/spool/freeside/conf/shells! ivan@sisd.com 98-aug-13 # # $Log: svc_acct.import,v $ -# Revision 1.5 1999-03-25 08:42:19 ivan +# Revision 1.6 1999-07-08 01:49:00 ivan +# updates to avoid -w warnings from Joel Griffiths +# +# Revision 1.5 1999/03/25 08:42:19 ivan # import stuff uses Term::Query and spits out (some kinds of) nonsensical input # # Revision 1.4 1999/03/24 00:43:38 ivan @@ -149,8 +152,12 @@ while () { while () { chop; if ( /^\s*$/ ) { - $ip{$username}=$param{'radius_Framed_IP_Address'}||'0e0'; - delete $param{'radius_Framed_IP_Address'}; + if ( defined $param{'radius_Framed_IP_Address'} ) { + $ip{$username} = $param{'radius_Framed_IP_Address'}; + delete $param{'radius_Framed_IP_Address'}; + } else { + $ip{$username} = '0e0'; + } $allparam{$username}={ %param }; last; } elsif ( /^\s+([\w\-]+)\s=\s"?([\w\.\-\s]+)"?,?\s*$/ ) { @@ -163,8 +170,12 @@ while () { } } #? incase there isn't a terminating blank line ? -$ip{$username}=$param{'radius_Framed_IP_Address'}||'0e0'; -delete $param{'radius_Framed_IP_Address'}; +if ( defined $param{'radius_Framed_IP_Address'} ) { + $ip{$username} = $param{'radius_Framed_IP_Address'}; + delete $param{'radius_Framed_IP_Address'}; +} else { + $ip{$username} = '0e0'; +} $allparam{$username}={ %param }; my(%password);