summaryrefslogtreecommitdiffstats
path: root/tmp/post_upgrade_command.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2014-02-28 11:36:07 -0500
committerjim-p <jimp@pfsense.org>2014-02-28 11:36:57 -0500
commit9904df17e50a827eb8e00fb1a595b313b98b5f31 (patch)
treedc176780278055119142042d3b2045a57733aaef /tmp/post_upgrade_command.php
parent9cca1a4fdbb6d6e8abe84262b3769b75d312d058 (diff)
downloadpfsense-9904df17e50a827eb8e00fb1a595b313b98b5f31.zip
pfsense-9904df17e50a827eb8e00fb1a595b313b98b5f31.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-xtmp/post_upgrade_command.php9
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);
OpenPOWER on IntegriCloud