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:
2012-08-07 10:33:29 -04:00
parent 651b0c86d9
commit f51124252e
5 changed files with 127 additions and 89 deletions

View File

@@ -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