LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Script requires terminal (http://www.linuxquestions.org/questions/linux-software-2/script-requires-terminal-524651/)

freelancer42 02-01-2007 07:28 AM

Script requires terminal
 
I have a minor problem with a script that has to be started on 15 netbooting clients during bootup. It works when you manually start it from bash on each client, it works when you ssh to the clients separately ("ssh clienthostname") and manually start it. It DOESN'T work when started at a runlevel ("rc-update script.sh add default"), it doesn't work when you ssh to the clients separately and execute the script as a parameter ("ssh clienthostname ./script.sh") and it doesn't work when you dsh it to all of the clients ("dsh -a ./script.sh"). Hence my conclution that it requires an actual terminal (or something like that). Does anyone have a solution to this?

Btw, the clients are using Gentoo with an NFS-mounted root filesystem.

colucix 02-01-2007 07:40 AM

You can try the -l option to bash and execute the script as
Code:

bash -l script.sh
From the bash man page:
Quote:

-l Make bash act as if it had been invoked as a login shell

freelancer42 02-01-2007 08:09 AM

It works! Thank you! :D


All times are GMT -5. The time now is 03:30 AM.