Mailing List archive

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

[vdr] Re: VDR wakeup (special solution)



On Sun, 23 Feb 2003, Birgit Böttger (BB) wrote:

BB> I have installed nvram-wakeup now (thanks to Sergei Haller) and
BB> have made some modifications to solve the following problems:
BB>
BB> The wakeup feature of VDR was designed for a VDR-only system, but my
BB> VDR box is also used as a "normal" pc (inet, mail, games for my kids).
BB> If VDR decides to shutdown, all sessions of "normal" users are killed.

just  change  vdrshutdown  to  look, if someone is logged in. (you may use
'who'  or  'finger'  or  something else. I never tried that myself, but it
should  work in a way like the example on http://www.mannitec.de/SVCD.htm,
which  doesn't  look  if  there  are  "normal" sessions, but if a specific
script is running)

BB> If a user shuts down the pc, VDR will never wake up again.

for this one just create a script which sends one SVDRP command to vdr:
   hitk power

and  either  tell  the normal users to use this script or replace the halt
commands  by  it  in  some  way (alias, ...), so the "normal" users do not
notice the difference.

if  you use this script on a "normal" session, you don't actually tell the
pc  to  shutdown,  but  you  tell vdr to call the vdrshutdown script if it
isn't doing anything.

This  way  no running recording is broken, the time for the next recording
is set in the bios and you don't have to modify the vdr source.

BB> [...]  Ok,  this  solution  is not really safe. If a user stops the pc
BB> while  VDR  is  recording, the rest of that recording will be lost. If
BB> the  user  stops  between  the  wakeup  time  for  a recording and the
BB> beginning of the recording, VDR never wakes up automatically.
BB>
BB> @Klaus / @Sergei: What do you mean?


I  just  noticed  that  you  already  implemented such a login check I was
talking about:

BB> # are there logins?
BB> logins=`who -q | grep '# users=' | awk -F "=" '{ print $2; }'`

you may replace the awk part by
    cut -d= -f2

hope, that helps.

PS.:  on my vdr machine I'm using ACPI. If I press the power butten of the
case,  the  script  is  called, which sends "hitk power" via SVDRP to vdr.
This  way I just tell vdr: "you can shutdown if you like" the rest is done
by vdr (and the vdrshutdown script)

c ya
        Sergei
-- 
--------------------------------------------------------------------  -?)
         eMail:       Sergei.Haller@math.uni-giessen.de               /\\
-------------------------------------------------------------------- _\_V
Be careful of reading health books, you might die of a misprint.
                -- Mark Twain



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



Home | Main Index | Thread Index