Revision baef6be8
Added by Jim Pingle about 13 years ago
etc/inc/pfsense-utils.inc | ||
---|---|---|
976 | 976 |
} |
977 | 977 |
if($g['platform'] != "cdrom") { |
978 | 978 |
/* serial console - write out /boot/loader.conf */ |
979 |
if ($when == "upgrade") |
|
980 |
system("echo \"Reading {$loader_conf_file}...\" >> /conf/upgrade_log.txt"); |
|
979 | 981 |
$boot_config = file_get_contents($loader_conf_file); |
980 | 982 |
$boot_config_split = explode("\n", $boot_config); |
981 | 983 |
if(count($boot_config_split) > 0) { |
etc/rc.firmware | ||
---|---|---|
298 | 298 |
|
299 | 299 |
# If /tmp/$GLABEL_SLICE/tmp/post_upgrade_command exists |
300 | 300 |
# after update then execute the command. |
301 |
echo "Checking for post_upgrade_command..." >> /conf/upgrade_log.txt |
|
301 | 302 |
if [ -f /tmp/$GLABEL_SLICE/tmp/post_upgrade_command ]; then |
303 |
echo "Found post_upgrade_command, executing ($GLABEL_SLICE)..." >> /conf/upgrade_log.txt |
|
302 | 304 |
sh /tmp/$GLABEL_SLICE/tmp/post_upgrade_command $GLABEL_SLICE >> /conf/upgrade_log.txt 2>&1 |
303 | 305 |
fi |
304 | 306 |
|
tmp/post_upgrade_command | ||
---|---|---|
72 | 72 |
echo "$detect_command" >> $CVS_CO_DIR/root/.profile |
73 | 73 |
|
74 | 74 |
# Now turn on or off serial console as needed |
75 |
echo "Checking for /tmp/$1/tmp/post_upgrade_command.php... " >> /conf/upgrade_log.txt |
|
75 | 76 |
if [ -x /tmp/$1/tmp/post_upgrade_command.php ]; then |
77 |
echo "Running /tmp/$1/tmp/post_upgrade_command.php $1" >> /conf/upgrade_log.txt |
|
76 | 78 |
/tmp/$1/tmp/post_upgrade_command.php $1 >> /conf/upgrade_log.txt 2>&1 |
77 | 79 |
elif [ -f /tmp/post_upgrade_command.php ]; then |
80 |
echo "Running /tmp/post_upgrade_command.php $1" >> /conf/upgrade_log.txt |
|
78 | 81 |
/tmp/post_upgrade_command.php $1 |
79 | 82 |
fi |
80 | 83 |
|
tmp/post_upgrade_command.php | ||
---|---|---|
21 | 21 |
$newslicedir = ""; |
22 | 22 |
if ($ARGV[1] != "") |
23 | 23 |
$newslicedir = '/tmp/' . $ARGV[1]; |
24 |
system("echo \"Adding serial port settings ({$newslicedir})...\" >> /conf/upgrade_log.txt"); |
|
24 | 25 |
setup_serial_port("upgrade", $newslicedir); |
25 | 26 |
|
26 | 27 |
$files_to_process = file("/etc/pfSense.obsoletedfiles"); |
Also available in: Unified diff
Be more verbose during upgrade to see why nanobsd isn't carrying over the setting as expected.