/[sysadmin-cookbook]/recepies/lxc/ve2lxc.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /recepies/lxc/ve2lxc.sh

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

revision 110 by dpavlin, Mon Jun 15 19:19:03 2009 UTC revision 111 by dpavlin, Mon Jun 15 20:22:04 2009 UTC
# Line 5  test -z "$1" && echo "usage: $0 /path/to Line 5  test -z "$1" && echo "usage: $0 /path/to
5  dir=$1  dir=$1
6  hostname=ve2lxc  hostname=ve2lxc
7  ip=$2  ip=$2
8  netmask=255.255.254.0  netmask=`grep netmask /etc/network/interfaces | head -1 | sed 's/^.*netmask *//'`
9    gateway=`grep gateway /etc/network/interfaces | head -1 | sed 's/^.*gateway *//'`
10    
11  test -z "$ip" && ip=10.60.0.253  test -z "$ip" && ip=10.60.0.253
12    
# Line 45  iface lo inet loopback Line 46  iface lo inet loopback
46  iface eth0 inet static  iface eth0 inet static
47          address $ip          address $ip
48          netmask $netmask          netmask $netmask
49            gateway $gateway
50    
51  __interfaces__  __interfaces__
52    

Legend:
Removed from v.110  
changed lines
  Added in v.111

  ViewVC Help
Powered by ViewVC 1.1.26