IMPORTANT: Per accedir als fitxer de subversion: http://acacha.org/svn (sense password). Poc a poc s'aniran migrant els enllaços. Encara però funciona el subversion de la farga però no se sap fins quan... (usuari: prova i la paraula de pas 123456)

Consulteu DHCP#DHCP_hooks

 make_resolv_conf() {
    if [ "$new_domain_name" -o "$new_domain_name_servers" ]; then
        # Find out whether we are going to mount / rw
        exec 9>&0 </etc/fstab
        rootmode=rw
        while read dev mnt type opts dump pass junk; do
            [ "$mnt" != / ] && continue
            case "$opts" in
                ro|ro,*|*,ro|*,ro,*)
                   rootmode=ro
                   ;;
                 esac
         done
         exec 0>&9 9>&-
 
        # Wait for /etc/resolv.conf to become writable
        if [ "$rootmode" = "rw" ]; then
            while [ ! -w /etc ]; do
                sleep 0.1
            done
        fi

        local new_resolv_conf=/etc/resolv.conf.dhclient-new
        rm -f $new_resolv_conf
        if [ "$new_domain_name" ]; then
            echo domain ${new_domain_name%% *} >>$new_resolv_conf
        fi
	if [ "$new_domain_search" ]; then
	    #new_domain_search="${new_domain_search% }"
	    if [ "$new_domain_name" ]; then
		domain_in_search_list=""
		for domain in "$new_domain_search"; do
			if [ "$domain" = "$new_domain_name" ]; then
				domain_in_search="Yes"
			fi
		done
		if [ ! "$domain_in_search" ]; then
	    		new_domain_search="$new_domain_name $new_domain_search"
		fi
	    fi
	    echo "search ${new_domain_search}" >> $new_resolv_conf
	elif [ "$new_domain_name" ]; then
		echo "search ${new_domain_name}" >> $new_resolv_conf
	fi
        if [ "$new_domain_name_servers" ]; then
                   for nameserver in $new_domain_name_servers; do
                       echo nameserver $nameserver >>$new_resolv_conf
            done
        else # keep 'old' nameservers
            sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf >>$new_resolv_conf
        fi
        chown --reference=/etc/resolv.conf $new_resolv_conf
        chmod --reference=/etc/resolv.conf $new_resolv_conf
        mv -f $new_resolv_conf /etc/resolv.conf
    fi
}