clean up downloaded profile files

ksolomko/vlan
Erhard Rank 14 years ago
parent 82ca92a8f9
commit 7372ff94e3

@ -304,16 +304,17 @@ if [ -n "$PROFILE" ] && [ -n "$NETSCRIPT_SERVER" ] ; then
done
DOWNLOADDIR=$(echo ${NETSCRIPT_SERVER}/$PROFILE | sed 's|^http://||')
echo $DOWNLOADDIR
if [ -d "$DOWNLOADDIR" ] ; then
if [ -s "$DOWNLOADDIR/default.sh" ] ; then
rm -f $DOWNLOADDIR/index.html*
rm -rf $DOWNLOADDIR/index.html*
mv $DOWNLOADDIR/* ./
rmdir -p $DOWNLOADDIR
echo "Loading profile $PROFILE"
. default.sh
else
echo "Error: No default.sh in profile $PROFILE from $NETSCRIPT_SERVER" >&2
rm -rf $DOWNLOADDIR/*
rmdir -p $DOWNLOADDIR
exit 1
fi
else

Loading…
Cancel
Save