LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 02-01-2007, 07:28 AM   #1
freelancer42
LQ Newbie
 
Registered: Sep 2006
Posts: 17

Rep: Reputation: 0
Question 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.
 
Old 02-01-2007, 07:40 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,362

Rep: Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910
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
 
Old 02-01-2007, 08:09 AM   #3
freelancer42
LQ Newbie
 
Registered: Sep 2006
Posts: 17

Original Poster
Rep: Reputation: 0
It works! Thank you!
 
  


Reply

Tags
bash, gentoo, netboot, script, ssh, terminal


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
making a script that opens terminal and enter commands into that terminal Cinematography Linux - General 8 12-16-2008 10:34 AM
Adobe Acrobate Reader Requires A Plugin-That Requires Open LDAP That Requires Berkely Old_Fogie Slackware 10 05-08-2006 05:04 AM
problem with the terminal and a shell script LinuxPadawan Linux - General 1 05-17-2005 10:29 PM
Fluxbox startup script.......... App requires root. DraaX Slackware 2 11-28-2004 08:27 AM
is there a script that controls what happens when you switch a terminal? Fascistchicken Linux - General 2 09-29-2004 10:11 PM


All times are GMT -5. The time now is 12:59 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration