mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-25 06:03:36 +03:00
24 lines
459 B
Bash
24 lines
459 B
Bash
|
#mkdir /mnt/context
|
||
|
#mount /dev/disk/by-label/CONTEXT /mnt/context/
|
||
|
|
||
|
cp /mnt/onegate /usr/bin
|
||
|
chmod +x /usr/bin/onegate
|
||
|
|
||
|
TOKENTXT=`cat /mnt/token.txt`
|
||
|
echo "export TOKENTXT=$TOKENTXT" >> /root/.bashrc
|
||
|
|
||
|
function export_rc_vars
|
||
|
{
|
||
|
if [ -f $1 ] ; then
|
||
|
ONE_VARS=`cat $1 | egrep -e '^[a-zA-Z\-\_0-9]*=' | sed 's/=.*$//'`
|
||
|
|
||
|
. $1
|
||
|
|
||
|
for v in $ONE_VARS; do
|
||
|
echo "export $v=\"${!v}\"" >> /root/.bashrc
|
||
|
done
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
export_rc_vars /mnt/context.sh
|