Re: chroot command used with screen utility

看板FB_questions作者時間11年前 (2014/06/25 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
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} _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
文章代碼(AID): #1JgRpWCU (FB_questions)
文章代碼(AID): #1JgRpWCU (FB_questions)