Date: Tue, 24 Jun 2014 12:26:25 -0400 From: Fbsd8 <fbsd8@a1poweruser.com> To: questions <questions@FreeBSD.org> Subject: Re: chroot command used with screen utility Message-ID: <53A9A6B1.5060804@a1poweruser.com> In-Reply-To: <53A712AF.4030900@a1poweruser.com> References: <53A712AF.4030900@a1poweruser.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Fbsd8 wrote: > Hello list > > I have three directory tree filesystems that I want chrooted. > When I issue the chroot path command the host console turns into > the console prompt for the chroot. To have 3 individual chrooted > filesystems I alt/F2 and chroot filesystem #1 , > then I alt/F2 and chroot filesystem #2 and so on. > So I end up having F1 for the host console, > F2 for the filesystem #1 > F3 for the filesystem #2 > F4 for the filesystem #3 > > The goal is to have a primary start up script which will start the > chroot filesystems from the host console without the chroot consuming > the host's console. The "man chroot" command has very little info about > usage. I can only think what I want done can not be done with the chroot > command syntax. > > I am now testing with the screen command. I get a daisy-string effect of > shells within shells. > > If there is some other method to do this I am interested. > But help with using screen is desired. > > Thanks > For the archives. Never received a reply. But I continued to work on scripting screen to run multiple chroot filesystems. Finally this created a screen in detached mode that was running a chrooted filesystem. screen -S $name -d -m chroot /usr/chroot/$name This was only half of the problem, still needed to script some way to stop the chroot running in a screen. Tried these different commands screen -S $name -X exit screen -p $name -X exit screen -S $name -X shutdown now They did not work. Finally went the kill task method screen_pid=`screen -ls | grep $name | cut -f 1 -d .` /bin/kill ${screen_pid}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53A9A6B1.5060804>