LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-24-2015, 02:46 PM   #1
Big_City
LQ Newbie
 
Registered: Jul 2015
Posts: 2

Rep: Reputation: Disabled
How do I keep my script running after an install hangs at a text input screen?


Hello,

I've created a script to install a few packages/applications on CLI Debian systems. It works fine, expect for when I install dropbox (~/.dropbox-dist/dropboxd). At the end of the dropbox install, after linking my account--when it states "welcome this machine is now linked to dropbox", it just stays on that message and give me that blank (no prompt) text input screen and prevents my script from continuing. I know I can get out of it by ctrl-C, but it also kills my script. Is there anyway to force my script to continue running when it hits this dropbox blank space?
 
Old 07-24-2015, 02:57 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2 on Lenovo Thinkpad W520
Posts: 7,095

Rep: Reputation: 2241Reputation: 2241Reputation: 2241Reputation: 2241Reputation: 2241Reputation: 2241Reputation: 2241Reputation: 2241Reputation: 2241Reputation: 2241Reputation: 2241
Hello,

You can stop it, then put it in the background (Ctr+Z then bg). Or you can just start it in the background appending & to its name.

This can also been done sending it appropriate signals with kill
 
Old 07-24-2015, 03:22 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,357

Rep: Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989
It's difficult to deal with programs that don't behave, including ones that hang forever instead of returning to the caller. One thing you can do is launch the installer in the background, then use a read to wait for user input. When the dropbox installer finishes, just press enter to let your script continue on, eg:
Code:
/path/to/dropbox-install &
read
/path/to/next/installer
Of course that won't work if the dropbox installer needs input on the CLI.
 
Old 07-24-2015, 04:21 PM   #4
Big_City
LQ Newbie
 
Registered: Jul 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
:-)

Sweet! Thanks for the tips, the "&" and "read" worked liked a charm.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Bash while loop reading multiple field text input and running remote commands bong_water Programming 2 02-11-2015 11:28 PM
[SOLVED] Using sed within a script to change the input of a seperate text file Leeofthedark Programming 5 04-10-2014 08:02 PM
Input to a screen session from a script running outside Skaperen Linux - Software 0 08-01-2012 06:15 PM
bash: feeding input to a script from a text file faizlo Programming 32 12-02-2010 10:45 AM
'input signal out of range' (blank screen) using hp vs17 monitor when running ppracer sirius57 Linux - Hardware 1 10-10-2009 04:05 PM


All times are GMT -5. The time now is 06:41 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration