3 # $FreeBSD: src/etc/namedb/make-localhost,v 1.4.2.2 2002/02/04 18:24:21 ume Exp $
4 # $DragonFly: src/etc/namedb/make-localhost,v 1.2 2003/06/17 04:24:48 dillon Exp $
6 # make-localhost - edit the appropriate local information into
7 # /etc/namedb/localhost.rev
10 PATH
=/sbin
:/bin
:/usr
/sbin
:/usr
/bin
:/usr
/local
/sbin
13 if [ "`hostname -s`" != "`hostname`" ]; then
14 # hostname must contain domain
18 domain
=`echo $fullhost | sed "s/^$host\.//"`
23 echo -n 'Enter your domain name: '
29 # strip trailing dot, if any
30 domain
=`echo $domain | sed 's/\.$//'`
31 fullhost
="$host.$domain"
36 mv -f localhost-v6.
rev localhost-v6.
rev.BAK
2>/dev
/null
38 sed -e "s/@host@/$fullhost/g" \
39 -e "s/@domain@/$domain/g" \
40 -e "s/@date@/$date/g" \
41 < PROTO.localhost-v6.
rev > localhost-v6.
rev
43 mv -f localhost.
rev localhost.
rev.BAK
2>/dev
/null
45 exec sed -e "s/@host@/$fullhost/g" \
46 -e "s/@domain@/$domain/g" \
47 -e "s/@date@/$date/g" \
48 < PROTO.localhost.
rev > localhost.
rev