~davewalker/ubuntu/maverick/eucalyptus/maverick_1.7

« back to all changes in this revision

Viewing changes to debian/patches/08-ubuntu-default-networking.patch

  • Committer: Dave Walker (Daviey)
  • Date: 2010-06-14 12:48:44 UTC
  • Revision ID: davewalker@ubuntu.com-20100614124844-ivbfj072y90e1hdi
* Switch to dpkg-source 3.0 (quilt) format
  - Extracted the following patches from our bzr branch, into flat patches.
* debian/build-jars: Replaced asm2 with asm3-all to match new groovy dependency.
* Revert: node/handlers_kvm.c: fix console bug (was only showing first 64K).
  (LP: #566793).
* clc/modules/www/src/main/java/edu/ucsb/eucalyptus/admin/server/EucalyptusWebBackendImpl.java:
  - fix user enumeration and account brute force. Courtesy of Chris Cheney. (LP: #579942)
* debian/eucalyptus-sc.upstart: Bump maximum number of loop devices for SC to 512. (LP: #586134)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
## Description: Default Ubuntu network settings for Ubuntu/UEC
 
2
## Origin: Manually generated from diff of Ubuntu 1.6.2 branch and upstream
 
3
## Bug: None
 
4
--- a/tools/eucalyptus.conf
 
5
+++ b/tools/eucalyptus.conf
 
6
@@ -158,18 +158,18 @@
 
7
 # xenbr1, etc' on older Xen versions, and 'eth0, eth1, etc' on newer
 
8
 # Xen versions.  The command 'brctl show' will give you more
 
9
 # information on your local bridge setup.
 
10
-VNET_BRIDGE="xenbr0"
 
11
+VNET_BRIDGE="br0"
 
12
 
 
13
 # This indicates where we have a dhcp server binary. We use it to provide
 
14
 # the images with IPs: Eucalyptus provides its own configuration per
 
15
 # instance. 
 
16
-VNET_DHCPDAEMON="/usr/sbin/dhcpd"
 
17
+VNET_DHCPDAEMON="/usr/sbin/dhcpd3"
 
18
 
 
19
 # Some systems have their DHCP daemon configured to run as a non-root
 
20
 # user.  If this is the case, set the name of that user here (by
 
21
 # default, Eucalyptus will set up DHCPD configuration files and
 
22
 # directories as owned by root).
 
23
-#VNET_DHCPUSER="root"
 
24
+VNET_DHCPUSER="dhcpd"
 
25
 
 
26
 # Following are example eucalyptus VM networking configurations.
 
27
 # There are four modes to choose from (MANAGED, MANAGED-NOVLAN,
 
28
@@ -197,7 +197,7 @@
 
29
 # to your cloud-contoller's IP address (must be an address that can be
 
30
 # reached by the CC).
 
31
 
 
32
-#VNET_MODE="MANAGED"
 
33
+VNET_MODE="MANAGED-NOVLAN"
 
34
 #VNET_SUBNET="192.168.0.0"
 
35
 #VNET_NETMASK="255.255.0.0"
 
36
 #VNET_DNS="your-dns-server-ip"
 
37
@@ -212,7 +212,7 @@
 
38
 # will typically invoke a DHCP client to aquire an IP address.  Use
 
39
 # this mode if you wish to manage VM IPs yourself, or allow the VMs to
 
40
 # pick up an IP from a non-eucalyptus managed DHCP server.
 
41
-VNET_MODE="SYSTEM"
 
42
+#VNET_MODE="SYSTEM"
 
43
 
 
44
 # If VNET_MODE is set to STATIC, you can manually configure a set of
 
45
 # IP addresses that will be allocated to VMs at boot time in a first
 
46
--- a/tools/add_key.pl
 
47
+++ b/tools/add_key.pl
 
48
@@ -61,6 +61,22 @@
 
49
 delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
 
50
 $ENV{'PATH'}='/bin:/usr/bin:/sbin:/usr/sbin/';
 
51
 
 
52
+$eucaconf=$ENV{'EUCALYPTUS'} . "/etc/eucalyptus/eucalyptus.conf";
 
53
+if (open(FH, "$eucaconf")) {
 
54
+    while(<FH>) {
 
55
+       chomp;
 
56
+       my $line = $_;
 
57
+       if ($line =~ /^\s*VNET_MODE="(.*)"/) {
 
58
+           my $mode = $1;
 
59
+           if (($mode =~ /MANAGED/) ) {
 
60
+               # only do key injection if we're not in managed mode
 
61
+               print "done\n";
 
62
+               exit(0);
 
63
+           }
 
64
+       }
 
65
+    }
 
66
+    close(FH);
 
67
+}
 
68
 #$MOUNT=untaint(`which mount`);
 
69
 #$UMOUNT=untaint(`which umount`);
 
70
 #$MOUNT=untaint("/tmp/euca_mountwrap");