Project

General

Profile

Download (972 Bytes) Statistics
| Branch: | Tag: | Revision:
1 5f26831e Scott Ullrich
#!/usr/local/bin/php -f 
2
<?php
3 854415fa sullrich
4 5f26831e Scott Ullrich
	/* upgrade embedded users serial console */
5
	require_once("globals.inc");
6
	require_once("config.inc");
7 854415fa sullrich
	require_once("functions.inc");
8
9 f0ce6758 Erik Fonnesbeck
	if(file_exists("/usr/local/bin/git") && isset($config['system']['gitsync']['synconupgrade'])) {
10
		if(isset($config['system']['gitsync']['repositoryurl']))
11
			exec("cd /root/pfsense/pfSenseGITREPO/pfSenseGITREPO && git config remote.origin.url " . escapeshellarg($config['system']['gitsync']['repositoryurl']));
12
		if(isset($config['system']['gitsync']['branch']))
13
			system("pfSsh.php playback gitsync " . escapeshellarg($config['system']['gitsync']['branch']) . " --upgrading");
14
	}
15
16 5f26831e Scott Ullrich
	if($g['platform'] == "embedded") {
17
		$config['system']['enableserial'] = true;
18
		write_config();
19
	}
20 854415fa sullrich
21 5f26831e Scott Ullrich
	setup_serial_port();
22 7770cea8 Scott Ullrich
		
23 5d8c7db8 Scott Ullrich
	$files_to_process = split("\n", file_get_contents("/etc/pfSense.obsoletedfiles"));
24
	foreach($files_to_process as $filename) 
25
		if(file_exists($filename)) 
26 d32d3970 Scott Ullrich
			exec("/bin/rm -f $filename");
27 5d8c7db8 Scott Ullrich
28 5f26831e Scott Ullrich
?>