#!/bin/sh #---------------------------------------------------------------------------- # /etc/rc.d/rc040.dns-local # # Creation: 13.04.2000 fm # Last Update: $Id$ # # Copyright (c) 2000-2001 - Frank Meyer # Copyright (c) 2001-2016 - fli4l-Team #---------------------------------------------------------------------------- begin_script RC040_DNS_LOCAL "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 ipaddr=$DNS_FORWARDERS 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 end_script