5 # Manage network related configuration files
7 # Mark Huang <mlhuang@cs.princeton.edu>
8 # Copyright (C) 2006 The Trustees of Princeton University
10 # $Id: network,v 1.2 2006/04/25 21:18:19 mlhuang Exp $
13 # Source function library and configuration
14 . /etc/plc.d/functions
15 . /etc/planetlab/plc_config
19 MESSAGE=$"Generating network files"
23 echo "127.0.0.1 localhost.localdomain localhost" >/etc/hosts
25 for server in API BOOT WWW ; do
26 hostname=PLC_${server}_HOST
27 ip=$(gethostbyname ${!hostname})
28 if [ -n "$ip" ] ; then
29 echo "$ip ${!hostname}"
36 [ -n "$PLC_NET_DNS1" ] && echo "nameserver $PLC_NET_DNS1"
37 [ -n "$PLC_NET_DNS2" ] && echo "nameserver $PLC_NET_DNS2"