[mythtv-users] [mythtv] Could/should the shutdown command be kept locally?
Nick Morrott
knowledgejunkie at gmail.com
Tue Apr 24 01:32:28 UTC 2007
On 24/04/07, Mark Knecht <markknecht at gmail.com> wrote:
> On 4/23/07, Nick Morrott <knowledgejunkie at gmail.com> wrote:
> > On 24/04/07, Mark Knecht <markknecht at gmail.com> wrote:
> > > On 4/22/07, Nick Morrott <knowledgejunkie at gmail.com> wrote:
> >
> > > > Pressing the power button on the frontend machine will gracefully shut
> > > > the machine down, if you've configured your OS properly. Similarly, so
> > > > will configuring a remote button to use irexec to shutdown the machine
> > > > via a simple script.
> > > >
> > > > Nick
> > >
> > > Yes, I've done that much. However if you are in bed at night and
> > > pretty much ready to go to sleep so you decide to shut the machine
> > > down and find out it cannot communicate to the backend server then
> > > getting out of bed to push the power switch is a minor inconvenience.
> > > Nothing major of course. I'd even be happy with a non-Myth LIRC-based
> > > solution that went around Myth completely.
> > >
> >
> > Mark,
> >
> > (pulled over from -dev list)
> >
> > Just configure the power (or another) button on the remote to execute
> > an irexec shutdown script as I alluded to before - key benefit is you
> > don't need to get out of bed, and it doesn't involve MythTV at all, so
> > should work even if the frontend fails to connect to the backend.
> >
> > Nick
>
> Thanks Nick.
>
> OK, based on the following link
>
> http://www.develia.org/documents.php?l=2&f=1&p=lirclivedrive
>
> I gave it a try by putting the following in ~mythtv/.lircrc:
>
> #Power Button
> begin
> prog = irexec
> button = Power
> config = shutdown -h now &
> end
>
> I tried exiting mythfrontend and also tried rebooting but nothing
> happened when I hit the power button on the StreamZap. It's been a
> long time since I set up the StreamZap so probably I need to somehow
> ensure that Power maps to the right StreamZap code. Currently I have
> this in /etc/lircd.conf
>
> <SNIP>
> 7 0x07
> 8 0x08
> 9 0x09
> POWER 0x0A
> MUTE 0x0B
> CH_UP 0x0C
> <SNIP>
Edit your lircrc file and use "POWER" as the button name, not "Power".
The button name needs to be exactly the same as the definition in
lircd.conf. Make sure your frontend user has the correct privileges to
shut the machine down.
Also (I think you've already got this sorted), ensure that irexec is
running with the correct lircrc definition - some MythTV users will
only have ~/.mythtv/lircrc so just make sure it is using the file the
contains the irexec config :)
Nick
--
MythTV Official wiki:
http://mythtv.org/wiki/
MythTV users list archive:
http://www.gossamer-threads.com/lists/mythtv/users
"An investment in knowledge always pays the best interest." - Benjamin Franklin
More information about the mythtv-users
mailing list