Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
12-14-2005, 03:47 PM
|
#1
|
|
LQ Newbie
Registered: Dec 2005
Posts: 6
Rep:
|
Bash Scripting and Chroot/Exec
Hi, I was just writing a shell script that needs to chroot or start another bash shell, but when I tried executing it, the part of the script after the chroot never ran. I was wondering if there was a way to do this without having to make separate scripts. Thanks :-)
|
|
|
|
12-14-2005, 03:55 PM
|
#2
|
|
Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Squeeze, Fedora 14
Posts: 7,268
Rep:
|
Quote:
|
Originally Posted by yoshiznit123
Hi, I was just writing a shell script that needs to chroot or start another bash shell, but when I tried executing it, the part of the script after the chroot never ran. I was wondering if there was a way to do this without having to make separate scripts. Thanks :-)
|
I would guess that after the chroot you would have to make the command paths relative to the new root. If the directories where the commands are located are not accessible from the new root then the commands cannot be executed.
---------------------
Steve Stites
|
|
|
|
12-14-2005, 04:13 PM
|
#3
|
|
LQ Newbie
Registered: Dec 2005
Posts: 6
Original Poster
Rep:
|
I tried that, but apparently the new bash doesn't recognize that it should continue executing the script. Any ideas?
|
|
|
|
12-14-2005, 06:27 PM
|
#4
|
|
Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Squeeze, Fedora 14
Posts: 7,268
Rep:
|
Quote:
|
Originally Posted by yoshiznit123
I tried that, but apparently the new bash doesn't recognize that it should continue executing the script. Any ideas?
|
What error message are you getting?
-------------------
Steve Stites
|
|
|
|
12-14-2005, 08:20 PM
|
#5
|
|
LQ Newbie
Registered: Dec 2005
Posts: 6
Original Poster
Rep:
|
It's not an error, its just that the script I'm trying to run stops after the chroot (sort of like running an exec command); I'm trying to make the script keep running in the new chroot.
|
|
|
|
12-14-2005, 08:20 PM
|
#6
|
|
LQ Newbie
Registered: Dec 2005
Posts: 6
Original Poster
Rep:
|
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:54 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|