Commit 2a6bb6db authored by Franco Fichtner's avatar Franco Fichtner

etc: move more files, fix breakage along the way

parent bbec3a8f
......@@ -385,9 +385,9 @@ function post_cvssync_commands() {
exec("pfctl -f /tmp/rules.debug");
echo "\n";
if(file_exists("/etc/rc.php_ini_setup")) {
echo "===> Running /etc/rc.php_ini_setup...";
exec("/etc/rc.php_ini_setup");
if(file_exists("/usr/local/etc/rc.php_ini_setup")) {
echo "===> Running rc.php_ini_setup...";
exec("/usr/local/etc/rc.php_ini_setup");
echo "\n";
}
......
......@@ -65,7 +65,7 @@ if [ "$PLATFORM" = "pfSense" ]; then
fi
if [ "${PLATFORM}" = "cdrom" ]; then
/etc/rc.cdrom
/usr/local/etc/rc.cdrom
else
# Mount /. If it fails run a fsck.
if [ "$PLATFORM" = "nanobsd" ]; then
......@@ -379,7 +379,7 @@ echo "done."
# Run the php.ini setup file and populate
# /usr/local/etc/php.ini and /usr/local/lib/php.ini
/etc/rc.php_ini_setup 2>/tmp/php_errors.txt
/usr/local/etc/rc.php_ini_setup 2>/tmp/php_errors.txt
# Launch external configuration loader for supported platforms
if [ "$PLATFORM" = "nanobsd" ]; then
......@@ -406,10 +406,9 @@ echo -n "Launching the init system..."
/bin/rm -f /cf/conf/backup/backup.cache
/bin/rm -f /root/lighttpd*
/usr/bin/touch $varrunpath/booting
/etc/rc.bootup
/usr/local/etc/rc.bootup
# /etc/rc.bootup unset $g['booting'], remove file right now to be
# consistent
# rc.bootup unset $g['booting'], remove file right now to be consistent
/bin/rm $varrunpath/booting
# If a shell was selected from recovery
......
#!/bin/sh
# $Id$
if ! /usr/bin/lockf -s -t 30 /tmp/config.lock /usr/bin/true; then
echo "Cannot reboot at this moment, a config write operation is in progress, and 30 seconds have passed."
exit 1
......@@ -21,8 +19,8 @@ DISK_NAME=`/bin/df /var/db/rrd | /usr/bin/tail -1 | /usr/bin/awk '{print $1;}'`
DISK_TYPE=`/usr/bin/basename ${DISK_NAME} | /usr/bin/cut -c1-2`
# If we are not on a full install, or if the full install wants RAM disks, or if the full install _was_ using RAM disks, but isn't for the next boot...
if [ "${PLATFORM}" != "pfSense" ] || [ ${USE_MFS_TMPVAR} -gt 0 ] || [ "${DISK_TYPE}" = "md" ]; then
/etc/rc.backup_rrd.sh
/etc/rc.backup_dhcpleases.sh
/usr/local/etc/rc.backup_rrd.sh
/usr/local/etc/rc.backup_dhcpleases.sh
fi
sleep 1
......
......@@ -32,6 +32,6 @@ DISK_NAME=`/bin/df /var/db/rrd | /usr/bin/tail -1 | /usr/bin/awk '{print $1;}'`
DISK_TYPE=`/usr/bin/basename ${DISK_NAME} | /usr/bin/cut -c1-2`
# If we are not on a full install, or if the full install wants RAM disks, or if the full install _was_ using RAM disks, but isn't for the next boot...
if [ "${PLATFORM}" != "pfSense" ] || [ ${USE_MFS_TMPVAR} -gt 0 ] || [ "${DISK_TYPE}" = "md" ]; then
/etc/rc.backup_rrd.sh
/etc/rc.backup_dhcpleases.sh
/usr/local/etc/rc.backup_rrd.sh
/usr/local/etc/rc.backup_dhcpleases.sh
fi
......@@ -2109,7 +2109,7 @@ function upgrade_054_to_055() {
enable_rrd_graphing();
/* Let's save the RRD graphs after we run enable RRD graphing */
/* The function will restore the rrd.tgz so we will save it after */
exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='{$g['cf_conf_path']}' /etc/rc.backup_rrd.sh");
exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='{$g['cf_conf_path']}' /usr/local/etc/rc.backup_rrd.sh");
unlink_if_exists("{$g['vardb_path']}/rrd/*.xml");
if ($g['booting'])
echo "Updating configuration...";
......@@ -2791,7 +2791,7 @@ function upgrade_080_to_081() {
enable_rrd_graphing();
/* Let's save the RRD graphs after we run enable RRD graphing */
/* The function will restore the rrd.tgz so we will save it after */
exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='{$g['cf_conf_path']}' /etc/rc.backup_rrd.sh");
exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='{$g['cf_conf_path']}' /usr/local/etc/rc.backup_rrd.sh");
if ($g['booting'])
echo "Updating configuration...";
foreach($config['filter']['rule'] as & $rule) {
......@@ -3127,7 +3127,7 @@ function upgrade_095_to_096() {
enable_rrd_graphing();
/* Let's save the RRD graphs after we run enable RRD graphing */
/* The function will restore the rrd.tgz so we will save it after */
exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='{$g['cf_conf_path']}' /etc/rc.backup_rrd.sh");
exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='{$g['cf_conf_path']}' /usr/local/etc/rc.backup_rrd.sh");
}
function upgrade_096_to_097() {
......
......@@ -2,7 +2,6 @@
<?php
/*
rc.bootup
part of pfSense by Scott Ullrich
originally based on m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2004-2009 Scott Ullrich <sullrich@pfsense.org>.
......
#!/bin/sh
#
# rc.php_ini_setup
# Copyright (C) 2010 Scott Ullrich <sullrich@gmail.com>
# All rights reserved.
#
......@@ -111,7 +110,7 @@ TIMEZONE=`cat /conf/config.xml | egrep -E '<timezone>(.*?)</timezone>' | awk -F'
# the file being clobbered and the firewall
# not being able to boot back up.
/bin/cat >/usr/local/lib/php.ini <<EOF
; File generated from /etc/rc.php_ini_setup
; File generated via rc.php_ini_setup
output_buffering = "0"
expose_php = Off
implicit_flush = true
......
......@@ -8,7 +8,7 @@ if [ -f /tmp/${IF}up ] && [ -f /conf/${IF}.log ]; then
/usr/local/sbin/ppp-log-uptime.sh $seconds ${IF} &
fi
/etc/rc.kill_states ${IF} ${LOCAL_IP}
/usr/local/etc/rc.kill_states ${IF} ${LOCAL_IP}
if [ -s "/tmp/${IF}_defaultgw" ]; then
GW=`head -n 1 /tmp/${IF}_defaultgw`
......
......@@ -210,11 +210,11 @@ if ($_POST) {
if (isset($_POST['rrdbackup'])) {
$config['system']['rrdbackup'] = $_POST['rrdbackup'];
install_cron_job("/etc/rc.backup_rrd.sh", ($config['system']['rrdbackup'] > 0), $minute="0", "*/{$config['system']['rrdbackup']}");
install_cron_job("/usr/local/etc/rc.backup_rrd.sh", ($config['system']['rrdbackup'] > 0), $minute="0", "*/{$config['system']['rrdbackup']}");
}
if (isset($_POST['dhcpbackup'])) {
$config['system']['dhcpbackup'] = $_POST['dhcpbackup'];
install_cron_job("/etc/rc.backup_dhcpleases.sh", ($config['system']['dhcpbackup'] > 0), $minute="0", "*/{$config['system']['dhcpbackup']}");
install_cron_job("/usr/local/etc/rc.backup_dhcpleases.sh", ($config['system']['dhcpbackup'] > 0), $minute="0", "*/{$config['system']['dhcpbackup']}");
}
write_config();
......@@ -699,4 +699,4 @@ include("head.inc");
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
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