[BACK]Return to postinstall CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/etc/Attic/postinstall between version 1.74.2.4 and 1.75

version 1.74.2.4, 2004/08/30 19:37:12 version 1.75, 2004/04/18 04:02:27
Line 873  do_sendmail()
Line 873  do_sendmail()
         return ${failed}          return ${failed}
 }  }
   
 #  
 #       hosts  
 #  
 additem hosts "/etc/hosts being up to date"  
 do_hosts()  
 {  
         [ -n "$1" ] || err 2 "USAGE: do_hosts  fix|check"  
         op=$1  
   
         failed=0  
         h=${DEST_DIR}/etc/hosts  
         if ! grep ^127 $h | sed 's/^[^  ]*//' | grep '\.' > /dev/null; then  
                 msg "/etc/hosts entry for localhost (ipv4) missing dotted alias"  
   
                 if [ "${op}" = "fix" ]; then  
                         if ! sed 's/^\(127.*\)$/\1 localhost./' < $h \  
                             > ${SCRATCHDIR}/hosts ||  
                             ! mv ${SCRATCHDIR}/hosts $h; then  
                                 msg "Can't update /etc/hosts"  
                                 failed=1  
                         fi  
                 else  
                         failed=1  
                 fi  
         fi  
         if ! grep ^::1 $h | sed 's/^[^  ]*//' | grep '\.' > /dev/null; then  
                 msg "/etc/hosts entry for localhost (ipv6) missing dotted alias"  
   
                 if [ "${op}" = "fix" ]; then  
                         if ! sed 's/^\(::1.*\)$/\1 localhost./' < $h \  
                             > ${SCRATCHDIR}/hosts ||  
                             ! mv ${SCRATCHDIR}/hosts $h; then  
                                 msg "Can't update /etc/hosts"  
                                 failed=1  
                         fi  
                 else  
                         failed=1  
                 fi  
         fi  
   
         return ${failed}  
 }  
   
   
 #  #
 #       end of items  #       end of items
Line 966  list()
Line 923  list()
   
 main()  main()
 {  {
         while getopts s:d:m:a: ch; do          while getopts s:d:m: ch; do
                 case ${ch} in                  case ${ch} in
                 s)                  s)
                         SRC_DIR=${OPTARG}                          SRC_DIR=${OPTARG}

Legend:
Removed from v.1.74.2.4  
changed lines
  Added in v.1.75

CVSweb <webmaster@jp.NetBSD.org>