1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
openmptcprouter-feeds/qaa/whc/qca-whc-init/files/wifimeshconfig
2022-09-10 05:47:47 +08:00

66 lines
1.4 KiB
Bash

#!/bin/sh
# Copyright (c) 2020 Qualcomm Technologies, Inc.
# All Rights Reserved.
# Confidential and Proprietary - Qualcomm Technologies, Inc.
if [ "$#" -lt 1 ]; then
echo "Usage: $0 <son|map>"
echo ""
echo " son: Initialize SON Feature"
echo " map: Initialize MAP Feature"
exit 1
fi
alg_set=$1
BIN_DIR=/usr/sbin
# Remove existing softlink
if [[ -L "$BIN_DIR/hyd" ]]; then
rm -f $BIN_DIR/hyd
fi
if [[ -L "$BIN_DIR/wsplcd" ]]; then
rm -f $BIN_DIR/wsplcd
fi
if [ "$alg_set" = "son" ]; then
# Check binary availablity
if [ ! -f $BIN_DIR/hyd-son ]; then
echo "Error: SON HYD executable is missing !!!"
exit 1
fi
if [ ! -f $BIN_DIR/wsplcd-son ]; then
echo "Error: SON WSPLCD executable is missing !!!"
exit 1
fi
# Create softlink to SON binary
ln -s $BIN_DIR/hyd-son $BIN_DIR/hyd
ln -s $BIN_DIR/wsplcd-son $BIN_DIR/wsplcd
echo "SON Initialization completed"
echo ""
elif [ "$alg_set" = "map" ]; then
# Check binary availablity
if [ ! -f $BIN_DIR/hyd-map ]; then
echo "Error: MAP HYD executable is missing !!!"
fi
if [ ! -f $BIN_DIR/wsplcd-map ]; then
echo "Error: MAP WSPLCD executable is missing !!!"
exit 1
fi
# Create softlink to MAP binary
ln -s $BIN_DIR/hyd-map $BIN_DIR/hyd
ln -s $BIN_DIR/wsplcd-map $BIN_DIR/wsplcd
echo "MAP Initialization completed"
echo ""
fi
# Debug print
ls -lrt $BIN_DIR/hyd* $BIN_DIR/wsplcd*