Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 246946 Details for
Bug 124755
sys-power/nvram-wakeup: init.d for automatic wakeup
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
init-script with modified copyleft
powerup (text/plain), 2.42 KB, created by
georg.lippold
on 2010-09-12 08:15:15 UTC
(
hide
)
Description:
init-script with modified copyleft
Filename:
MIME Type:
Creator:
georg.lippold
Created:
2010-09-12 08:15:15 UTC
Size:
2.42 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 2006-$YEAR Gentoo Foundation ># Copyright 2006 Georg Lippold ># Distributed under the terms of the GNU General Public License v2 ># $Header$ ># ># This program is free software; you can redistribute it and/or modify ># it under the terms of the GNU General Public License as published by ># the Free Software Foundation; either version 2 of the License, or ># (at your option) any later version. ># ># This program is distributed in the hope that it will be useful, ># but WITHOUT ANY WARRANTY; without even the implied warranty of ># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ># GNU General Public License for more details. ># ># You should have received a copy of the GNU General Public License ># along with this program; if not, write to the Free Software ># Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > ># ChangeLog: ># ># 2006.03.03 - Georg Lippold: Found out that if you want the server to wake up ># later the same day with the conffile, that it takes the next day instead of ># the same day. Fixed that. ># ># 2006.03.02 - Georg Lippold: initial version > >WAKEUP=/usr/bin/nvram-wakeup >CONFFILE=/etc/powerup > >depend() { > need localmount > before clock >} > >start() { > if [[ -x $WAKEUP ]] && [[ -s $CONFFILE ]] ; then > ebegin "Setting startup time" > TODAY="`date +%u`" > TIMETODAY="`grep ^$TODAY $CONFFILE | tail -n 1 | awk '{print $2}'`" > SECONDTODAY=`date +%s -d "$TIMETODAY"` > if [[ `date +%s` -lt $SECONDTODAY ]] ; then > $WAKEUP -s $SECONDTODAY > eend 0 > else > TOMORROW="`date +%u -d tomorrow`" > TIMETOMORROW="`grep ^$TOMORROW $CONFFILE | tail -n 1 | awk '{print $2}'`" > SECONDTOMORROW=`date +%s -d "$TIMETOMORROW tomorrow"` > $WAKEUP -s $SECONDTOMORROW > eend 0 > fi > else > eerror "Not setting new start date, $WAKEUP or $CONFFILE does not exist" > eend 1 > fi > >} > >stop() { > if [[ -x $WAKEUP ]] && [[ -s $CONFFILE ]] ; then > ebegin "Setting startup time" > TODAY="`date +%u`" > TIMETODAY="`grep ^$TODAY $CONFFILE | tail -n 1 | awk '{print $2}'`" > SECONDTODAY=`date +%s -d "$TIMETODAY"` > if [[ `date +%s` -lt $SECONDTODAY ]] ; then > $WAKEUP -s $SECONDTODAY > eend 0 > else > TOMORROW="`date +%u -d tomorrow`" > TIMETOMORROW="`grep ^$TOMORROW $CONFFILE | tail -n 1 | awk '{print $2}'`" > SECONDTOMORROW=`date +%s -d "$TIMETOMORROW tomorrow"` > $WAKEUP -s $SECONDTOMORROW > eend 0 > fi > else > eerror "Not setting new start date, $WAKEUP or $CONFFILE does not exist" > eend 1 > fi >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 124755
:
81185
|
81240
| 246946