summaryrefslogtreecommitdiffstats
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:37:14 -0500
commitc468ffb5ce7100f720166789f48f7fef650c1223 (patch)
tree1fa2d42c45906aa96ed9bcd087715de255d1b820
parentb31247af7014e0703c7e38480cf1236fed735ce5 (diff)
downloadpfsense-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.
-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