Got dual-mount of the noop/real filesystems working, made all apps aware of it, broke out the initialization logic into disco-fs-init so you can mount/unmount as much as you want, but the time consuming init process won't be repeated unless you ask
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
DISCOROOT=/var/disco/testfs
|
||||
if [ "$NOOP" != "" ]; then
|
||||
DISCOROOT=/var/disco/testfs/noop
|
||||
else
|
||||
DISCOROOT=/var/disco/testfs/real
|
||||
fi
|
||||
|
||||
mount | grep $DISCOROOT >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
@@ -9,7 +13,8 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
|
||||
if [ "$NOOP" != "" ]; then
|
||||
chroot ${DISCOROOT}/chroot /bin/env PATH=${DISCOROOT}/restricted/bin /bin/bash --login --restricted $@
|
||||
#chroot ${DISCOROOT}/chroot /bin/env PATH=${DISCOROOT}/restricted/bin:${DISCOROOT}/munge/mungebin /bin/bash --login --restricted $@
|
||||
chroot ${DISCOROOT}/chroot //bin/bash --login --restricted $@
|
||||
else
|
||||
chroot ${DISCOROOT}/chroot /bin/bash --login $@
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user