Moved disco-ball to universe, added functions necessary for fetching, templating, and executing a given disco ball. Made all existing scripts aware of NOOP and how to change their DISCOROOT accordingly. Added skeleton restricted.d/* files for a semi-safe base system. Added disco-param that allows management of parameters on the client (currently isn't smart enough to manage them on the server, or per-module). Added client/bin/disco that actually allows the entire thing to come together and get executed. Still lots of bugs to work out.
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
DISCOROOT=/var/disco/testfs
|
||||
if [ "$NOOP" == "" ]; then
|
||||
DISCOROOT=/var/disco/testfs/real
|
||||
else
|
||||
DISCOROOT=/var/disco/testfs/noop
|
||||
fi
|
||||
|
||||
mount | grep $DISCOROOT >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
./disco-fs-mount
|
||||
./disco-fs-mount || exit 1
|
||||
fi
|
||||
|
||||
# Strip out any shebang and put the script in the root
|
||||
mkdir -p ${DISCOROOT}/restricted/$(dirname $2)
|
||||
cat $1 | sed s/'^#!.*'/''/g > ${DISCOROOT}/restricted/$2
|
||||
$(dirname $0)/disco-sh-shell ${DISCOROOT}/restricted/$2
|
||||
NOOP="$NOOP" $(dirname $0)/disco-sh-shell ${DISCOROOT}/restricted/$2
|
||||
exit $?
|
||||
|
||||
Reference in New Issue
Block a user