Commit fce62d61 authored by Franco Fichtner's avatar Franco Fichtner

etc: move rc.conf_mount_r*

parent ebcc9920
......@@ -96,7 +96,7 @@ ON_DISK_V6_CKSUM=`md5 /tmp/bogonsv6 | awk '{ print $4 }'`
if [ "$BOGON_V4_CKSUM" = "$ON_DISK_V4_CKSUM" ] || [ "$BOGON_V6_CKSUM" = "$ON_DISK_V6_CKSUM" ]; then
# At least one of the downloaded checksums matches, so mount RW
/etc/rc.conf_mount_rw
/usr/local/etc/rc.conf_mount_rw
ENTRIES_MAX=`pfctl -s memory | awk '/table-entries/ { print $4 }'`
......@@ -145,7 +145,7 @@ if [ "$BOGON_V4_CKSUM" = "$ON_DISK_V4_CKSUM" ] || [ "$BOGON_V6_CKSUM" = "$ON_DIS
fi
# We mounted RW, so switch back to RO
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
fi
if [ "$checksum_error" != "" ]; then
......
#!/bin/sh
/etc/rc.conf_mount_rw
/usr/local/etc/rc.conf_mount_rw
PFSENSETYPE=`cat /usr/local/etc/platform`
......
#!/bin/sh
/etc/rc.conf_mount_rw
/usr/local/etc/rc.conf_mount_rw
# Record the previous version
PRIOR_VERSION=`uname -r | cut -d'.' -f1`
......
......@@ -2,7 +2,7 @@
# Save the DHCP lease database to the config path.
if [ -d "/var/dhcpd/var/db" ]; then
/etc/rc.conf_mount_rw
/usr/local/etc/rc.conf_mount_rw
cd / && tar -czf /cf/conf/dhcpleases.tgz -C / var/dhcpd/var/db/
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
fi
......@@ -5,13 +5,13 @@
# Save the rrd databases to the config path.
if [ -d "${RRDDBPATH}" ]; then
[ -z "$NO_REMOUNT" ] && /etc/rc.conf_mount_rw
[ -z "$NO_REMOUNT" ] && /usr/local/etc/rc.conf_mount_rw
for rrdfile in "${RRDDBPATH}"/*.rrd ; do
xmlfile="${rrdfile%.rrd}.xml"
/usr/bin/nice -n20 /usr/local/bin/rrdtool dump "$rrdfile" "$xmlfile"
done
cd / && tar -czf "${CF_CONF_PATH}"/rrd.tgz -C / "${RRDDBPATH#/}"/*.xml
rm "${RRDDBPATH}"/*.xml
[ -z "$NO_REMOUNT" ] && /etc/rc.conf_mount_ro
[ -z "$NO_REMOUNT" ] && /usr/local/etc/rc.conf_mount_ro
fi
#!/usr/local/bin/php -f
<?php
/* $Id$ */
/*
rc.conf_mount_ro
part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich
All rights reserved.
......@@ -32,5 +31,3 @@
require_once("config.inc");
conf_mount_ro();
?>
#!/usr/local/bin/php -f
<?php
/* $Id$ */
/*
rc.conf_mount_rw
part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich
All rights reserved.
......@@ -32,5 +31,3 @@
require_once("config.inc");
conf_mount_rw();
?>
......@@ -6,7 +6,7 @@
# All rights reserved.
# mount /cf
/etc/rc.conf_mount_rw
/usr/local/etc/rc.conf_mount_rw
# Reset file(s)
echo "" >/conf/upgrade_log.txt
......@@ -123,7 +123,7 @@ enable)
echo "" >> /conf/upgrade_log.txt
echo "Enable" >> /conf/upgrade_log.txt
echo "" >> /conf/upgrade_log.txt
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
;;
auto)
touch /var/run/firmwarelock.dirty
......@@ -131,14 +131,14 @@ auto)
remove_chflags
/usr/local/etc/rc.firmware_auto
restore_chflags
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
;;
pfSenseNanoBSDupgrade)
# Sanity check - bail early if there's no firmware file!
if [ ! -r $IMG ]; then
echo "2nd parameter has not been passed or file does not exist. Exiting." >> /conf/upgrade_log.txt 2>&1
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
exit 1
fi
......@@ -147,7 +147,7 @@ pfSenseNanoBSDupgrade)
echo "You cannot use a full file for upgrade. Please use a file labeled nanobsd upgrade."
file_notice "NanoBSDUpgradeFailure" "You have attemped to use a full NanoBSD installation file as an upgrade. Please use a NanoBSD file labeled 'upgrade' instead."
rm -f $IMG
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
exit 1
fi
......@@ -217,7 +217,7 @@ pfSenseNanoBSDupgrade)
rm -f /var/run/firmwarelock.dirty
rm -f /var/run/firmware.lock
rm -f ${IMG}
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
exit 1
fi
......@@ -268,7 +268,7 @@ pfSenseNanoBSDupgrade)
rm -f $IMG
rm -f /var/run/firmwarelock.dirty
rm -f /var/run/firmware.lock
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
exit 1
fi
......@@ -314,7 +314,7 @@ pfSenseNanoBSDupgrade)
rm -f /var/run/firmwarelock.dirty
rm -f /var/run/firmware.lock
umount /tmp/$GLABEL_SLICE
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
exit 1
fi
echo "" >> /conf/upgrade_log.txt
......@@ -362,7 +362,7 @@ pfSenseNanoBSDupgrade)
touch /conf/needs_package_sync
# remount /cf ro
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
/bin/sync
echo "NanoBSD Firmware upgrade is complete. Rebooting in 10 seconds." >> /conf/upgrade_log.txt 2>&1
......@@ -381,7 +381,7 @@ pfSenseupgrade)
# Sanity check - bail early if there's no firmware file!
if [ ! -r $IMG ]; then
echo "2nd parameter has not been passed or file does not exist. Exiting." >> /conf/upgrade_log.txt 2>&1
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
exit
fi
......@@ -480,7 +480,7 @@ pfSenseupgrade)
echo "" >> /conf/upgrade_log.txt
# remount /cf ro
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
# release the firmware lock
rm -f /var/run/firmwarelock.dirty
......@@ -511,7 +511,7 @@ delta_update)
binary_update $IMG
restore_chflags
find / -name CVS -type d -exec rm {} \;
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
/sbin/umount -f /cf 2>/dev/null
/sbin/mount -r /cf 2>/dev/null
/sbin/umount -f / 2>/dev/null
......
......@@ -45,13 +45,13 @@ if [ "$PMD" = "$MD" ]; then
echo "MD5's match." | logger -p daemon.info -i -t AutoUpgrade
echo "Beginning ${product} upgrade." | wall
if [ "$PLATFORM" = "net45xx" ]; then
/usr/local/bin/php /etc/rc.conf_mount_rw
/usr/local/etc/rc.conf_mount_rw
fi
if [ "$PLATFORM" = "wrap" ]; then
/usr/local/bin/php /etc/rc.conf_mount_rw
/usr/local/etc/rc.conf_mount_rw
fi
if [ "$PLATFORM" = "nanobsd" ]; then
/usr/local/bin/php /etc/rc.conf_mount_rw
/usr/local/etc/rc.conf_mount_rw
fi
if [ -r "/tmp/custom.tgz" ]; then
sh /usr/local/etc/rc.firmware pfSenseupgrade /tmp/latest.tgz /tmp/custom.tgz
......@@ -65,7 +65,7 @@ if [ "$PMD" = "$MD" ]; then
if [ "$PLATFORM" = "wrap" ]; then
/bin/sync
sleep 5
/usr/local/bin/php /etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
if [ -e /etc/init_bootloader.sh ]; then
sh /etc/init_bootloader.sh
fi
......@@ -73,7 +73,7 @@ if [ "$PMD" = "$MD" ]; then
if [ "$PLATFORM" = "net45xx" ]; then
/bin/sync
sleep 5
/usr/local/bin/php /etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
if [ -e /etc/init_bootloader.sh ]; then
sh /etc/init_bootloader.sh
fi
......
#!/bin/sh
#write the uptime in seconds to the persistent log in /conf/
/etc/rc.conf_mount_rw
/usr/local/etc/rc.conf_mount_rw
/bin/echo `date -j +%Y.%m.%d-%H:%M:%S` $1 >> /conf/$2.log
/etc/rc.conf_mount_ro
/usr/local/etc/rc.conf_mount_ro
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment