Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Kubuntu User (http://www.linux-archive.org/kubuntu-user/)
-   -   Why won't my script run? (http://www.linux-archive.org/kubuntu-user/263218-why-wont-my-script-run.html)

Mark Greenwood 03-14-2009 04:07 PM

Why won't my script run?
 
Another question for the boffins..

My Acer Aspire One needs a special script to control the fan. This script is called /usr/local/bin/acerfand and, when I run it from the command line it does indeed control the fan. acerfand is a bash script which daemonises itself using magic I do not understand.

To get it to start at boot I'm instructed to place the command line into /etc/rc.local, so ignoring comments my /etc/rc.local now looks like

#!/bin/sh -e
/usr/local/bin/acerfand
exit 0

If I run 'sudo /etc/rc.local' from the command line my fan script starts running, the fan is being controlled and I can see acerfand as a running process.

On boot however, the script starts and then immediately exits (I put debug in, I can see it in syslog starting up and then exiting). There is no running process called acerfand after boot. Again, I type 'sudo /etc/rc.local' at a command line and now there is a running acerfand process.

Why the different behaviour at boot, and how can I make it work?

It worked on Mandriva.... ;)

Thanks,

Mark

--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users


All times are GMT. The time now is 10:49 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.