From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1188 Path: news.gmane.org!not-for-mail From: "xavier dutoit" Newsgroups: gmane.comp.sysutils.supervision.general Subject: pownernowd run script Date: Mon, 3 Jul 2006 10:32:26 +0200 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1151915655 23124 80.91.229.2 (3 Jul 2006 08:34:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 3 Jul 2006 08:34:15 +0000 (UTC) Original-X-From: supervision-return-1424-gcsg-supervision=m.gmane.org@list.skarnet.org Mon Jul 03 10:34:14 2006 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1FxJsg-0000R3-7E for gcsg-supervision@gmane.org; Mon, 03 Jul 2006 10:34:10 +0200 Original-Received: (qmail 31305 invoked by uid 76); 3 Jul 2006 08:34:30 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 31240 invoked from network); 3 Jul 2006 08:32:49 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=lgX2kBK7LXzrkwdXUREbuBV+oR/ionttZvek3b9H9s6CHvf0XosINWL1f8Z9/OtbjitB+JRY0llPtUXn/n+OHTkSFZJgdgM2s41hU0XCmmC6DLLtrOw2bI3ZBl81/WDdLkwi9hiV0+Nlgz4SVB8QOe5c1I533p1ZZzka1GWifUY= Original-Sender: sydesy@gmail.com Original-To: supervision@list.skarnet.org Content-Disposition: inline X-Google-Sender-Auth: 0e8704a8c4326949 Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1188 Archived-At: Hello, I've written a run script for powernowd (tested on a sarge with standard package): #! /bin/sh modprobe cpufreq-userspace if [ -f /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ] then exec /usr/sbin/powernowd -d else echo "required sysfs objects not found!" echo -e "\tRead /usr/share/doc/powernowd/README.Debian for more information." fi I wasn't sure about how to deal with error messages if the proc can't change its frequency. I kept what the init.d script did. I hope it might be useful to someone, and forgive me if the code doesn't do it the runit way, that's my first run script. Any suggestion to improve more than welcome. Xavier