cvs commit: hints iana_protocols+services.txt

timothy at linuxfromscratch.org timothy at linuxfromscratch.org
Tue Jan 7 11:21:03 PST 2003


timothy     03/01/07 14:21:03

  Modified:    .        iana_protocols+services.txt
  Log:
  o  More robust services filter. This is a recommended upgrade.
     It fixes a bug reported by Fire Dragon
     <fdragon at saturn.fdragon.org>.
  
  Revision  Changes    Path
  1.6       +13 -8     hints/iana_protocols+services.txt
  
  Index: iana_protocols+services.txt
  ===================================================================
  RCS file: /home/cvsroot/hints/iana_protocols+services.txt,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- iana_protocols+services.txt	24 Dec 2002 15:49:48 -0000	1.5
  +++ iana_protocols+services.txt	7 Jan 2003 19:21:03 -0000	1.6
  @@ -20,6 +20,9 @@
   
   Change Log
   
  +Revision 1.6 - 2003-JAN-07
  +	More robust services filter. This is a recommended upgrade.
  +	It fixes a bug reported by Fire Dragon <fdragon at saturn.fdragon.org>.
   Revision 1.5 - 2002-DEC-23
   	Improved filtering code. No significant functional changes.
   Revision 1.2 - 2002-SEP-25
  @@ -66,15 +69,17 @@
   cp /etc/services services.orig
   echo "# See services(5) for more information." > /etc/services
   cat port-numbers | tr -d '\r' | awk '
  -  /^$/ { inlist=0 }
  -  inlist { sub(/^ /, "#") }
  -  inlist && /^[^#]/ {
  -    # comment out the description field
  -    sub(/(^[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+)/, "&# ")
  +  match($0,
  +      /(^[^[:blank:]]+[[:blank:]]+[[:digit:]]+\/[^[:blank:]]+)(.*)/,
  +      field) {
  +    sub(/^[[:blank:]]+/, "&# ", field[2])
  +    printf("%s%s\n", field[1], field[2])
  +    next
  +  }
  +  !/^#/ { if (!sub(/^ /, "#")) { sub(/^/, "# ") } }
  +  {
  +    print $0
     }
  -  !inlist { printf "# " }
  -  { print $0 }
  -  /^-------/ { inlist=1 }
   ' >> /etc/services
   
   
  
  
  
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe hints' in the subject header of the message



More information about the hints mailing list