summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2004-09-02 04:16:40 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2004-09-02 04:16:40 +0000
commit964ba0afd9f1bdbdbd37b8670f5b4f6282d61da9 (patch)
tree062e69ef406fa49b5102e323bdc43a87fbea7f9d /sysutils
parent[MAINTAINER UPDATE] sysutils/est (diff)
[NEW PORT] sysutils/estctrl
This port provides a daemon for adjusting the cpu frequency (using the Enhanced Speedstep module in sysutils/est) based on the current cpu load and power source. PR: ports/71270 Submitted by: Colin Percival <cperciva@daemonology.net>
Notes
Notes: svn path=/head/; revision=117887
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/estctrl/Makefile36
-rw-r--r--sysutils/estctrl/distinfo2
-rw-r--r--sysutils/estctrl/files/estctrl.sh31
-rw-r--r--sysutils/estctrl/pkg-descr7
-rw-r--r--sysutils/estctrl/pkg-message7
6 files changed, 84 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 4a1f147b4703..bac85dee6ea8 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -111,6 +111,7 @@
SUBDIR += enteruser
SUBDIR += eroaster
SUBDIR += est
+ SUBDIR += estctrl
SUBDIR += etcmerge
SUBDIR += eventwatcher
SUBDIR += extipl
diff --git a/sysutils/estctrl/Makefile b/sysutils/estctrl/Makefile
new file mode 100644
index 000000000000..4ede46b035a7
--- /dev/null
+++ b/sysutils/estctrl/Makefile
@@ -0,0 +1,36 @@
+# New ports collection makefile for: Enhanced SpeedStep control daemon
+# Date created: 1 September 2004
+# Whom: cperciva@daemonology.net
+#
+# $FreeBSD$
+#
+
+PORTNAME= estctrl
+PORTVERSION= 0.7
+CATEGORIES= sysutils
+MASTER_SITES= http://www.daemonology.net/freebsd-est/
+
+MAINTAINER= cperciva@daemonology.net
+COMMENT= Enhanced SpeedStep control daemon
+
+RUN_DEPENDS= ${LOCALBASE}/modules/est.ko:${PORTSDIR}/sysutils/est
+
+ONLY_FOR_ARCHS= i386
+
+USE_RC_SUBR= yes
+RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+
+PLIST_FILES= sbin/estctrl \
+ etc/rc.d/estctrl.sh
+
+MAKE_ENV= BINDIR=${PREFIX}/sbin
+
+post-extract:
+ ${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${FILESDIR}/estctrl.sh > ${WRKDIR}/estctrl.sh
+
+post-install:
+ ${INSTALL_SCRIPT} ${WRKDIR}/estctrl.sh ${PREFIX}/etc/rc.d/estctrl.sh
+ ${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/sysutils/estctrl/distinfo b/sysutils/estctrl/distinfo
new file mode 100644
index 000000000000..3a751b51c897
--- /dev/null
+++ b/sysutils/estctrl/distinfo
@@ -0,0 +1,2 @@
+MD5 (estctrl-0.7.tar.gz) = 03dc1b69dd2ee37638eaba85d04655ba
+SIZE (estctrl-0.7.tar.gz) = 2547
diff --git a/sysutils/estctrl/files/estctrl.sh b/sysutils/estctrl/files/estctrl.sh
new file mode 100644
index 000000000000..baeec68aac37
--- /dev/null
+++ b/sysutils/estctrl/files/estctrl.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: estctrl
+# REQUIRE: est
+# KEYWORD: FreeBSD
+
+# Define estctrl_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/est
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+estctrl_enable="NO"
+estctrl_speed_ac="adaptive"
+estctrl_speed_battery="adaptive"
+
+. %%RC_SUBR%%
+
+name="estctrl"
+rcvar=`set_rcvar`
+
+load_rc_config $name
+
+command="%%PREFIX%%/sbin/estctrl"
+command_args="-a ${estctrl_speed_ac} -b ${estctrl_speed_battery} &"
+
+run_rc_command "$1"
diff --git a/sysutils/estctrl/pkg-descr b/sysutils/estctrl/pkg-descr
new file mode 100644
index 000000000000..da92bd1a1e41
--- /dev/null
+++ b/sysutils/estctrl/pkg-descr
@@ -0,0 +1,7 @@
+This is a daemon for controlling the CPU speed via Enhanced Speedstep on
+Intel Pentium M processors based on the current cpu load and power source.
+
+WWW: http://www.daemonology.net/freebsd-est/
+
+- Colin Percival
+cperciva@daemonology.net
diff --git a/sysutils/estctrl/pkg-message b/sysutils/estctrl/pkg-message
new file mode 100644
index 000000000000..b70a0abfaded
--- /dev/null
+++ b/sysutils/estctrl/pkg-message
@@ -0,0 +1,7 @@
+To start the Enhanced Speedstep daemon at boot:
+ echo 'estctrl_enable="YES"' >> /etc/rc.conf
+
+To run the processor at minimum or maximum frequency when on AC or
+battery power, set the est_speed_ac or est_speed_battery variables
+to "min" or "max".
+