cvs commit: hints iana_protocols+services.txt

timothy at linuxfromscratch.org timothy at linuxfromscratch.org
Tue Dec 24 07:49:48 PST 2002


timothy     02/12/24 10:49:48

  Modified:    .        iana_protocols+services.txt
  Log:
  Updates by author. Happy Holidays.
  
  Revision  Changes    Path
  1.5       +29 -29    hints/iana_protocols+services.txt
  
  Index: iana_protocols+services.txt
  ===================================================================
  RCS file: /home/cvsroot/hints/iana_protocols+services.txt,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- iana_protocols+services.txt	23 Nov 2002 20:08:10 -0000	1.4
  +++ iana_protocols+services.txt	24 Dec 2002 15:49:48 -0000	1.5
  @@ -18,6 +18,14 @@
   list is updated frequently.
   
   
  +Change Log
  +
  +Revision 1.5 - 2002-DEC-23
  +	Improved filtering code. No significant functional changes.
  +Revision 1.2 - 2002-SEP-25
  +	First complete version.
  +
  +
   Required Software
   
   These instructions may need to be adapted to run on older LFS versions
  @@ -42,40 +50,32 @@
   cd /var/tmp
   wget http://www.iana.org/assignments/protocol-numbers
   cp /etc/protocols protocols.orig
  -echo "See protocols(5) for more information." > /etc/protocols
  -cat protocol-numbers | tr -d '\r' | awk --re-interval \
  -  '{
  -    if (match($0, \
  -        "^[[:space:]]+([[:digit:]]+)[[:space:]]{1,5}([^[:space:]]+)(.*)", \
  -	field)) {
  -      sub("^[[:space:]]*", "", field[3])
  -      printf "%-16s%-5s%-16s# %s\n", \
  -             tolower(field[2]), field[1], field[2], field[3]
  -    } else {
  -      printf "# " $0 "\n"
  -    }
  -  }' > /etc/protocols
  +echo "# See protocols(5) for more information." > /etc/protocols
  +cat protocol-numbers | tr -d '\r' | awk --re-interval '
  +  match($0, /^[[:blank:]]+([[:digit:]]+)[[:blank:]]{1,5}([^[:blank:]]+)(.*)/, \
  +        field) {
  +    sub(/^[[:blank:]]*/, "", field[3])
  +    printf "%-16s%-5s%-16s# %s\n", \
  +           tolower(field[2]), field[1], field[2], field[3]
  +    next
  +  }
  +  { print "# ", $0 }
  +' >> /etc/protocols
   
   wget http://www.iana.org/assignments/port-numbers
   cp /etc/services services.orig
  -echo "See services(5) for more information." > /etc/services
  -cat port-numbers | tr -d '\r' | awk \
  -  'BEGIN { inlist=0 } 
  +echo "# See services(5) for more information." > /etc/services
  +cat port-numbers | tr -d '\r' | awk '
     /^$/ { inlist=0 }
  -  {
  -    if (inlist) {
  -      sub("^ ", "#")
  -      if ( index($0, "#")!=1 ) {
  -        # comment the description field
  -        sub("(^[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+)", "&# ")
  -      }
  -    } else {
  -      printf "# "
  -    }
  -    print $0
  +  inlist { sub(/^ /, "#") }
  +  inlist && /^[^#]/ {
  +    # comment out the description field
  +    sub(/(^[^[:blank:]]+[[:blank:]]+[^[:blank:]]+[[:blank:]]+)/, "&# ")
     }
  -  /^-------/ { inlist=1 }' \
  -  > /etc/services
  +  !inlist { printf "# " }
  +  { print $0 }
  +  /^-------/ { inlist=1 }
  +' >> /etc/services
   
   
   [1] IANA: Internet Assigned Numbers Authority, http://www.iana.org/
  
  
  
-- 
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