summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtmp/post_upgrade_command10
-rwxr-xr-xtmp/post_upgrade_command.php3
2 files changed, 7 insertions, 6 deletions
diff --git a/tmp/post_upgrade_command b/tmp/post_upgrade_command
index 99285e4..8603a53 100755
--- a/tmp/post_upgrade_command
+++ b/tmp/post_upgrade_command
@@ -2,7 +2,9 @@
/etc/rc.conf_mount_rw
+PFSENSETYPE=`cat /etc/platform`
KERNELTYPE=`cat /boot/kernel/pfsense_kernel.txt`
+
if [ $KERNELTYPE = "wrap" ]; then
if [ -f /kernels/kernel_wrap.gz ]; then
tar xzpf /kernels/kernel_wrap.gz --exclude loader.conf -C /boot/
@@ -26,6 +28,10 @@ if [ $KERNELTYPE = "UP" ]; then
fi
fi
+if [ $PFSENSETYPE = "pfSense" ] || [ $PFSENSETYPE = "nanobsd" ]; then
+ touch /conf/needs_package_sync
+fi
+
# Detect interactive logins and display the shell
echo "if [ \`env | grep SSH_TTY | wc -l\` -gt 0 ] || [ \`env | grep cons25 | wc -l\` -gt 0 ]; then" > $CVS_CO_DIR/root/.shrc
echo " /etc/rc.initial" >> $CVS_CO_DIR/root/.shrc
@@ -37,7 +43,7 @@ echo " exit" >> $CVS_CO_DIR/root/.profile
echo "fi" >> $CVS_CO_DIR/root/.profile
# Now turn on or off serial console as needed
-php -f /tmp/post_upgrade_command.php
+/tmp/post_upgrade_command.php
# Remove any previous MD5 sum files
rm -f /root/*.md5
@@ -45,7 +51,6 @@ rm -f /root/*.md5
# File moved to pfSense php shell (pfSsh.php)
rm -rf /usr/local/sbin/cvs_sync.sh
-PFSENSETYPE=`cat /etc/platform`
if [ $PFSENSETYPE = "embedded" ]; then
cp /etc/ttys_wrap /etc/ttys
fi
@@ -53,4 +58,3 @@ fi
if [ -f /usr/local/sbin/php ]; then
rm /usr/local/sbin/php
fi
-
diff --git a/tmp/post_upgrade_command.php b/tmp/post_upgrade_command.php
index dfe9342..a188710 100755
--- a/tmp/post_upgrade_command.php
+++ b/tmp/post_upgrade_command.php
@@ -20,9 +20,6 @@
setup_serial_port();
- if($g['platform'] == "pfSense" or $g['platform'] == "nanobsd")
- touch("/conf/needs_package_sync");
-
$files_to_process = split("\n", file_get_contents("/etc/pfSense.obsoletedfiles"));
foreach($files_to_process as $filename)
if(file_exists($filename))
OpenPOWER on IntegriCloud