Since it's only 1k I attached my apmd.  Put this in /etc/init.d/ then to
set it up to start at boot 

chkconfig --level 35 apmd on 

will get you going.  

James

On Mon, 2002-11-25 at 17:34, Matthew O. Persico wrote:
> On Mon, 25 Nov 2002 11:22:52 -0800, "Larry Sword" <[EMAIL PROTECTED]>said:
> >Thomas K. Gamble wrote:
> >
> >>On Sunday 24 November 2002 10:46 pm, Larry Sword wrote:
> >>
> >>
> >>>Have you ensured that you have apmd program installed?
> >>>
> >>>man apm
> >>>man apmd
> >>>
> >>>
> 
> Well, the man pages were there. The RPMS were not. So in installed them, but the did 
>not seem to install into /etc/rc.d. What should be the sort order for ampd in rc.d?
> 
> --
> Matthew O. Persico
> 
> 
> 
> 
> ______________________________________________________________________
> 
> Want to buy your Pack or Services from MandrakeSoft? 
> Go to http://www.mandrakestore.com
#!/bin/sh
#
# chkconfig: 2345 26 74
# description: apmd is used for monitoring battery status and logging it via \
#	syslog(8). It can also be used for shutting down the machine when \
#	the battery is low.
# processname: apmd
# config: /etc/sysconfig/apmd
# clock: /etc/sysconfig/clock

# If APM isn't supported by the kernel, try loading the module...
[ -e /proc/apm ] || /sbin/modprobe apm &>/dev/null

# Don't bother if /proc/apm still doesn't exist, kernel doesn't have
# support for APM.
[ -e /proc/apm ] || exit 0

CONFIG=/etc/sysconfig/apmd

# Source function library.
. /etc/init.d/functions

RETVAL=0

start() {
	gprintf "Starting up APM daemon: "
	test -r "$CONFIG" && . "$CONFIG"
	daemon /usr/sbin/apmd -p $LOGPERCENTCHANGE -w $WARNPERCENT $ADDPARAMS \
		-P /etc/sysconfig/apm-scripts/apmd_proxy
	RETVAL=$?
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/apmd
	echo
}

stop() {
	gprintf "Shutting down APM daemon: "
	killproc apmd
	RETVAL=$?
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/apmd
	/sbin/modprobe -r apm &>/dev/null
	echo
}

dostatus() {
	status apmd
	RETVAL=$?
}

restart() {
	stop
	start
	RETVAL=$?
}

condrestart() {
	[ -e /var/lock/subsys/apmd ] && restart || :
}

# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  status)
	dostatus
	;;
  restart|reload)
	restart
	;;
  condrestart)
	condrestart
	;;
  *)
	gprintf "Usage: apmd.init {start|stop|status|restart|reload|condrestart}\n"
	exit 1
esac

exit $RETVAL
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to