diff options
author | jim-p <jimp@pfsense.org> | 2014-02-28 11:36:07 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2014-02-28 11:37:14 -0500 |
commit | c468ffb5ce7100f720166789f48f7fef650c1223 (patch) | |
tree | 1fa2d42c45906aa96ed9bcd087715de255d1b820 /tmp/post_upgrade_command.php | |
parent | b31247af7014e0703c7e38480cf1236fed735ce5 (diff) | |
download | pfsense-c468ffb5ce7100f720166789f48f7fef650c1223.zip pfsense-c468ffb5ce7100f720166789f48f7fef650c1223.tar.gz |
Add a file flag to trigger the forced serial or else we may miss it during a firmware update and still end up with an accidentally disabled port.
Diffstat (limited to 'tmp/post_upgrade_command.php')
-rwxr-xr-x | tmp/post_upgrade_command.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tmp/post_upgrade_command.php b/tmp/post_upgrade_command.php index 309be16..44c5006 100755 --- a/tmp/post_upgrade_command.php +++ b/tmp/post_upgrade_command.php @@ -13,14 +13,15 @@ system("pfSsh.php playback gitsync " . escapeshellarg($config['system']['gitsync']['branch']) . " --upgrading"); } - if($g['platform'] == "embedded" || $g['enableserial_force']) { + $newslicedir = ""; + if ($argv[1] != "") + $newslicedir = '/tmp/' . $argv[1]; + + if($g['platform'] == "embedded" || $g['enableserial_force'] || file_exists("{$newslicedir}/enableserial_force")) { $config['system']['enableserial'] = true; write_config(); } - $newslicedir = ""; - if ($argv[1] != "") - $newslicedir = '/tmp/' . $argv[1]; system("echo \"Adding serial port settings ({$newslicedir})...\" >> /conf/upgrade_log.txt"); setup_serial_port("upgrade", $newslicedir); |