From 37c62e42a0b3394fa2481e66c0e59cd2591bb654 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 9 Dec 2014 17:08:13 +0100 Subject: [PATCH] tmp: not needed --- tmp/post_upgrade_command | 45 ------------------------------------ tmp/post_upgrade_command.php | 26 --------------------- tmp/pre_upgrade_command | 30 ------------------------ 3 files changed, 101 deletions(-) delete mode 100755 tmp/post_upgrade_command delete mode 100755 tmp/post_upgrade_command.php delete mode 100644 tmp/pre_upgrade_command diff --git a/tmp/post_upgrade_command b/tmp/post_upgrade_command deleted file mode 100755 index 6fba41088..000000000 --- a/tmp/post_upgrade_command +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -/usr/local/etc/rc.conf_mount_rw - -PFSENSETYPE=`cat /usr/local/etc/platform` - -if [ $PFSENSETYPE = "pfSense" ] || [ $PFSENSETYPE = "nanobsd" ]; then - touch /conf/needs_package_sync -fi - -# Detect interactive logins and display the shell -detect_command='[ -n "$SSH_TTY" -o "$TERM" = "cons25" ] && exec /usr/local/etc/rc.initial' -echo "$detect_command" > $CVS_CO_DIR/root/.shrc -echo "$detect_command" >> $CVS_CO_DIR/root/.profile - -# Now turn on or off serial console as needed -echo "Checking for /tmp/$1/tmp/post_upgrade_command.php... " >> /conf/upgrade_log.txt -if [ -x /tmp/$1/tmp/post_upgrade_command.php ]; then - echo "Running /tmp/$1/tmp/post_upgrade_command.php $1" >> /conf/upgrade_log.txt - /tmp/$1/tmp/post_upgrade_command.php $1 >> /conf/upgrade_log.txt 2>&1 -elif [ -f /tmp/post_upgrade_command.php ]; then - echo "Running /tmp/post_upgrade_command.php $1" >> /conf/upgrade_log.txt - /tmp/post_upgrade_command.php $1 -fi - -# Remove any previous MD5 sum files -rm -f /root/*.md5 - -# File moved to pfSense php shell (pfSsh.php) -rm -rf /usr/local/sbin/cvs_sync.sh - -# Fixup permissions on installed files -if [ "${PFSENSETYPE}" = "nanobsd" ]; then - MTREECHKDIR=/tmp/${1}/ -else - MTREECHKDIR=/ -fi -if [ -f ${MTREECHKDIR}etc/installed_filesystem.mtree ]; then - /usr/sbin/mtree -U -e -q -f ${MTREECHKDIR}etc/installed_filesystem.mtree -p ${MTREECHKDIR} > /conf/mtree.log; -fi; - -# Make sure to preserve existing time zone -if [ "${PFSENSETYPE}" = "nanobsd" ] && [ -f /etc/localtime ]; then - /bin/cp -p /etc/localtime /tmp/${1}/etc/localtime 2>/dev/null -fi diff --git a/tmp/post_upgrade_command.php b/tmp/post_upgrade_command.php deleted file mode 100755 index f2ca79669..000000000 --- a/tmp/post_upgrade_command.php +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/local/bin/php -f -> /conf/upgrade_log.txt"); - setup_serial_port("upgrade", $newslicedir); diff --git a/tmp/pre_upgrade_command b/tmp/pre_upgrade_command deleted file mode 100644 index 82db587fb..000000000 --- a/tmp/pre_upgrade_command +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -/usr/local/etc/rc.conf_mount_rw - -# Record the previous version -PRIOR_VERSION=`uname -r | cut -d'.' -f1` -echo $PRIOR_VERSION > /tmp/pre_upgrade_version - -# Hack to workaround ticket #3749 -if [ "${PRIOR_VERSION}" = "8" ] && grep -q 'sh /usr/local/etc/rc.reboot' /usr/local/etc/rc.firmware; then - PROC=$(ps axwww | grep '/usr/local/etc/rc.firmware *pfSenseupgrade') - PID='' - IMG='' - if [ -n "${PROC}" ]; then - PID=$(echo "${PROC}" | awk '{print $1}') - IMG=$(echo "${PROC}" | sed 's,^.*pfSenseupgrade *,,') - fi - - if [ -n "${PID}" -a -n "${IMG}" -a -f "${IMG}" ]; then - cp -fp /bin/sh /tmp/sh.old - kill ${PID} >/dev/null 2>&1 - kill -9 ${PID} >/dev/null 2>&1 - sed -i '' -e 's,sh /,/tmp/sh.old /,' /usr/local/etc/rc.firmware - /usr/local/etc/rc.firmware pfSenseupgrade "${IMG}" - exit - fi -fi - -rm /boot/kernel/* -