5 # make-localhost - edit the appropriate local information into
6 # /etc/namedb/localhost.rev
9 PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
12 if [ "`hostname -s`" != "`hostname`" ]; then
13 # hostname must contain domain
17 domain=`echo $fullhost | sed "s/^$host\.//"`
22 echo -n 'Enter your domain name: '
28 # strip trailing dot, if any
29 domain=`echo $domain | sed 's/\.$//'`
30 fullhost="$host.$domain"
37 mv -f master/localhost-v6.rev master/localhost-v6.rev.BAK 2>/dev/null
39 sed -e "s/@host@/$fullhost/g" \
40 -e "s/@domain@/$domain/g" \
41 -e "s/@date@/$date/g" \
42 < PROTO.localhost-v6.rev > master/localhost-v6.rev
44 mv -f master/localhost.rev master/localhost.rev.BAK 2>/dev/null
46 exec sed -e "s/@host@/$fullhost/g" \
47 -e "s/@domain@/$domain/g" \
48 -e "s/@date@/$date/g" \
49 < PROTO.localhost.rev > master/localhost.rev