projects
/
sysadmin-cookbook
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8ce5d7
)
added gateway to lxc's /etc/network/interfaces
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 15 Jun 2009 20:22:04 +0000
(20:22 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 15 Jun 2009 20:22:04 +0000
(20:22 +0000)
git-svn-id: svn://svn.rot13.org/sysadmin-cookbook@111
191e9f34
-6774-4a6d-acfc-
7664dacd4a2a
recepies/lxc/ve2lxc.sh
patch
|
blob
|
history
diff --git
a/recepies/lxc/ve2lxc.sh
b/recepies/lxc/ve2lxc.sh
index
82e1154
..
702619c
100755
(executable)
--- a/
recepies/lxc/ve2lxc.sh
+++ b/
recepies/lxc/ve2lxc.sh
@@
-5,7
+5,8
@@
test -z "$1" && echo "usage: $0 /path/to/ve/private [10.60.0.253]" && exit
dir=$1
hostname=ve2lxc
ip=$2
-netmask=255.255.254.0
+netmask=`grep netmask /etc/network/interfaces | head -1 | sed 's/^.*netmask *//'`
+gateway=`grep gateway /etc/network/interfaces | head -1 | sed 's/^.*gateway *//'`
test -z "$ip" && ip=10.60.0.253
@@
-45,6
+46,7
@@
iface lo inet loopback
iface eth0 inet static
address $ip
netmask $netmask
+ gateway $gateway
__interfaces__