On 05/28/2010 12:59 PM, john wrote:
> Hi all,
>
> I have a setup a cronjob that shuts down our schools
> thin clients at the same time every day. I followed
> https://help.ubuntu.com/community/UbuntuLTSP/ChrootCronjobs
> and
> https://help.ubuntu.com/community/UbuntuLTSP/AutomatedTCShutodwn
>
> In general the approach works well enough however I have an ASUS
> eeebox 8202 that
> doesn't properly shutdown when cron executes
>
> CRONTAB_01 = "* 16 * * 1-5 /sbin/shutdown -P now"
>
> from /var/lib/tftpboot/ltsp/i386/lts.conf
>
> I'd like to make an exemption in the lts.conf file
> for this unit so that it doesn't execute this cron job (e.g. It'll
> just stay on) but I am not sure how to proceed. Could anyone give me
> a nudge?
>

Why not just write your own script?

CRONTAB_01 = "* 16 * * 1-5 "/usr/local/bin/my_shutdown"

where my_shutdown:

#! /bin/sh
if [ `hostname` != 'asus_hostname' ] ; then /sbin/shutdown -P now ; fi"

(note backticks around hostname, but quotes around asus_hostname)

or, given how short the script is you could just shove the whole thing in 
your crontab line.

-Steve

------------------------------------------------------------------------------

_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.freenode.net

Reply via email to