On Thu, Apr 17, 2014 at 12:07:46AM +0200, Szabolcs Nagy wrote:
> * Dimitris Papastamos <d...@spl9.org> [2014-04-15 17:57:25 +0100]:
> > On Tue, Apr 15, 2014 at 06:44:54PM +0200, Markus Wichmann wrote:
> > > Why switch_root and not pivot_root? Here's a sh mockup of how to do what
> > > you wrote with pivot_root:
> > > 
> > > set -e
> > > new_root=$1
> > > put_old=$2
> > > [ -d $put_old ] || made_dir=1
> > > mkdir -p $put_old
> > > cd $new_root
> > > pivot_root $new_root $put_old
> > > chroot $new_root
> > > umount ${put_old#$new_root}
> > > [ $made_dir ] && rm -rf ${put_old#$new_root}
> > 
> > Because if it is a shell script then it cannot be included in ubase-box
> 
> i just note that pivot_root is a linux system call
> so implementing that tool is a one-liner in c
> 
> so it is easy to add if it's missing from ubase

We already have pivot_root in ubase.  Markus is basically asking
why we implemented switch_root in C instead of in sh (as demonstrated
in his e-mail).

Reply via email to