Skip to content
Snippets Groups Projects
Commit a56e2970 authored by Bob Lantz's avatar Bob Lantz Committed by Brian O'Connor
Browse files

Make sure that /bin/bash exists before attempting to chroot.

parent f3442903
No related branches found
No related tags found
No related merge requests found
......@@ -35,9 +35,9 @@ fi
# Check whether host should be running in a chroot dir
rootdir="/var/run/mn/$host/root"
if [ -d $rootdir ]; then
if [ -d $rootdir -a -x $rootdir/bin/bash ]; then
cmd="'cd `pwd`; exec $cmd'"
cmd="chroot $rootdir bash -c $cmd"
cmd="chroot $rootdir /bin/bash -c $cmd"
fi
cmd="exec sudo mnexec -a $pid $cg $cmd"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment