#---------------------------------------------------------------------------- # /etc/rc.d/rc001.base # was file /etc/config.sh # # Creation: 13.04.2000 fm # Last Update: $Id$ # # Copyright (c) 2000-2001 Frank Meyer #---------------------------------------------------------------------------- begin_script RC001_BASE "creating /etc/resolv.conf and /etc/hosts ..." write_resolv_conf () { log_info "writing /etc/resolv.conf ..." if [ "$OPT_DNS" = "yes" ] then ipaddr=127.0.0.1 else # to get sure that no port-extensions get into resolv.conf ipaddr=`echo $DNS_FORWARDERS | sed -e 's/\[\(.*\)\]:[0-9]*/\1/g' -e 's/\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\):[0-9]*/\1/g'` fi { cat </etc/resolv.conf } write_etc_hosts () { log_info "writing /etc/hosts ..." { cat </etc/hosts } if [ ! -f /etc/resolv.conf ] # already existing? then # yes, don't overwrite write_resolv_conf fi if [ ! -f /etc/hosts ] # already existing? then # yes, don't overwrite write_etc_hosts fi ip_up_events=no # assume there are no ip-up/down events > /etc/portfw.conf end_script