From ce6c7135e3dce45ae6774b3c708b050ca31d6ea1 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 9 Dec 2014 16:27:39 +0100 Subject: [PATCH] etc: rc scripts are cleared out now --- etc/phpshellsessions/gitsync | 2 +- etc/rc.captiveportal_configure | 40 -------------- etc/rc.dhclient_cron | 53 ------------------- etc/rc.filter_configure | 43 --------------- etc/rc.interfaces_carp_configure | 39 -------------- etc/rc.interfaces_lan_configure | 39 -------------- etc/rc.interfaces_opt_configure | 41 -------------- etc/rc.nanobsd_switch_boot_slice | 27 ---------- usr/local/etc/inc/captiveportal.inc | 2 +- usr/local/etc/inc/filter.inc | 2 +- usr/local/etc/rc | 6 +-- {etc => usr/local/etc}/rc.create_full_backup | 0 {etc => usr/local/etc}/rc.disable_hdd_apm | 0 {etc => usr/local/etc}/rc.expireaccounts | 0 .../local/etc}/rc.filter_configure_sync | 5 +- .../local/etc}/rc.filter_configure_xmlrpc | 2 +- {etc => usr/local/etc}/rc.filter_synchronize | 0 usr/local/etc/rc.firmware | 2 +- .../local/etc}/rc.interfaces_wan_configure | 5 +- {etc => usr/local/etc}/rc.newipsecdns | 0 {etc => usr/local/etc}/rc.newroutedns | 0 {etc => usr/local/etc}/rc.prunecaptiveportal | 3 +- .../opnsense/service/conf/actions_filter.conf | 8 +-- .../service/conf/actions_interface.conf | 6 +-- .../service/conf/actions_service.conf | 4 +- .../www/system_firmware_restorefullbackup.php | 2 +- 26 files changed, 21 insertions(+), 310 deletions(-) delete mode 100755 etc/rc.captiveportal_configure delete mode 100755 etc/rc.dhclient_cron delete mode 100755 etc/rc.filter_configure delete mode 100755 etc/rc.interfaces_carp_configure delete mode 100755 etc/rc.interfaces_lan_configure delete mode 100755 etc/rc.interfaces_opt_configure delete mode 100755 etc/rc.nanobsd_switch_boot_slice rename {etc => usr/local/etc}/rc.create_full_backup (100%) rename {etc => usr/local/etc}/rc.disable_hdd_apm (100%) rename {etc => usr/local/etc}/rc.expireaccounts (100%) rename {etc => usr/local/etc}/rc.filter_configure_sync (97%) rename {etc => usr/local/etc}/rc.filter_configure_xmlrpc (98%) rename {etc => usr/local/etc}/rc.filter_synchronize (100%) rename {etc => usr/local/etc}/rc.interfaces_wan_configure (97%) rename {etc => usr/local/etc}/rc.newipsecdns (100%) rename {etc => usr/local/etc}/rc.newroutedns (100%) rename {etc => usr/local/etc}/rc.prunecaptiveportal (98%) diff --git a/etc/phpshellsessions/gitsync b/etc/phpshellsessions/gitsync index dfb2778a7..ca77829b8 100644 --- a/etc/phpshellsessions/gitsync +++ b/etc/phpshellsessions/gitsync @@ -375,7 +375,7 @@ function post_cvssync_commands() { convert_config(); echo "===> Configuring filter..."; - exec("/etc/rc.filter_configure_sync"); + exec("/usr/local/etc/rc.filter_configure_sync"); exec("pfctl -f /tmp/rules.debug"); echo "\n"; diff --git a/etc/rc.captiveportal_configure b/etc/rc.captiveportal_configure deleted file mode 100755 index bd59361a1..000000000 --- a/etc/rc.captiveportal_configure +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/local/bin/php -f - diff --git a/etc/rc.dhclient_cron b/etc/rc.dhclient_cron deleted file mode 100755 index 3ffb46eda..000000000 --- a/etc/rc.dhclient_cron +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/local/bin/php -f - $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"); - } - } -} - -?> diff --git a/etc/rc.filter_configure b/etc/rc.filter_configure deleted file mode 100755 index 92be68da1..000000000 --- a/etc/rc.filter_configure +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/local/bin/php -f - \ No newline at end of file diff --git a/etc/rc.interfaces_carp_configure b/etc/rc.interfaces_carp_configure deleted file mode 100755 index fb1f1131a..000000000 --- a/etc/rc.interfaces_carp_configure +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/local/bin/php -f - \ No newline at end of file diff --git a/etc/rc.interfaces_lan_configure b/etc/rc.interfaces_lan_configure deleted file mode 100755 index eafe74d44..000000000 --- a/etc/rc.interfaces_lan_configure +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/local/bin/php -f - diff --git a/etc/rc.interfaces_opt_configure b/etc/rc.interfaces_opt_configure deleted file mode 100755 index 57da3419e..000000000 --- a/etc/rc.interfaces_opt_configure +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/local/bin/php -f - diff --git a/etc/rc.nanobsd_switch_boot_slice b/etc/rc.nanobsd_switch_boot_slice deleted file mode 100755 index ccbed9ce7..000000000 --- a/etc/rc.nanobsd_switch_boot_slice +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/local/bin/php -q - \ No newline at end of file diff --git a/usr/local/etc/inc/captiveportal.inc b/usr/local/etc/inc/captiveportal.inc index 63368b9cc..ae415b67c 100644 --- a/usr/local/etc/inc/captiveportal.inc +++ b/usr/local/etc/inc/captiveportal.inc @@ -326,7 +326,7 @@ EOD; /* start pruning process (interval defaults to 60 seconds) */ 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 */ unlink_if_exists("{$g['vardb_path']}/captiveportal_radius_{$cpzone}.db"); diff --git a/usr/local/etc/inc/filter.inc b/usr/local/etc/inc/filter.inc index d656e7166..25c53d9ae 100644 --- a/usr/local/etc/inc/filter.inc +++ b/usr/local/etc/inc/filter.inc @@ -3377,7 +3377,7 @@ function filter_tdr_install_cron($should_install) { $cron_item['month'] = "*"; $cron_item['wday'] = "*"; $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; write_config(gettext("Installed 15 minute filter reload for Time Based Rules")); configure_cron(); diff --git a/usr/local/etc/rc b/usr/local/etc/rc index 9ed7f8d11..58cd45f26 100755 --- a/usr/local/etc/rc +++ b/usr/local/etc/rc @@ -130,8 +130,8 @@ fi /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. -if [ -f /etc/rc.disable_hdd_apm ]; then - /etc/rc.disable_hdd_apm +if [ -f /usr/local/etc/rc.disable_hdd_apm ]; then + /usr/local/etc/rc.disable_hdd_apm fi #Eject CD devices on 3G modems @@ -411,7 +411,7 @@ echo "done." /usr/local/bin/minicron 240 $varrunpath/ping_hosts.pid /usr/local/bin/ping_hosts.sh # 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 /usr/local/bin/minicron 86400 $varrunpath/update_alias_url_data.pid /usr/local/etc/rc.update_alias_url_data diff --git a/etc/rc.create_full_backup b/usr/local/etc/rc.create_full_backup similarity index 100% rename from etc/rc.create_full_backup rename to usr/local/etc/rc.create_full_backup diff --git a/etc/rc.disable_hdd_apm b/usr/local/etc/rc.disable_hdd_apm similarity index 100% rename from etc/rc.disable_hdd_apm rename to usr/local/etc/rc.disable_hdd_apm diff --git a/etc/rc.expireaccounts b/usr/local/etc/rc.expireaccounts similarity index 100% rename from etc/rc.expireaccounts rename to usr/local/etc/rc.expireaccounts diff --git a/etc/rc.filter_configure_sync b/usr/local/etc/rc.filter_configure_sync similarity index 97% rename from etc/rc.filter_configure_sync rename to usr/local/etc/rc.filter_configure_sync index 1f3668141..44626afef 100755 --- a/etc/rc.filter_configure_sync +++ b/usr/local/etc/rc.filter_configure_sync @@ -1,8 +1,7 @@ #!/usr/local/bin/php -f diff --git a/etc/rc.filter_configure_xmlrpc b/usr/local/etc/rc.filter_configure_xmlrpc similarity index 98% rename from etc/rc.filter_configure_xmlrpc rename to usr/local/etc/rc.filter_configure_xmlrpc index bd1f78515..5f628b7c5 100755 --- a/etc/rc.filter_configure_xmlrpc +++ b/usr/local/etc/rc.filter_configure_xmlrpc @@ -1,7 +1,7 @@ #!/usr/local/bin/php -f > /conf/upgrade_log.txt - /etc/rc.create_full_backup + /usr/local/etc/rc.create_full_backup rm /tmp/perform_full_backup.txt fi diff --git a/etc/rc.interfaces_wan_configure b/usr/local/etc/rc.interfaces_wan_configure similarity index 97% rename from etc/rc.interfaces_wan_configure rename to usr/local/etc/rc.interfaces_wan_configure index fbdc5e437..f1af5ad1a 100755 --- a/etc/rc.interfaces_wan_configure +++ b/usr/local/etc/rc.interfaces_wan_configure @@ -1,8 +1,7 @@ #!/usr/local/bin/php -f diff --git a/etc/rc.newipsecdns b/usr/local/etc/rc.newipsecdns similarity index 100% rename from etc/rc.newipsecdns rename to usr/local/etc/rc.newipsecdns diff --git a/etc/rc.newroutedns b/usr/local/etc/rc.newroutedns similarity index 100% rename from etc/rc.newroutedns rename to usr/local/etc/rc.newroutedns diff --git a/etc/rc.prunecaptiveportal b/usr/local/etc/rc.prunecaptiveportal similarity index 98% rename from etc/rc.prunecaptiveportal rename to usr/local/etc/rc.prunecaptiveportal index c7011a55d..17667aece 100755 --- a/etc/rc.prunecaptiveportal +++ b/usr/local/etc/rc.prunecaptiveportal @@ -1,8 +1,7 @@ #!/usr/local/bin/php -f . diff --git a/usr/local/opnsense/service/conf/actions_filter.conf b/usr/local/opnsense/service/conf/actions_filter.conf index 3f8c0f9da..6f00478a5 100644 --- a/usr/local/opnsense/service/conf/actions_filter.conf +++ b/usr/local/opnsense/service/conf/actions_filter.conf @@ -1,23 +1,23 @@ [reload] -command:/etc/rc.filter_configure_sync +command:/usr/local/etc/rc.filter_configure_sync parameters: type:script message:Reloading filter [reconfigure] -command:/etc/rc.filter_configure_sync +command:/usr/local/etc/rc.filter_configure_sync parameters: type:script message:Reloading filter [restart] -command:/etc/rc.filter_configure_sync +command:/usr/local/etc/rc.filter_configure_sync parameters: type:script message:Reloading filter [sync] -command:/etc/rc.filter_synchronize +command:/usr/local/etc/rc.filter_synchronize parameters: type:script message:Syncing firewall diff --git a/usr/local/opnsense/service/conf/actions_interface.conf b/usr/local/opnsense/service/conf/actions_interface.conf index 3f1475d9d..63660c5ea 100644 --- a/usr/local/opnsense/service/conf/actions_interface.conf +++ b/usr/local/opnsense/service/conf/actions_interface.conf @@ -17,13 +17,13 @@ type:script message:Reloading interfaces [reconfigure] -command:/etc/rc.interfaces_wan_configure +command:/usr/local/etc/rc.interfaces_wan_configure parameters:%s type:script message:Configuring interface %s [restart] -command:/etc/rc.interfaces_wan_configure +command:/usr/local/etc/rc.interfaces_wan_configure parameters:%s type:script message:Configuring interface %s @@ -41,7 +41,7 @@ type:script message:rc.newwanipv6 starting %s [sync] -command:/etc/rc.filter_configure_xmlrpc +command:/usr/local/etc/rc.filter_configure_xmlrpc parameters: type:script message:Reloading filter_configure_xmlrpc diff --git a/usr/local/opnsense/service/conf/actions_service.conf b/usr/local/opnsense/service/conf/actions_service.conf index 8ec6b085d..8d7b32793 100644 --- a/usr/local/opnsense/service/conf/actions_service.conf +++ b/usr/local/opnsense/service/conf/actions_service.conf @@ -11,13 +11,13 @@ type:script message:Rewriting resolv.conf [reload|restart.ipsecdns] -command:/etc/rc.newipsecdns +command:/usr/local/etc/rc.newipsecdns parameters: type:script message:Restarting ipsec tunnels [reload|restart.routedns] -command:/etc/rc.newroutedns +command:/usr/local/etc/rc.newroutedns parameters: type:script message:Updating static routes based on hostnames diff --git a/usr/local/www/system_firmware_restorefullbackup.php b/usr/local/www/system_firmware_restorefullbackup.php index a51280993..cfa2aa1e4 100644 --- a/usr/local/www/system_firmware_restorefullbackup.php +++ b/usr/local/www/system_firmware_restorefullbackup.php @@ -55,7 +55,7 @@ if($_POST['overwriteconfigxml']) touch("/tmp/do_not_restore_config.xml"); if($_GET['backupnow']) - mwexec_bg("/etc/rc.create_full_backup"); + mwexec_bg("/usr/local/etc/rc.create_full_backup"); if($_GET['downloadbackup']) { $filename = basename($_GET['downloadbackup']);