Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Nvram-wakeup



Hello Sergei,

To get nvram-wakeup-0.90 working with my board, I edited
nvram-wakeup-mb.c like follows (near line 769):
- { gig_ga_7vtxh,     "gig_ga_7vtxh",
                      "Gigabyte Technology Co., Ltd.",
                      "7VTXH", "1.0",
                      "American Megatrends Inc.",
                      "062710",
                      "12/19/2001"},

After this my board was dectect automatically.

JG> As I need to reboot (board Gigabyte GA-7VTXH) I wonder if there is 
JG> an option in grub like the -R option in lilo. I am not very used to 
JG> linux. In the manual of grub I find nothing about this.
> I  never  used  grub  myself,  so I can't say much about it, but
there's a comment about grub in the README of nvram-wakeup.
I also found out, that there is an option in grub 0.93, that could be
compared to the -R option in lilo.
Here is what I did:

- Add the following lines to grub's /boot/grub/menu.lst:
	title Power Off
    	  halt
- Create the file grub_reboot
#!/bin/bash
grub --batch <<EOT 1>/dev/null 2>/dev/null
savedefault --default=1 --once
quit
EOT

- My vdrshutdown script looks like this:
#!/bin/bash
# $Id: vdrshutdown,v 1.10 2002/03/15 22:25:38 bistr-o-math Exp $

NVRAMCMD=/usr/local/bin/nvram-wakeup
$NVRAMCMD -ls $1 
case $PIPESTATUS in
     0) # all went ok - new date and time set
        shutdown -h now
        EXITSTATUS=0
        ;;
     1) # all went ok - new date and time set.
        #
        # *** but we need to reboot. ***
        #
        # for some boards this is needed after every change.
        #
        # for some other boards, we only need this after changing the
        # status flag, i.e. from enabled to disabled or the other way.
        
        
        # For plan A (see README file for more details) - uncomment
        #            the touch line (don't forget to change your boot
script)
        #            and comment out the lilo line
        #
        # For plan B - uncomment the lilo line and comment out the touch
line
        #            (don't forget to install the modified kernel image
first)
        #
        # touch /nvramboot
        #lilo -R PowerOff
	  grub_reboot
                
        shutdown -r now
        EXITSTATUS=0
        ;;
     2) # something went wrong
        # don't do anything - just exit with status 1
        EXITSTATUS=1
        ;;
esac

# exit with 0 if everything went ok.
# exit with 1 if something went wrong.
exit $EXITSTATUS

Everything works fine and you do not need a special power off kernel if
a reboot is needed.

CU

Jens




-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index