Charles M.C. Chan
Committed by Pavlin Radoslavov

ONOS-487: Allow ONOS to be installed using different user/group

Change-Id: Ica926a2a6e0870e3aeab1e1585073196358c8184
......@@ -33,4 +33,5 @@ export ONOS_ZIP=$ONOS_STAGE.zip
export ONOS_INSTALL_DIR="/opt/onos" # Installation directory on remote
export OCI="${OCI:-192.168.56.101}" # ONOS Controller Instance
export ONOS_USER="${ONOS_USER:-sdn}" # ONOS user on remote system
export ONOS_GROUP="${ONOS_GROUP:-sdn}" # ONOS group on remote system
export ONOS_PWD="rocks" # ONOS user password on remote system
......
......@@ -77,7 +77,7 @@ function cell {
if [ -n "$1" ]; then
[ ! -f $ONOS_ROOT/tools/test/cells/$1 ] && \
echo "No such cell: $1" >&2 && return 1
unset ONOS_CELL ONOS_NIC ONOS_FEATURES
unset ONOS_CELL ONOS_NIC ONOS_FEATURES ONOS_USER ONOS_GROUP
unset OC0 OC1 OC2 OC3 OC4 OC5 OC6 OC7 OC8 OC9 OCN OCI
export ONOS_CELL=$1
. $ONOS_ROOT/tools/test/cells/$1
......
......@@ -27,7 +27,7 @@ ssh $remote "
[ -d $ONOS_INSTALL_DIR/bin ] && echo \"ONOS is already installed\" && exit 1
# Prepare a landing zone and unroll the bits
sudo mkdir -p $ONOS_INSTALL_DIR && sudo chown ${ONOS_USER}:${ONOS_USER} $ONOS_INSTALL_DIR
sudo mkdir -p $ONOS_INSTALL_DIR && sudo chown ${ONOS_USER}:${ONOS_GROUP} $ONOS_INSTALL_DIR
tar zxmf /tmp/$ONOS_BITS.tar.gz -C $ONOS_INSTALL_DIR --strip-components=1
# Make a link to the log file directory and make a home for auxiliaries
......