387 872 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#
# New firewall type.
#
use strict;
use libdb;

sub DoUpdate($$$)
{
    my ($dbhandle, $dbname, $version) = @_;

    DBQueryFatal("alter table default_firewall_rules change `type` ".
		 " `type` enum('ipfw','ipfw2','iptables','ipfw2-vlan',".
		 "             'iptables-vlan','iptables-dom0', ".
		 "             'iptables-domU') ".
		 "  NOT NULL default 'ipfw'");

    if (!DBSlotExists("virt_nodes", "firewall_style")) {
	DBQueryFatal("alter table virt_nodes add ".
		     "  `firewall_style` tinytext");
    }
    DBQueryFatal("REPLACE INTO table_regex VALUES ".
		 "('virt_nodes','firewall_style','text','regex',".
		 "'^(open|closed|basic|emulab)\$',0,0,NULL)");
    
    if (!DBSlotExists("virt_nodes", "firewall_log")) {
	DBQueryFatal("alter table virt_nodes add ".
		     "  `firewall_log` tinytext");
    }
Leigh B Stoller's avatar
Leigh B Stoller committed
29
    return 0;
30
31
32
33
34
}

# Local Variables:
# mode:perl
# End: