Magellan Linux

Diff of /trunk/installer/include/prepare_networking.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1022 by niro, Wed Sep 24 10:54:00 2008 UTC revision 1023 by niro, Sun May 30 17:39:49 2010 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    # $Id$
3    
4  : ${INSTALL_ROOT="/mnt/magellan"}  : ${INSTALL_ROOT="/mnt/magellan"}
5    
# Line 42  then Line 43  then
43   # the 'a' in the sed line appends a line after the regex (127.0.0.1.*localhost)   # the 'a' in the sed line appends a line after the regex (127.0.0.1.*localhost)
44   sed -i "/127.0.0.1.*localhost/ a \${NETWORK_IP}\t${NETWORK_HOSTNAME}.${NETWORK_DOMAIN}\t${NETWORK_HOSTNAME}" ${INSTALL_ROOT}/etc/hosts   sed -i "/127.0.0.1.*localhost/ a \${NETWORK_IP}\t${NETWORK_HOSTNAME}.${NETWORK_DOMAIN}\t${NETWORK_HOSTNAME}" ${INSTALL_ROOT}/etc/hosts
45  else  else
46   sed -i "s:^\(127.0.0.1.*localhost\):\1\t${NETWORK_HOSTNAME}.${NETWORK_DOMAIN}\t${NETWORK_HOSTNAME}" ${INSTALL_ROOT}/etc/hosts   sed -i "s:^\(127.0.0.1.*localhost\):\1\t${NETWORK_HOSTNAME}.${NETWORK_DOMAIN}\t${NETWORK_HOSTNAME}:" ${INSTALL_ROOT}/etc/hosts
47  fi  fi

Legend:
Removed from v.1022  
changed lines
  Added in v.1023