I've attached the init.d script I've been using for at least a year. I hope it is useful to other people.
- Peter Canning On Wed, 2002-02-27 at 09:20, Bastien Nocera wrote: > On Wed, 2002-02-27 at 16:56, Josh Huber wrote: > > Bastien Nocera <[EMAIL PROTECTED]> writes: > > > > > I know it doesn't use the PMU. I was more thinking of a > > > debian-package a-la pmac-utils with an all-in-one settings file, and > > > a nice init-script to start it all up. I didn't think of combining > > > all the tools physically in the same program. > > > > This is what I was thinking as well... > > I've already got a a mouse_emu init script... > I never could download the server thingo when i actually needed it > though. I could hack a pmacpow init script tonight, and later on we'd > merge all these, sounds good to you ? > > Cheers > > -- > /Bastien Nocera > http://hadess.net
#!/bin/sh # # pmacpow Set up the next power up time. # echo -n "Setting power up time" POWERUP=/usr/local/sbin/pmacpow POWERUPFLAGS= if [ -f /etc/default/rcS ]; then . /etc/default/rcS if [ "${DAYS}" = "WEEKDAYS" ]; then POWERUPFLAGS="-w" elif [ "${DAYS}" = "WEEKENDS" ]; then POWERUPFLAGS="-e" elif [ "${DAYS}" = "SUNDAYS" ]; then POWERUPFLAGS="-d 0" elif [ "${DAYS}" = "MONDAYS" ]; then POWERUPFLAGS="-d 1" elif [ "${DAYS}" = "TUESDAYS" ]; then POWERUPFLAGS="-d 2" elif [ "${DAYS}" = "WEDNESDAYS" ]; then POWERUPFLAGS="-d 3" elif [ "${DAYS}" = "THURSDAYS" ]; then POWERUPFLAGS="-d 4" elif [ "${DAYS}" = "FRIDAYS" ]; then POWERUPFLAGS="-d 5" elif [ "${DAYS}" = "SATURDAYS" ]; then POWERUPFLAGS="-d 6" fi if [ "${UTS}" = "yes" ]; then POWERUPFLAGS="$POWERUPFLAGS -u" fi POWERUPFLAGS="$POWERUPFLAGS $TIME" fi echo -n ": " $POWERUP $POWERUPFLAGS exit 0