File: create_resolv_conf

package info (click to toggle)
fai 3.1.8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,144 kB
  • ctags: 164
  • sloc: sh: 3,410; perl: 1,780; makefile: 113
file content (18 lines) | stat: -rw-r--r-- 512 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /bin/sh

### BEGIN SUBROUTINE INFO
# Provides-Var:    $DNSSRVS $DOMAIN
# Requires-Var:    none
# Short-Description: <task desc.>
### END SUBROUTINE INFO

# create a resolv.conf using the DHCP or BOOTP information
if [ "$DNSSRVS" ]; then
	[ "$DOMAIN" ] && echo "domain $DOMAIN" >/tmp/etc/resolv.conf
	for dnshost in $DNSSRVS ; do
	    echo "nameserver $dnshost" >>/tmp/etc/resolv.conf
	done
else
    # use the resolv.conf from the installserver
    cp -p /etc/resolv.conf-installserver /tmp/etc/resolv.conf
fi