From 58c7450e4779a1ffff8ba384559101d1751850f1 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 11 Oct 2005 23:44:53 +0000 Subject: Add developerspew header which will output: services_dnsmasq_configure() being called microtime() --- etc/inc/services.inc | 22 +++++++------- etc/inc/system.inc | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 90 insertions(+), 13 deletions(-) (limited to 'etc/inc') diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 9a4a340..cb910c3 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -34,7 +34,7 @@ require_once("functions.inc"); require_once("dyndns.class"); function services_dhcpd_configure() { - if(isset($config['system']['developer'])) { + if(isset($config['system']['developerspew'])) { $mt = microtime(); echo "services_dhcpd_configure($if) being called $mt\n" } @@ -263,7 +263,7 @@ EOD; } function interfaces_staticarp_configure($if) { - if(isset($config['system']['developer'])) { + if(isset($config['system']['developerspew'])) { $mt = microtime(); echo "interfaces_staticarp_configure($if) being called $mt\n" } @@ -292,7 +292,7 @@ function interfaces_staticarp_configure($if) { } function services_dhcrelay_configure() { - if(isset($config['system']['developer'])) { + if(isset($config['system']['developerspew'])) { $mt = microtime(); echo "services_dhcrelay_configure() being called $mt\n" } @@ -366,7 +366,7 @@ function services_dhcrelay_configure() { } function services_dyndns_reset() { - if(isset($config['system']['developer'])) { + if(isset($config['system']['developerspew'])) { $mt = microtime(); echo "services_dyndns_reset() being called $mt\n" } @@ -386,7 +386,7 @@ function services_dyndns_reset() { } function services_dyndns_configure() { - if(isset($config['system']['developer'])) { + if(isset($config['system']['developerspew'])) { $mt = microtime(); echo "services_dyndns_configure() being called $mt\n" } @@ -428,7 +428,7 @@ function services_dyndns_configure() { } function services_dyndns_configure_old() { - if(isset($config['system']['developer'])) { + if(isset($config['system']['developerspew'])) { $mt = microtime(); echo "services_dyndns_configure_old() being called $mt\n" } @@ -512,7 +512,7 @@ EOD; function services_dnsmasq_configure() { - if(isset($config['system']['developer'])) { + if(isset($config['system']['developerspew'])) { $mt = microtime(); echo "services_dnsmasq_configure() being called $mt\n" } @@ -561,7 +561,7 @@ function services_dnsmasq_configure() { } function services_snmpd_configure() { - if(isset($config['system']['developer'])) { + if(isset($config['system']['developerspew'])) { $mt = microtime(); echo "services_snmpd_configure() being called $mt\n" } @@ -710,7 +710,7 @@ EOD; } function services_proxyarp_configure() { - if(isset($config['system']['developer'])) { + if(isset($config['system']['developerspew'])) { $mt = microtime(); echo "services_proxyarp_configure() being called $mt\n" } @@ -762,7 +762,7 @@ function services_proxyarp_configure() { } function services_dnsupdate_process() { - if(isset($config['system']['developer'])) { + if(isset($config['system']['developerspew'])) { $mt = microtime(); echo "services_dnsupdate_process() being called $mt\n" } @@ -836,7 +836,7 @@ EOD; } function setup_wireless_olsr($interface) { - if(isset($config['system']['developer'])) { + if(isset($config['system']['developerspew'])) { $mt = microtime(); echo "setup_wireless_olsr($interface) being called $mt\n" } diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 8378f1b..7a6029b 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -33,6 +33,10 @@ require_once("functions.inc"); function system_resolvconf_generate($dynupdate = false) { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_resolvconf_generate() being called $mt\n" + } global $config, $g; $syscfg = $config['system']; @@ -82,6 +86,10 @@ function system_resolvconf_generate($dynupdate = false) { } function system_hosts_generate() { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_hosts_generate() being called $mt\n" + } global $config, $g; $syscfg = $config['system']; @@ -118,6 +126,10 @@ EOD; } function system_hostname_configure() { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_hostname_configure() being called $mt\n" + } global $config, $g; $syscfg = $config['system']; @@ -128,6 +140,10 @@ function system_hostname_configure() { } function system_routing_configure() { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_routing_configure() being called $mt\n" + } global $config, $g; /* Enable fast routing, if enabled */ @@ -173,12 +189,20 @@ function system_routing_configure() { } function system_routing_enable() { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_routing_enable() being called $mt\n" + } global $config, $g; return mwexec("/sbin/sysctl net.inet.ip.forwarding=1"); } function system_syslogd_start() { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_syslogd_start() being called $mt\n" + } global $config, $g; $syslogcfg = $config['syslog']; @@ -280,6 +304,10 @@ EOD; } function system_pccard_start() { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_pccard_start() being called $mt\n" + } global $config, $g; if ($g['booting']) @@ -303,6 +331,10 @@ function system_pccard_start() { function system_webgui_start() { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_webgui_start() being called $mt\n" + } global $config, $g; if ($g['booting']) @@ -397,7 +429,12 @@ function system_generate_lighty_config($filename, $cert, $key, $pid_file, $port, $document_root = "/usr/local/www/", $cert_location = "cert.pem", $max_procs, $max_requests = "1", $fast_cgi_enable = true) { - + + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_generate_lighty_config() being called $mt\n" + } + if($port <> "") $lighty_port = $port; else @@ -614,6 +651,10 @@ EOD; } function system_password_configure() { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_password_configure() being called $mt\n" + } global $config, $g; /* sync passwords */ @@ -625,6 +666,10 @@ function system_password_configure() { } function system_timezone_configure() { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_timezone_configure() being called $mt\n" + } global $config, $g; $syscfg = $config['system']; @@ -649,6 +694,10 @@ function system_timezone_configure() { } function system_ntp_configure() { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_ntp_configure() being called $mt\n" + } global $config, $g; $syscfg = $config['system']; @@ -712,6 +761,10 @@ function system_reboot_cleanup() { } function system_do_shell_commands($early = 0) { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_do_shell_commands() being called $mt\n" + } global $config, $g; if ($early) @@ -735,6 +788,10 @@ function system_do_shell_commands($early = 0) { } function system_console_configure() { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_console_configure() being called $mt\n" + } global $config, $g; if (isset($config['system']['disableconsolemenu'])) { @@ -745,6 +802,10 @@ function system_console_configure() { } function system_dmesg_save() { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_dmesg_save() being called $mt\n" + } global $g; exec("/sbin/dmesg", $dmesg); @@ -772,6 +833,10 @@ function system_dmesg_save() { } function system_set_harddisk_standby() { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_set_harddisk_standby() being called $mt\n" + } global $g, $config; if (isset($config['system']['harddiskstandby'])) { @@ -800,6 +865,10 @@ function system_set_harddisk_standby() { } function system_setup_sysctl() { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_setup_sysctl() being called $mt\n" + } global $config; $sysctl = return_filename_as_array("/etc/sysctl.conf"); @@ -813,12 +882,20 @@ function system_setup_sysctl() { } function system_disable_arp_wrong_if() { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_disable_arp_wrong_if() being called $mt\n" + } mwexec("/sbin/sysctl -n net.link.ether.inet.log_arp_wrong_iface=0"); } function system_enable_arp_wrong_if() { + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "system_enable_arp_wrong_if() being called $mt\n" + } mwexec("/sbin/sysctl -n net.link.ether.inet.log_arp_wrong_iface=1"); } -?> +?> \ No newline at end of file -- cgit v1.1