HEX
Server: Apache/2.2.34 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141
System: Linux Kou-Etsu-Dou 4.4.59+ #25556 SMP PREEMPT Thu Mar 4 18:03:46 CST 2021 x86_64
User: hosam (1026)
PHP: 7.2.29
Disabled: NONE
Upload Files
File: //usr/syno/etc/wifi/wireless_tool.sh
#!/bin/sh
# Copyright (c) 2000-2014 Synology Inc. All rights reserved.
#
# This goes in /usr/syno/etc/rc.d and gets run at boot-time.

SYNOINFO_DEF="/etc.defaults/synoinfo.conf"
WIFI_TOPOLOGY_PREFIX="/usr/syno/etc/wifi/wifi_topology_"
WIFI_TOPOLOGY_CONF="${WIFI_TOPOLOGY_PREFIX}bridge ${WIFI_TOPOLOGY_PREFIX}router ${WIFI_TOPOLOGY_PREFIX}client"
CONF_TYPE="ds"

prepare_link() {
	local unique=`/bin/get_key_value $SYNOINFO_DEF unique`
	local val=`echo ${unique} | grep air | grep -v 213`

	if [ "x" != "x${val}" ]; then
		CONF_TYPE="air"
	fi
	for conf in ${WIFI_TOPOLOGY_CONF}; do
		`ln -fs ${conf}_${CONF_TYPE} ${conf}`
	done
}

case "$1" in

link_conf)
	prepare_link
;;

*)
echo "usage: $0 { link_conf }" >&2
exit 1
;;

esac