From 219585dac77e6f00f38528b4609eea61ea481882 Mon Sep 17 00:00:00 2001 From: smos Date: Wed, 23 Feb 2011 14:55:33 +0100 Subject: Do not cross filesystem boundaries when removing files lest we empty Seth' USB stick --- etc/rc.shutdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/rc.shutdown b/etc/rc.shutdown index 9d46ad2..a4b2530 100755 --- a/etc/rc.shutdown +++ b/etc/rc.shutdown @@ -28,7 +28,7 @@ export PATH # temporary files on shutdown from /tmp/ PLATFORM=`cat /etc/platform` if [ "$PLATFORM" = "pfSense" ]; then - rm -rf /tmp/* + find -xdev /tmp/ -exec rm -rf {} else /etc/rc.backup_rrd.sh /etc/rc.backup_dhcpleases.sh -- cgit v1.1 From 685a26fc70ae7d97ed81ec3e48972c97c109215b Mon Sep 17 00:00:00 2001 From: smos Date: Wed, 23 Feb 2011 15:01:01 +0100 Subject: Correct the gateway group member name to the correct GW_". strtoupper($if) uppercase. This fixes outbound load balancer pools upgraded from 1.2.3 not working --- etc/inc/upgrade_config.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index b5c492a..c52ec8f 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -1681,7 +1681,7 @@ function upgrade_053_to_054() { } else { $i = 1; } - $gateway_group['item'][] = "$interface|$i"; + $gateway_group['item'][] = "$static_name|$i"; } $gateway_group_arr[] = $gateway_group; } else { -- cgit v1.1 From 3d0397011cbc467982950400ac3e5b5a0cd93eff Mon Sep 17 00:00:00 2001 From: smos Date: Wed, 23 Feb 2011 15:07:04 +0100 Subject: Make sure we iterate by the vlan number lest we end up with a empty variable? Hopefully fix new vlan name not being assigned to interfaces section --- etc/inc/upgrade_config.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'etc') diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index c52ec8f..cc8042a 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -820,15 +820,16 @@ function upgrade_044_to_045() { global $config; $iflist = get_configured_interface_list(false, true); if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) { + $i = 0; foreach ($config['vlans']['vlan'] as $id => $vlan) { - $config['vlans']['vlan'][$id]['vlanif'] = "{$vlan['if']}_vlan{$vlan['tag']}"; + $config['vlans']['vlan'][$i]['vlanif'] = "{$vlan['if']}_vlan{$vlan['tag']}"; /* Make sure to update the interfaces section with the right name */ foreach($iflist as $ifname) { - if($config['interfaces'][$ifname]['if'] == "vlan{$id}") { + if($config['interfaces'][$ifname]['if'] == "vlan{$i}") { $config['interfaces'][$ifname]['if'] = $vlan['vlanif']; } } - + $i++; } } } -- cgit v1.1 From 443f2e6e7804a6ac9f5f65240bb330a9182bb911 Mon Sep 17 00:00:00 2001 From: smos Date: Wed, 23 Feb 2011 15:19:27 +0100 Subject: Attempted fix that should convert the old carp[$i] naming to vip[$vhid] --- etc/inc/upgrade_config.inc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'etc') diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index cc8042a..b5a8a60 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -918,6 +918,11 @@ function upgrade_046_to_047() { if (isset($tunnel['disabled'])) $ph1ent['disabled'] = $tunnel['disabled']; + /* convert to the new vip[$vhid] name */ + if(preg_match("/^carp/", $tunnel['interface'])) { + $carpid = substr($tunnel['interface'], 5); + $tunnel['interface'] = "vip" . $config['virtualip'][$carpid]['vhid']; + } $ph1ent['interface'] = $tunnel['interface']; $ph1ent['remote-gateway'] = $tunnel['remote-gateway']; $ph1ent['descr'] = $tunnel['descr']; -- cgit v1.1 From 4aa58d46e16853e45bc2470a0e49a8ecbb55698b Mon Sep 17 00:00:00 2001 From: smos Date: Wed, 23 Feb 2011 15:45:27 +0100 Subject: Correct the config path to the vip array --- etc/inc/upgrade_config.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index b5a8a60..8bb2c77 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -921,7 +921,7 @@ function upgrade_046_to_047() { /* convert to the new vip[$vhid] name */ if(preg_match("/^carp/", $tunnel['interface'])) { $carpid = substr($tunnel['interface'], 5); - $tunnel['interface'] = "vip" . $config['virtualip'][$carpid]['vhid']; + $tunnel['interface'] = "vip" . $config['virtualip']['vip'][$carpid]['vhid']; } $ph1ent['interface'] = $tunnel['interface']; $ph1ent['remote-gateway'] = $tunnel['remote-gateway']; -- cgit v1.1