Commit ce6c7135 authored by Franco Fichtner's avatar Franco Fichtner

etc: rc scripts are cleared out now

parent 528679c0
...@@ -375,7 +375,7 @@ function post_cvssync_commands() { ...@@ -375,7 +375,7 @@ function post_cvssync_commands() {
convert_config(); convert_config();
echo "===> Configuring filter..."; echo "===> Configuring filter...";
exec("/etc/rc.filter_configure_sync"); exec("/usr/local/etc/rc.filter_configure_sync");
exec("pfctl -f /tmp/rules.debug"); exec("pfctl -f /tmp/rules.debug");
echo "\n"; echo "\n";
......
#!/usr/local/bin/php -f
<?php
/* $Id$ */
/*
rc.captiveportal_configure
part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require("config.inc");
require("functions.inc");
require_once("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
captiveportal_configure();
?>
#!/usr/local/bin/php -f
<?php
/* $Id$ */
/*
rc.dhclient_cron
part of pfSense (https://www.pfsense.org)
Copyright (C) 2006 Scott Ullrich
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("config.inc");
require_once("functions.inc");
/* invalidate cache */
vc_invalidate();
unlink_if_exists("/tmp/config.cache");
$iflist = get_configured_interface_with_descr();
foreach($iflist as $ifname => $interface) {
$real_interface = get_real_interface($ifname);
if($config['interfaces'][$ifname]['ipaddr'] == "dhcp") {
$pid = find_dhclient_process($real_interface);
if($pid == 0 or !$pid) {
/* dhclient is not running for interface, kick it */
log_error("DHCLIENT was not running for {$real_interface} ... Launching new instance.");
exec("/sbin/dhclient $real_interface");
}
}
}
?>
#!/usr/local/bin/php -f
<?php
/* $Id$ */
/*
rc.filter_configure
part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("config.inc");
require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
/* invalidate interface cache */
get_interface_arr(true);
unlink_if_exists("/tmp/config.cache");
filter_configure();
?>
\ No newline at end of file
#!/usr/local/bin/php -f
<?php
/* $Id$ */
/*
rc.interfaces_carp_configure
part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("config.inc");
require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
interfaces_carp_configure();
?>
\ No newline at end of file
#!/usr/local/bin/php -f
<?php
/* $Id$ */
/*
rc.interfaces_lan_configure
part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("config.inc");
require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
interface_configure("lan");
?>
#!/usr/local/bin/php -f
<?php
/* $Id$ */
/*
rc.interfaces_opt_configure
part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("config.inc");
require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
require_once("vpn.inc");
require_once("captiveportal.inc");
interfaces_configure();
?>
#!/usr/local/bin/php -q
<?php
require_once("globals.inc");
require_once("config.inc");
require_once("pfsense-utils.inc");
global $g;
global $SLICE, $OLDSLICE, $TOFLASH, $COMPLETE_PATH, $COMPLETE_BOOT_PATH;
global $GLABEL_SLICE, $UFS_ID, $OLD_UFS_ID, $BOOTFLASH;
global $BOOT_DEVICE, $REAL_BOOT_DEVICE, $BOOT_DRIVE, $ACTIVE_SLICE;
nanobsd_detect_slice_info();
if ($g['platform'] != "nanobsd") {
echo "This script can only be used on NanoBSD (embedded) images.\n";
exit(1);
}
echo "Boot slice : {$BOOTFLASH} ({$BOOT_DEVICE})\n";
echo "Active slice: {$ACTIVE_SLICE}\n\n";
echo "Switching active slice...";
nanobsd_switch_boot_slice();
echo "Done.\n\n";
nanobsd_detect_slice_info();
echo "Boot slice : {$BOOTFLASH} ({$BOOT_DEVICE})\n";
echo "Active slice: {$ACTIVE_SLICE}\n\n";
?>
\ No newline at end of file
...@@ -326,7 +326,7 @@ EOD; ...@@ -326,7 +326,7 @@ EOD;
/* start pruning process (interval defaults to 60 seconds) */ /* start pruning process (interval defaults to 60 seconds) */
mwexec("/usr/local/bin/minicron $croninterval {$g['varrun_path']}/cp_prunedb_{$cpzone}.pid " . mwexec("/usr/local/bin/minicron $croninterval {$g['varrun_path']}/cp_prunedb_{$cpzone}.pid " .
"/etc/rc.prunecaptiveportal {$cpzone}"); "/usr/local/etc/rc.prunecaptiveportal {$cpzone}");
/* generate radius server database */ /* generate radius server database */
unlink_if_exists("{$g['vardb_path']}/captiveportal_radius_{$cpzone}.db"); unlink_if_exists("{$g['vardb_path']}/captiveportal_radius_{$cpzone}.db");
......
...@@ -3377,7 +3377,7 @@ function filter_tdr_install_cron($should_install) { ...@@ -3377,7 +3377,7 @@ function filter_tdr_install_cron($should_install) {
$cron_item['month'] = "*"; $cron_item['month'] = "*";
$cron_item['wday'] = "*"; $cron_item['wday'] = "*";
$cron_item['who'] = "root"; $cron_item['who'] = "root";
$cron_item['command'] = "/etc/rc.filter_configure_sync"; $cron_item['command'] = "/usr/local/etc/rc.filter_configure_sync";
$config['cron']['item'][] = $cron_item; $config['cron']['item'][] = $cron_item;
write_config(gettext("Installed 15 minute filter reload for Time Based Rules")); write_config(gettext("Installed 15 minute filter reload for Time Based Rules"));
configure_cron(); configure_cron();
......
...@@ -130,8 +130,8 @@ fi ...@@ -130,8 +130,8 @@ fi
/bin/rm -f /root/TRIM_unset /bin/rm -f /root/TRIM_unset
# Disable APM on ATA drives. Leaving this on will kill drives long-term, especially laptop drives, by generating excessive Load Cycles. # Disable APM on ATA drives. Leaving this on will kill drives long-term, especially laptop drives, by generating excessive Load Cycles.
if [ -f /etc/rc.disable_hdd_apm ]; then if [ -f /usr/local/etc/rc.disable_hdd_apm ]; then
/etc/rc.disable_hdd_apm /usr/local/etc/rc.disable_hdd_apm
fi fi
#Eject CD devices on 3G modems #Eject CD devices on 3G modems
...@@ -411,7 +411,7 @@ echo "done." ...@@ -411,7 +411,7 @@ echo "done."
/usr/local/bin/minicron 240 $varrunpath/ping_hosts.pid /usr/local/bin/ping_hosts.sh /usr/local/bin/minicron 240 $varrunpath/ping_hosts.pid /usr/local/bin/ping_hosts.sh
# Start account expire handler every hour # Start account expire handler every hour
/usr/local/bin/minicron 3600 $varrunpath/expire_accounts.pid /etc/rc.expireaccounts /usr/local/bin/minicron 3600 $varrunpath/expire_accounts.pid /usr/local/etc/rc.expireaccounts
# Start alias url updater every 24 hours # Start alias url updater every 24 hours
/usr/local/bin/minicron 86400 $varrunpath/update_alias_url_data.pid /usr/local/etc/rc.update_alias_url_data /usr/local/bin/minicron 86400 $varrunpath/update_alias_url_data.pid /usr/local/etc/rc.update_alias_url_data
......
#!/usr/local/bin/php -f #!/usr/local/bin/php -f
<?php <?php
/* $Id$ */
/* /*
rc.filter_configure_sync
part of pfSense (https://www.pfsense.org) part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich Copyright (C) 2004 Scott Ullrich
All rights reserved. All rights reserved.
...@@ -37,5 +36,3 @@ require_once("ipsec.inc"); ...@@ -37,5 +36,3 @@ require_once("ipsec.inc");
require_once("vpn.inc"); require_once("vpn.inc");
filter_configure_sync(); filter_configure_sync();
?>
#!/usr/local/bin/php -f #!/usr/local/bin/php -f
<?php <?php
/* /*
rc.filter_configure_xmlrpc
Copyright (C) 2004-2006 Scott Ullrich Copyright (C) 2004-2006 Scott Ullrich
Copyright (C) 2005 Bill Marquette Copyright (C) 2005 Bill Marquette
Copyright (C) 2006 Peter Allgeyer Copyright (C) 2006 Peter Allgeyer
......
...@@ -397,7 +397,7 @@ pfSenseupgrade) ...@@ -397,7 +397,7 @@ pfSenseupgrade)
if [ -f /tmp/perform_full_backup.txt ]; then if [ -f /tmp/perform_full_backup.txt ]; then
echo "Performing full backup" >> /conf/upgrade_log.txt echo "Performing full backup" >> /conf/upgrade_log.txt
/etc/rc.create_full_backup /usr/local/etc/rc.create_full_backup
rm /tmp/perform_full_backup.txt rm /tmp/perform_full_backup.txt
fi fi
......
#!/usr/local/bin/php -f #!/usr/local/bin/php -f
<?php <?php
/* $Id$ */
/* /*
rc.interfaces_wan_configure
part of pfSense (https://www.pfsense.org) part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich Copyright (C) 2004 Scott Ullrich
All rights reserved. All rights reserved.
...@@ -44,5 +43,3 @@ else { ...@@ -44,5 +43,3 @@ else {
if (!empty($config['interfaces'][$argument])) if (!empty($config['interfaces'][$argument]))
interface_configure($argument); interface_configure($argument);
} }
?>
#!/usr/local/bin/php -f #!/usr/local/bin/php -f
<?php <?php
/* $Id$ */
/* /*
rc.prunecaptiveportal
part of m0n0wall (http://m0n0.ch/wall) part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>. Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
......
[reload] [reload]
command:/etc/rc.filter_configure_sync command:/usr/local/etc/rc.filter_configure_sync
parameters: parameters:
type:script type:script
message:Reloading filter message:Reloading filter
[reconfigure] [reconfigure]
command:/etc/rc.filter_configure_sync command:/usr/local/etc/rc.filter_configure_sync
parameters: parameters:
type:script type:script
message:Reloading filter message:Reloading filter
[restart] [restart]
command:/etc/rc.filter_configure_sync command:/usr/local/etc/rc.filter_configure_sync
parameters: parameters:
type:script type:script
message:Reloading filter message:Reloading filter
[sync] [sync]
command:/etc/rc.filter_synchronize command:/usr/local/etc/rc.filter_synchronize
parameters: parameters:
type:script type:script
message:Syncing firewall message:Syncing firewall
......
...@@ -17,13 +17,13 @@ type:script ...@@ -17,13 +17,13 @@ type:script
message:Reloading interfaces message:Reloading interfaces
[reconfigure] [reconfigure]
command:/etc/rc.interfaces_wan_configure command:/usr/local/etc/rc.interfaces_wan_configure
parameters:%s parameters:%s
type:script type:script
message:Configuring interface %s message:Configuring interface %s
[restart] [restart]
command:/etc/rc.interfaces_wan_configure command:/usr/local/etc/rc.interfaces_wan_configure
parameters:%s parameters:%s
type:script type:script
message:Configuring interface %s message:Configuring interface %s
...@@ -41,7 +41,7 @@ type:script ...@@ -41,7 +41,7 @@ type:script
message:rc.newwanipv6 starting %s message:rc.newwanipv6 starting %s
[sync] [sync]
command:/etc/rc.filter_configure_xmlrpc command:/usr/local/etc/rc.filter_configure_xmlrpc
parameters: parameters:
type:script type:script
message:Reloading filter_configure_xmlrpc message:Reloading filter_configure_xmlrpc
......
...@@ -11,13 +11,13 @@ type:script ...@@ -11,13 +11,13 @@ type:script
message:Rewriting resolv.conf message:Rewriting resolv.conf
[reload|restart.ipsecdns] [reload|restart.ipsecdns]
command:/etc/rc.newipsecdns command:/usr/local/etc/rc.newipsecdns
parameters: parameters:
type:script type:script
message:Restarting ipsec tunnels message:Restarting ipsec tunnels
[reload|restart.routedns] [reload|restart.routedns]
command:/etc/rc.newroutedns command:/usr/local/etc/rc.newroutedns
parameters: parameters:
type:script type:script
message:Updating static routes based on hostnames message:Updating static routes based on hostnames
......
...@@ -55,7 +55,7 @@ if($_POST['overwriteconfigxml']) ...@@ -55,7 +55,7 @@ if($_POST['overwriteconfigxml'])
touch("/tmp/do_not_restore_config.xml"); touch("/tmp/do_not_restore_config.xml");
if($_GET['backupnow']) if($_GET['backupnow'])
mwexec_bg("/etc/rc.create_full_backup"); mwexec_bg("/usr/local/etc/rc.create_full_backup");
if($_GET['downloadbackup']) { if($_GET['downloadbackup']) {
$filename = basename($_GET['downloadbackup']); $filename = basename($_GET['downloadbackup']);
......
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