mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-22 13:33:52 +03:00
24 lines
459 B
Bash
Executable File
24 lines
459 B
Bash
Executable File
#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
|