This repository has been archived on 2026-05-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
disco/client/bin/disco-sh-shell

21 lines
457 B
Plaintext
Raw Normal View History

#!/bin/bash
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
echo "disco filesystem is not mounted"
exit 1
fi
if [ "$NOOP" != "" ]; then
chroot ${DISCOROOT}/chroot /bin/env PATH=${DISCOROOT}/restricted/bin:${DISCOROOT}/munge/mungebin /bin/bash --restricted $@
else
chroot ${DISCOROOT}/chroot /bin/bash $@
fi
exit $?