summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/system.inc9
-rwxr-xr-xetc/rc.bootup3
2 files changed, 12 insertions, 0 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index ef2884b..c75de77 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -32,6 +32,15 @@
/* include all configuration functions */
require_once("functions.inc");
+function activate_powerd() {
+ global $config, $g;
+ if(isset($config['system']['powerd_enable'])) {
+ exec("/usr/sbin/powerd -b adp -a adp");
+ } else {
+ exec("/usr/bin/killall powerd");
+ }
+}
+
function activate_sysctls() {
global $config, $g;
diff --git a/etc/rc.bootup b/etc/rc.bootup
index b19bf41..4dda274 100755
--- a/etc/rc.bootup
+++ b/etc/rc.bootup
@@ -280,6 +280,9 @@
/* start the upnp daemon if it is enabled */
upnp_start();
+ /* If powerd is enabled, lets launch it */
+ activate_powerd();
+
mwexec_bg("/usr/sbin/update_dns_cache.sh");
/* done */
OpenPOWER on IntegriCloud