/[debconf-video]/fai-config/scripts/DEBCONF10/10-fix-fqdn
ViewVC logotype

Contents of /fai-config/scripts/DEBCONF10/10-fix-fqdn

Parent Directory Parent Directory | Revision Log Revision Log


Revision 546 - (show annotations) (download)
Wed Jul 21 14:35:54 2010 UTC (2 years, 9 months ago) by edrz-guest
File size: 377 byte(s)
$HOSTNAME is a possible bashism.
 
1 #!/bin/bash
2
3 # fix /etc/mailname
4 echo "$HOSTNAME.dc10.debconf.org" > /etc/mailname
5
6 # fix /etc/hosts
7
8 IPADDRESS=`host $HOSTNAME | awk '{print $4}'|head -1`
9 cat /etc/hosts |grep -v "127.0"|grep -v $HOSTNAME > /etc/hosts.tmp
10 echo "127.0.0.1 localhost" >> /etc/hosts.tmp
11 echo "$IPADDRESS $HOSTNAME.dc10.debconf.org $HOSTNAME" >> /etc/hosts.tmp
12 mv /etc/hosts.tmp /etc/hosts
13

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5