Commit b30d7406 authored by Franco Fichtner's avatar Franco Fichtner

rc: drop occasional .sh suffix for consistency

parent 22a3d39e
...@@ -649,7 +649,7 @@ ...@@ -649,7 +649,7 @@
<month>*</month> <month>*</month>
<wday>*</wday> <wday>*</wday>
<who>root</who> <who>root</who>
<command>/usr/local/etc/rc.update_bogons.sh</command> <command>/usr/local/etc/rc.update_bogons</command>
</item> </item>
<item> <item>
<minute>*/60</minute> <minute>*/60</minute>
......
...@@ -378,7 +378,7 @@ function convert_config() { ...@@ -378,7 +378,7 @@ function convert_config() {
if (is_array($config['cron'])) { if (is_array($config['cron'])) {
$cron_item_count = count($config['cron']['item']); $cron_item_count = count($config['cron']['item']);
for($x=0; $x<$cron_item_count; $x++) { for($x=0; $x<$cron_item_count; $x++) {
if(stristr($config['cron']['item'][$x]['command'], "rc.update_bogons.sh")) { if(stristr($config['cron']['item'][$x]['command'], 'rc.update_bogons')) {
if($config['cron']['item'][$x]['hour'] == "*" ) { if($config['cron']['item'][$x]['hour'] == "*" ) {
$config['cron']['item'][$x]['hour'] = "3"; $config['cron']['item'][$x]['hour'] = "3";
write_config(gettext("Updated bogon update frequency to 3am")); write_config(gettext("Updated bogon update frequency to 3am"));
......
...@@ -426,7 +426,7 @@ function upgrade_025_to_026() { ...@@ -426,7 +426,7 @@ function upgrade_025_to_026() {
$cron_item['month'] = "*"; $cron_item['month'] = "*";
$cron_item['wday'] = "*"; $cron_item['wday'] = "*";
$cron_item['who'] = "root"; $cron_item['who'] = "root";
$cron_item['command'] = "/usr/local/etc/rc.update_bogons.sh"; $cron_item['command'] = "/usr/local/etc/rc.update_bogons";
$config['cron']['item'][] = $cron_item; $config['cron']['item'][] = $cron_item;
...@@ -2031,7 +2031,7 @@ function upgrade_054_to_055() { ...@@ -2031,7 +2031,7 @@ function upgrade_054_to_055() {
enable_rrd_graphing(); enable_rrd_graphing();
/* Let's save the RRD graphs after we run 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 */ /* 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='/cf/conf' /usr/local/etc/rc.backup_rrd.sh"); exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='/cf/conf' /usr/local/etc/rc.backup_rrd");
unlink_if_exists("{$g['vardb_path']}/rrd/*.xml"); unlink_if_exists("{$g['vardb_path']}/rrd/*.xml");
if ($g['booting']) if ($g['booting'])
echo "Updating configuration..."; echo "Updating configuration...";
...@@ -2713,7 +2713,7 @@ function upgrade_080_to_081() { ...@@ -2713,7 +2713,7 @@ function upgrade_080_to_081() {
enable_rrd_graphing(); enable_rrd_graphing();
/* Let's save the RRD graphs after we run 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 */ /* 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='/cf/conf' /usr/local/etc/rc.backup_rrd.sh"); exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='/cf/conf' /usr/local/etc/rc.backup_rrd");
if ($g['booting']) if ($g['booting'])
echo "Updating configuration..."; echo "Updating configuration...";
foreach($config['filter']['rule'] as & $rule) { foreach($config['filter']['rule'] as & $rule) {
...@@ -3046,7 +3046,7 @@ function upgrade_095_to_096() { ...@@ -3046,7 +3046,7 @@ function upgrade_095_to_096() {
enable_rrd_graphing(); enable_rrd_graphing();
/* Let's save the RRD graphs after we run 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 */ /* 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='/cf/conf' /usr/local/etc/rc.backup_rrd.sh"); exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='/cf/conf' /usr/local/etc/rc.backup_rrd");
} }
function upgrade_096_to_097() { function upgrade_096_to_097() {
......
...@@ -19,8 +19,8 @@ DISK_NAME=`/bin/df /var/db/rrd | /usr/bin/tail -1 | /usr/bin/awk '{print $1;}'` ...@@ -19,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` 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 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 if [ "${PLATFORM}" != "pfSense" ] || [ ${USE_MFS_TMPVAR} -gt 0 ] || [ "${DISK_TYPE}" = "md" ]; then
/usr/local/etc/rc.backup_rrd.sh /usr/local/etc/rc.backup_rrd
/usr/local/etc/rc.backup_dhcpleases.sh /usr/local/etc/rc.backup_dhcpleases
fi fi
sleep 1 sleep 1
......
...@@ -32,6 +32,6 @@ DISK_NAME=`/bin/df /var/db/rrd | /usr/bin/tail -1 | /usr/bin/awk '{print $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` 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 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 if [ "${PLATFORM}" != "pfSense" ] || [ ${USE_MFS_TMPVAR} -gt 0 ] || [ "${DISK_TYPE}" = "md" ]; then
/usr/local/etc/rc.backup_rrd.sh /usr/local/etc/rc.backup_rrd
/usr/local/etc/rc.backup_dhcpleases.sh /usr/local/etc/rc.backup_dhcpleases
fi fi
...@@ -57,17 +57,17 @@ process_url() { ...@@ -57,17 +57,17 @@ process_url() {
fi fi
} }
echo "rc.update_bogons.sh is starting up." | logger echo "rc.update_bogons is starting up." | logger
# Sleep for some time, unless an argument is specified. # Sleep for some time, unless an argument is specified.
if [ "$1" = "" ]; then if [ "$1" = "" ]; then
# Grab a random value # Grab a random value
value=`od -A n -d -N2 /dev/random | awk '{ print $1 }'` value=`od -A n -d -N2 /dev/random | awk '{ print $1 }'`
echo "rc.update_bogons.sh is sleeping for $value" | logger echo "rc.update_bogons is sleeping for $value" | logger
sleep $value sleep $value
fi fi
echo "rc.update_bogons.sh is beginning the update cycle." | logger echo "rc.update_bogons is beginning the update cycle." | logger
# Set default values if not overriden # Set default values if not overriden
v4url=${v4url:-"https://files.pfsense.org/lists/fullbogons-ipv4.txt"} v4url=${v4url:-"https://files.pfsense.org/lists/fullbogons-ipv4.txt"}
...@@ -80,7 +80,7 @@ process_url /tmp/bogonsv6 "${v6url}" ...@@ -80,7 +80,7 @@ process_url /tmp/bogonsv6 "${v6url}"
if [ "$proc_error" != "" ]; then if [ "$proc_error" != "" ]; then
# Relaunch and sleep # Relaunch and sleep
sh /usr/local/etc/rc.update_bogons.sh & sh /usr/local/etc/rc.update_bogons &
exit exit
fi fi
...@@ -145,8 +145,8 @@ fi ...@@ -145,8 +145,8 @@ fi
if [ "$checksum_error" != "" ]; then if [ "$checksum_error" != "" ]; then
# Relaunch and sleep # Relaunch and sleep
sh /usr/local/etc/rc.update_bogons.sh & sh /usr/local/etc/rc.update_bogons &
exit exit
fi fi
echo "rc.update_bogons.sh is ending the update cycle." | logger echo "rc.update_bogons is ending the update cycle." | logger
<?php <?php
/* /*
Copyright (C) 2014 Deciso B.V. Copyright (C) 2014 Deciso B.V.
Copyright (C) 2010 Jim Pingle Copyright (C) 2010 Jim Pingle
...@@ -59,7 +60,7 @@ if($_REQUEST['deleteall']) { ...@@ -59,7 +60,7 @@ if($_REQUEST['deleteall']) {
} }
if((($tablename == "bogons") || ($tablename == "bogonsv6")) && ($_POST['Download'])) { if((($tablename == "bogons") || ($tablename == "bogonsv6")) && ($_POST['Download'])) {
mwexec_bg("/usr/local/etc/rc.update_bogons.sh now"); mwexec_bg('/usr/local/etc/rc.update_bogons now');
$maxtimetowait = 0; $maxtimetowait = 0;
$loading = true; $loading = true;
while($loading == true) { while($loading == true) {
......
...@@ -187,15 +187,15 @@ if ($_POST) { ...@@ -187,15 +187,15 @@ if ($_POST) {
if ($_POST['bogonsinterval'] != $config['system']['bogons']['interval']) { if ($_POST['bogonsinterval'] != $config['system']['bogons']['interval']) {
switch ($_POST['bogonsinterval']) { switch ($_POST['bogonsinterval']) {
case 'daily': case 'daily':
install_cron_job("/usr/local/etc/rc.update_bogons.sh", true, "1", "3", "*", "*", "*"); install_cron_job("/usr/local/etc/rc.update_bogons", true, "1", "3", "*", "*", "*");
break; break;
case 'weekly': case 'weekly':
install_cron_job("/usr/local/etc/rc.update_bogons.sh", true, "1", "3", "*", "*", "0"); install_cron_job("/usr/local/etc/rc.update_bogons", true, "1", "3", "*", "*", "0");
break; break;
case 'monthly': case 'monthly':
// fall through // fall through
default: default:
install_cron_job("/usr/local/etc/rc.update_bogons.sh", true, "1", "3", "1", "*", "*"); install_cron_job("/usr/local/etc/rc.update_bogons", true, "1", "3", "1", "*", "*");
} }
$config['system']['bogons']['interval'] = $_POST['bogonsinterval']; $config['system']['bogons']['interval'] = $_POST['bogonsinterval'];
} }
......
...@@ -195,11 +195,11 @@ if ($_POST) { ...@@ -195,11 +195,11 @@ if ($_POST) {
if (isset($_POST['rrdbackup'])) { if (isset($_POST['rrdbackup'])) {
$config['system']['rrdbackup'] = $_POST['rrdbackup']; $config['system']['rrdbackup'] = $_POST['rrdbackup'];
install_cron_job("/usr/local/etc/rc.backup_rrd.sh", ($config['system']['rrdbackup'] > 0), $minute="0", "*/{$config['system']['rrdbackup']}"); install_cron_job("/usr/local/etc/rc.backup_rrd", ($config['system']['rrdbackup'] > 0), $minute="0", "*/{$config['system']['rrdbackup']}");
} }
if (isset($_POST['dhcpbackup'])) { if (isset($_POST['dhcpbackup'])) {
$config['system']['dhcpbackup'] = $_POST['dhcpbackup']; $config['system']['dhcpbackup'] = $_POST['dhcpbackup'];
install_cron_job("/usr/local/etc/rc.backup_dhcpleases.sh", ($config['system']['dhcpbackup'] > 0), $minute="0", "*/{$config['system']['dhcpbackup']}"); install_cron_job("/usr/local/etc/rc.backup_dhcpleases", ($config['system']['dhcpbackup'] > 0), $minute="0", "*/{$config['system']['dhcpbackup']}");
} }
write_config(); write_config();
......
...@@ -618,7 +618,7 @@ ...@@ -618,7 +618,7 @@
unset($config['wizardtemp']); unset($config['wizardtemp']);
write_config(); write_config();
reload_all(); reload_all();
mwexec_bg("/usr/local/etc/rc.update_bogons.sh now"); mwexec_bg("/usr/local/etc/rc.update_bogons now");
]]> ]]>
</stepafterformdisplay> </stepafterformdisplay>
</step> </step>
......
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