View Single Post
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#529
pipeline: the "lock" file ($CHROOT/var/lock/chroot-complete) determines if the given partition/image has been mounted already on the given directory. If it is already mounted, it skips the mount and goes on to the chroot. If something else (another filesystem) is mounted there, the script calls "closechroot" to unmount/close the mounted fs, then it goes on to mount the given fs and then chroot into it.

(this was the part that was broken and eber42 found)

Would you like me to break this into two scripts, a mounting script and a chroot script? I would have the chroot script call the mounting script at the proper place. That might also give me some better control over error states... hmm...

The "lock" file would be used for the mounting stage, rather than the chroot stage, since it really can only be used to determine that something is mounted, not whether you are chrooted into that directory...

Also, please note that my most current scripts are in the easy-chroot package on my repository. Use those rather than the ones from the post attachment. I'll repost the scripts when I upload to Extras.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!

Last edited by qole; 2009-02-18 at 01:32.