This is a (small) program that can read and write the WakeUp time in the BIOS (via /dev/nvram on recent 2.4.x kernels). On this WakeUp time the computer will be powered on automatically from the soft-off state. I made two ebuilds. One for the main package and one for the optional PowerOff bootimages. I suggest "sys-apps/nvram-wakeup" and "sys-apps/nvram-reboot". Reproducible: Always Steps to Reproduce:
Created attachment 28865 [details] nvram-wakeup-0.95a.ebuild Tool to read/write the WakeUp time in the BIOS (/dev/nvram)
Created attachment 28866 [details] nvram-reboot-2003.08.07.ebuild PowerOff Boot-Images for nvram-wakeup (not needed for GRUB)
Created attachment 28885 [details] nvram-wakeup-0.95a.ebuild Updated Ebuild: now trying to download the latest nvram-wakeup-mb.c file from CVS
Created attachment 28975 [details] nvram-wakeup-0.95a.ebuild update #2: CVS update is now optional via USE-Flag 'mbcvs'. It's safer this way, because the author told me, that this file could be changed in future in CVS and then the ebuild would be broken until the new version arrives.
ok, the last ebuild is stable for me and the final version. I won't change it anymore. Feel free to put it into portage. ;-)
remind remind remind ;-)
version 0.96 is out. I provide a new ebuild (with some enhancements). still testing... gimme an hour... ;-)
Created attachment 33087 [details] nvram-wakeup-0.96.ebuild version bump + some enhancements. adding new group 'nvram' and suid the nvram-wakeup binary, so users which are in the nvram group are able to use it w/o superuser rights. the GID of nvram is currently 64000. But feel free to change it (see $MY_GID). ATTENTION: this ebuild introduces a *new* USE-flag 'mbcvs'
Created attachment 33095 [details] nvram-wakeup-0.96.ebuild little bugfixing. forgot to provide 'set_timer' sample script (installed as doc).
ok, the ebuild works perfectly on x86 with kernel 2.6.5. now you can put it into portage ASAP. ;-) btw: both ebuilds should also work on amd64, but I had no time to test it yet. 'nvram-reboot' installs only x86 32-Bit boot-images, but this should not be a problem, since Athlon-64 can excute it and the only purpose is to HALT the machine. btw^2: VDR users need this!
Created attachment 33097 [details] nvram-wakeup-0.96.ebuild grmpf! fixing another small issue. /usr/share/locale/de/LC_MESSAGES/guess-helper.mo had executable bit set. changed perms to 644.
hmm, no reaction. So I remind again... ;-)
0.97 is out!
ok, just version bump 0.96 to 0.97 and it works (tested!)
Created attachment 36156 [details] nvram-wakeup-0.97.ebuild small change in VDR sample scripts. placing them into $DOCDIR/VDR.
Created attachment 36231 [details] nvram-wakeup-0.97.ebuild - alternative ebuild, no user/group support Stefan: Downloading stuff inside of the ebuild is a security flaw and therefore not allowed. Changing CFLAGS makes no sense for this package, since there will be no noticable performance advantange for sure and damaging the BIOS because of some avoidable optimiziation would be painful - this is a something to go with author defaults imho. Have a look at my sample ebuild.
1. ok, drop the 'mbcvs'-flag (seen such thingy in another ebuild) 2. ok, drop $CFLAGS but: 1. tell me why we should drop user/group support 2. tell me why you dropped all the VDR stuff: # provide the sample config in /etc insinto /etc doins ${MY_DOC}/nvram-wakeup.conf rm -f ${MY_DOC}/nvram-wakeup.conf # move documents and examples dodoc ${MY_DOC}/* docinto VDR dodoc ${D}/usr/bin/vdrshutdown set_timer rm -f ${D}/usr/bin/vdrshutdown rm -rf ${MY_DOC} It's ok that you "optimize" the ebuild, but please do not drop the resulting document-structure. It was well designed and had a good reason to do it as I have done it! 'vdrshutdown' and 'set_timer' are *sample*-scripts and *NOT* runnable as-is! You have to edit them first. And it's not a good idea to edit sample-scripts in /usr/bin!
You got me wrong, Stefan. I made the ebuild for myself before even looking if there is a bug report. I'm not doing base-system stuff and just wanted to give you some input - mainly because of the wget. :)
oh, sorry! ;) but doesn't matter, since the maintainer (HELLO?!) will read your comments. And so I have to answer. we can talk about wget and CFLAGS, but we can *not* talk about the doc-thingy. ;-) btw: you can't damage the BIOS with wrong CFLAGS, because this is a very simple program. It uses /dev/nvram and has only access to 128 Bytes of the nvram. The worsest thing that could happen, is that you trash the BIOS-config (but you can do this also with "good" CFLAGS). Then you have to find the little jumper to reset the config. *g* nvram-wakeup works *perfect* for me since the first betas. It's a really cool program!
>btw: you can't damage the BIOS with wrong CFLAGS, because this is a very simple program. I'll trust the author - even though his warnings are obviously there to prevent him being held liable. I'm just very conservative and careful when it comes to such things. And even if you don't run the risk of damaging the BIOS, optimization is pretty useless here.
remind, remind, remind. ;-)
yes, we dont want to let the user kill themselves with silly CFLAGS, but allowing the makefile to use the default isnt acceptable either ... i changed the ebuild to run `strip-flags` nvram-wakeup is now in portage
i dont understand the point of the nvram-reboot package they're basically bootable images that, when booted, turn your computer off ??
yes, these are boot-images to power off the PC and are really needed if you don't use GRUB (which has a 'halt' command). There's a short README, just read it, if you want to learn more. ;-)
there is no README in the reboot tarball, just two .txt files one just has an example lilo entry while the other is completely in german ... my german's pretty rusty, so gimme sometime to try to understand the other :P
ooops. sorry! ;-) ok, you need the images to power off the PC after setting the time in nvram. This is needed by some BIOSes. 'nvram-wakeup' sets the time, but it is activated by the BIOS *after* reboot on some (most?) boards. So the trick is to reboot into a poweroff bzImage. If you have grub installed, you can use the 'halt' command instead. But with lilo you need such tricky images, hence I made this package optional. But you have to put it into portage, because w/o, nvram-wakeup isn't complete.
cleaned up and added to portage, enjoy
the nvram-wakeup ebuild you've put into portage is buggy! at least 2 things are odd: 1. /usr/bin/vdrshutdown is a sample script. It doesn't work. I know, that the includes installer installs it into /usr/bin, but that's wrong. Right place is the doc dir. 2. you install /usr/share/man/man8/set_timer.8.gz but forgot to install 'set_timer', which is also a samplescript and should to into docdir. my ebuild had all these patches. But you used Carsten's ebuild and that was a mistake, if you don't merge all features. ;-) Ok, I fix it and attach the corrected ebuild. Please put this patched ebuild into portage then (ASAP). Thanks!
Created attachment 41444 [details] nvram-wakeup-0.97-r1.ebuild fixed nvram-wakeup-0.97.ebuild please put it into portage ASAP.
Created attachment 41445 [details, diff] nvram-wakeup-0.97.ebuild.patch diff only to nvram-wakeup-0.97.ebuild so you can see the differences.
what have I done: 1. removed -g (debug info) from CFLAGS 2. install sample config into /etc 3. move vdrshutdown sample script from /usr/bin to ${DOCDIR}/VDR 4. install set_timer sample script into ${DOCDIR}/VDR btw: oops: ;-) small error found... I correct it and upload it again.
Created attachment 41446 [details] nvram-wakeup-0.97-r1.ebuild small fix.
Created attachment 41447 [details, diff] nvram-wakeup-0.97.ebuild.patch dito for the diff.
fixed up 0.97-r1
wow! 5 months for this tiny fix. nonetheless, thanks.