mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
src: Niceness cannot be bought; it has to be earned.
This commit is contained in:
parent
aa3a73bfe7
commit
22a3d39e05
@ -640,7 +640,7 @@
|
||||
<month>*</month>
|
||||
<wday>*</wday>
|
||||
<who>root</who>
|
||||
<command>/usr/bin/nice -n20 adjkerntz -a</command>
|
||||
<command>adjkerntz -a</command>
|
||||
</item>
|
||||
<item>
|
||||
<minute>1</minute>
|
||||
@ -649,7 +649,7 @@
|
||||
<month>*</month>
|
||||
<wday>*</wday>
|
||||
<who>root</who>
|
||||
<command>/usr/bin/nice -n20 /usr/local/etc/rc.update_bogons.sh</command>
|
||||
<command>/usr/local/etc/rc.update_bogons.sh</command>
|
||||
</item>
|
||||
<item>
|
||||
<minute>*/60</minute>
|
||||
@ -658,7 +658,7 @@
|
||||
<month>*</month>
|
||||
<wday>*</wday>
|
||||
<who>root</who>
|
||||
<command>/usr/bin/nice -n20 /usr/local/sbin/expiretable -v -t 3600 sshlockout</command>
|
||||
<command>/usr/local/sbin/expiretable -v -t 3600 sshlockout</command>
|
||||
</item>
|
||||
<item>
|
||||
<minute>1</minute>
|
||||
@ -667,7 +667,7 @@
|
||||
<month>*</month>
|
||||
<wday>*</wday>
|
||||
<who>root</who>
|
||||
<command>/usr/bin/nice -n20 /usr/local/etc/rc.dyndns.update</command>
|
||||
<command>/usr/local/etc/rc.dyndns.update</command>
|
||||
</item>
|
||||
<item>
|
||||
<minute>*/60</minute>
|
||||
@ -676,7 +676,7 @@
|
||||
<month>*</month>
|
||||
<wday>*</wday>
|
||||
<who>root</who>
|
||||
<command>/usr/bin/nice -n20 /usr/local/sbin/expiretable -v -t 3600 virusprot</command>
|
||||
<command>/usr/local/sbin/expiretable -v -t 3600 virusprot</command>
|
||||
</item>
|
||||
<item>
|
||||
<minute>30</minute>
|
||||
@ -685,7 +685,7 @@
|
||||
<month>*</month>
|
||||
<wday>*</wday>
|
||||
<who>root</who>
|
||||
<command>/usr/bin/nice -n20 /usr/local/etc/rc.update_urltables</command>
|
||||
<command>/usr/local/etc/rc.update_urltables</command>
|
||||
</item>
|
||||
</cron>
|
||||
<wol>
|
||||
|
||||
@ -218,7 +218,7 @@ function enable_rrd_graphing() {
|
||||
$captiveportalloggedin = "-loggedin.rrd";
|
||||
$ntpd = "ntpd.rrd";
|
||||
|
||||
$rrdtool = "/usr/bin/nice -n20 /usr/local/bin/rrdtool";
|
||||
$rrdtool = "/usr/local/bin/rrdtool";
|
||||
$netstat = "/usr/bin/netstat";
|
||||
$awk = "/usr/bin/awk";
|
||||
$tar = "/usr/bin/tar";
|
||||
@ -906,7 +906,7 @@ function enable_rrd_graphing() {
|
||||
kill_traffic_collector();
|
||||
|
||||
/* start traffic collector */
|
||||
mwexec_bg("/usr/bin/nice -n20 /bin/sh $updaterrdscript");
|
||||
mwexec_bg("/bin/sh $updaterrdscript");
|
||||
|
||||
} else {
|
||||
/* kill off traffic collectors */
|
||||
@ -928,7 +928,7 @@ function create_gateway_quality_rrd($rrd_file) {
|
||||
global $g;
|
||||
$rrdinterval = 60;
|
||||
$valid = $rrdinterval * 2;
|
||||
$rrdtool = "/usr/bin/nice -n20 /usr/local/bin/rrdtool";
|
||||
$rrdtool = "/usr/local/bin/rrdtool";
|
||||
|
||||
/* GATEWAY QUALITY, set up the rrd file */
|
||||
if (!file_exists("$rrd_file")) {
|
||||
|
||||
@ -404,7 +404,7 @@ function upgrade_025_to_026() {
|
||||
$cron_item['month'] = "*";
|
||||
$cron_item['wday'] = "*";
|
||||
$cron_item['who'] = "root";
|
||||
$cron_item['command'] = "/usr/bin/nice -n20 newsyslog";
|
||||
$cron_item['command'] = "newsyslog";
|
||||
|
||||
$config['cron']['item'][] = $cron_item;
|
||||
|
||||
@ -415,7 +415,7 @@ function upgrade_025_to_026() {
|
||||
$cron_item['month'] = "*";
|
||||
$cron_item['wday'] = "*";
|
||||
$cron_item['who'] = "root";
|
||||
$cron_item['command'] = "/usr/bin/nice -n20 adjkerntz -a";
|
||||
$cron_item['command'] = "adjkerntz -a";
|
||||
|
||||
$config['cron']['item'][] = $cron_item;
|
||||
|
||||
@ -426,7 +426,7 @@ function upgrade_025_to_026() {
|
||||
$cron_item['month'] = "*";
|
||||
$cron_item['wday'] = "*";
|
||||
$cron_item['who'] = "root";
|
||||
$cron_item['command'] = "/usr/bin/nice -n20 /usr/local/etc/rc.update_bogons.sh";
|
||||
$cron_item['command'] = "/usr/local/etc/rc.update_bogons.sh";
|
||||
|
||||
$config['cron']['item'][] = $cron_item;
|
||||
|
||||
@ -437,7 +437,7 @@ function upgrade_025_to_026() {
|
||||
$cron_item['month'] = "*";
|
||||
$cron_item['wday'] = "*";
|
||||
$cron_item['who'] = "root";
|
||||
$cron_item['command'] = "/usr/bin/nice -n20 /usr/local/sbin/expiretable -v -t 3600 sshlockout";
|
||||
$cron_item['command'] = "/usr/local/sbin/expiretable -v -t 3600 sshlockout";
|
||||
|
||||
$config['cron']['item'][] = $cron_item;
|
||||
|
||||
@ -448,7 +448,7 @@ function upgrade_025_to_026() {
|
||||
$cron_item['month'] = "*";
|
||||
$cron_item['wday'] = "*";
|
||||
$cron_item['who'] = "root";
|
||||
$cron_item['command'] = "/usr/bin/nice -n20 /usr/local/etc/rc.dyndns.update";
|
||||
$cron_item['command'] = "/usr/local/etc/rc.dyndns.update";
|
||||
|
||||
$config['cron']['item'][] = $cron_item;
|
||||
|
||||
@ -459,7 +459,7 @@ function upgrade_025_to_026() {
|
||||
$cron_item['month'] = "*";
|
||||
$cron_item['wday'] = "*";
|
||||
$cron_item['who'] = "root";
|
||||
$cron_item['command'] = "/usr/bin/nice -n20 /usr/local/sbin/expiretable -v -t 3600 virusprot";
|
||||
$cron_item['command'] = "/usr/local/sbin/expiretable -v -t 3600 virusprot";
|
||||
|
||||
$config['cron']['item'][] = $cron_item;
|
||||
|
||||
@ -470,7 +470,7 @@ function upgrade_025_to_026() {
|
||||
$cron_item['month'] = "*";
|
||||
$cron_item['wday'] = "*";
|
||||
$cron_item['who'] = "root";
|
||||
$cron_item['command'] = "/usr/bin/nice -n20 /usr/local/sbin/expiretable -t 1800 snort2c";
|
||||
$cron_item['command'] = "/usr/local/sbin/expiretable -t 1800 snort2c";
|
||||
|
||||
$config['cron']['item'][] = $cron_item;
|
||||
}
|
||||
@ -1908,7 +1908,7 @@ function upgrade_054_to_055() {
|
||||
$listtags = array("ds", "v", "rra", "row");
|
||||
|
||||
$rrddbpath = "/var/db/rrd/";
|
||||
$rrdtool = "/usr/bin/nice -n20 /usr/local/bin/rrdtool";
|
||||
$rrdtool = "/usr/local/bin/rrdtool";
|
||||
if ($g['platform'] != "pfSense") {
|
||||
/* restore the databases, if we have one */
|
||||
if (restore_rrd()) {
|
||||
@ -2500,7 +2500,7 @@ function upgrade_075_to_076() {
|
||||
$cron_item['month'] = "*";
|
||||
$cron_item['wday'] = "*";
|
||||
$cron_item['who'] = "root";
|
||||
$cron_item['command'] = "/usr/bin/nice -n20 /usr/local/etc/rc.update_urltables";
|
||||
$cron_item['command'] = "/usr/local/etc/rc.update_urltables";
|
||||
$config['cron']['item'][] = $cron_item;
|
||||
}
|
||||
|
||||
@ -2570,7 +2570,7 @@ function upgrade_080_to_081() {
|
||||
$listtags = array("ds", "v", "rra", "row");
|
||||
|
||||
$rrddbpath = "/var/db/rrd/";
|
||||
$rrdtool = "/usr/bin/nice -n20 /usr/local/bin/rrdtool";
|
||||
$rrdtool = "/usr/local/bin/rrdtool";
|
||||
|
||||
if ($g['platform'] != "pfSense") {
|
||||
/* restore the databases, if we have one */
|
||||
@ -3080,7 +3080,7 @@ function upgrade_098_to_099() {
|
||||
|
||||
function upgrade_099_to_100() {
|
||||
require_once("services.inc");
|
||||
install_cron_job("/usr/bin/nice -n20 newsyslog", false);
|
||||
install_cron_job("newsyslog", false);
|
||||
}
|
||||
|
||||
function upgrade_100_to_101() {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
# Copyright (C) 2004-2010 Scott Ullrich, All rights reserved.
|
||||
# Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
||||
# Copyright (C) 2014 Franco Fichtner <franco@opnsense.org>
|
||||
# Copyright (C) 2014-2015 Franco Fichtner <franco@opnsense.org>
|
||||
# All rights reserved.
|
||||
|
||||
stty status '^T' 2> /dev/null
|
||||
@ -346,7 +346,7 @@ echo "done."
|
||||
/usr/local/etc/rc.php_ini_setup
|
||||
|
||||
chmod u+rx /usr/local/opnsense/service/check_reload_status.py
|
||||
/usr/bin/nice -n20 /usr/local/opnsense/service/check_reload_status.py
|
||||
/usr/local/opnsense/service/check_reload_status.py
|
||||
sleep 1 # give check_reload_status some time to load to prevent missing socket
|
||||
|
||||
# let the PHP-based configuration subsystem set up the system now
|
||||
|
||||
@ -8,7 +8,7 @@ if [ -d "${RRDDBPATH}" ]; then
|
||||
[ -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"
|
||||
/usr/local/bin/rrdtool dump "$rrdfile" "$xmlfile"
|
||||
done
|
||||
cd / && tar -czf "${CF_CONF_PATH}"/rrd.tgz -C / "${RRDDBPATH#/}"/*.xml
|
||||
rm "${RRDDBPATH}"/*.xml
|
||||
|
||||
@ -433,7 +433,7 @@ pfSenseupgrade)
|
||||
ps -a | grep "check_reload_status" | awk '{print $1;}' | kill -9
|
||||
echo "Installing $IMG." >> /conf/upgrade_log.txt 2>&1
|
||||
cd / && /usr/bin/tar --exclude=./dev -xzUPf $IMG >> /conf/upgrade_log.txt 2>&1
|
||||
/usr/bin/nice -n20 /usr/local/opnsense/service/check_reload_status.py
|
||||
/usr/local/opnsense/service/check_reload_status.py
|
||||
echo "Image installed $IMG." >> /conf/upgrade_log.txt 2>&1
|
||||
|
||||
# process custom image if its passed
|
||||
|
||||
@ -35,13 +35,14 @@ ini_set('max_input_time', '0');
|
||||
/* omit no-cache headers because it confuses IE with file downloads */
|
||||
$omit_nocacheheaders = true;
|
||||
$nocsrf = true;
|
||||
require("guiconfig.inc");
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("functions.inc");
|
||||
require_once("filter.inc");
|
||||
require_once("shaper.inc");
|
||||
|
||||
$rrddbpath = "/var/db/rrd";
|
||||
$rrdtool = "/usr/bin/nice -n20 /usr/local/bin/rrdtool";
|
||||
$rrddbpath = '/var/db/rrd';
|
||||
$rrdtool = '/usr/local/bin/rrdtool';
|
||||
|
||||
function rrd_data_xml() {
|
||||
global $rrddbpath;
|
||||
|
||||
@ -135,7 +135,7 @@ $prettydb = ucwords(str_replace($search, $replace, $curdatabase));
|
||||
|
||||
$rrddbpath = "/var/db/rrd/";
|
||||
$rrdtmppath = "/tmp/";
|
||||
$rrdtool = "/usr/bin/nice -n20 /usr/local/bin/rrdtool";
|
||||
$rrdtool = "/usr/local/bin/rrdtool";
|
||||
$uptime = "/usr/bin/uptime";
|
||||
$sed = "/usr/bin/sed";
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Copyright (C) 2014-2015 Deciso B.V.
|
||||
Copyright (C) 2005-2007 Scott Ullrich
|
||||
@ -186,15 +187,15 @@ if ($_POST) {
|
||||
if ($_POST['bogonsinterval'] != $config['system']['bogons']['interval']) {
|
||||
switch ($_POST['bogonsinterval']) {
|
||||
case 'daily':
|
||||
install_cron_job("/usr/bin/nice -n20 /usr/local/etc/rc.update_bogons.sh", true, "1", "3", "*", "*", "*");
|
||||
install_cron_job("/usr/local/etc/rc.update_bogons.sh", true, "1", "3", "*", "*", "*");
|
||||
break;
|
||||
case 'weekly':
|
||||
install_cron_job("/usr/bin/nice -n20 /usr/local/etc/rc.update_bogons.sh", true, "1", "3", "*", "*", "0");
|
||||
install_cron_job("/usr/local/etc/rc.update_bogons.sh", true, "1", "3", "*", "*", "0");
|
||||
break;
|
||||
case 'monthly':
|
||||
// fall through
|
||||
default:
|
||||
install_cron_job("/usr/bin/nice -n20 /usr/local/etc/rc.update_bogons.sh", true, "1", "3", "1", "*", "*");
|
||||
install_cron_job("/usr/local/etc/rc.update_bogons.sh", true, "1", "3", "1", "*", "*");
|
||||
}
|
||||
$config['system']['bogons']['interval'] = $_POST['bogonsinterval'];
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user