mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-20 01:20:35 +08:00
Compare commits
3 Commits
5453fa1fc7
...
4a7463b205
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a7463b205 | ||
|
|
073deb5828 | ||
|
|
8a4d122063 |
@@ -6,9 +6,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-controller
|
||||
PKG_VERSION:=6.4.4.13
|
||||
PKG_VERSION:=6.4.4.24
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=bd0fb2b63830e19038d9495517c03fdc3900cdfa
|
||||
PKG_SOURCE_VERSION:=e149d0c26dc7a382638e7778f8cf1c01f382b76e
|
||||
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@genexis.eu>
|
||||
|
||||
LOCAL_DEV=0
|
||||
|
||||
@@ -54,6 +54,67 @@ reload_mapcontroller() {
|
||||
fi
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# mark_ap_instances_applied
|
||||
#
|
||||
# Description:
|
||||
# Finalizes newly created WiFi AccessPoint instances in the dmmap_wireless
|
||||
# configuration.
|
||||
#
|
||||
# An AccessPoint instance is considered a *new instance* when the option
|
||||
# __is_new__ exists and its value is "1".
|
||||
#
|
||||
# New instance handling logic:
|
||||
#
|
||||
# • The AccessPoint's controller-side section name is obtained from
|
||||
# the section_name option.
|
||||
#
|
||||
# • For new instances where section_name comes from "mapcontroller.":
|
||||
# - Remove __is_new__
|
||||
# - No additional actions required
|
||||
#
|
||||
# • For new instances where section_name comes from "wireless.":
|
||||
# - Set mapcontroller=0 (indicates mapcontroller reload is not required)
|
||||
# - Remove __is_new__
|
||||
#
|
||||
# • For all other prefixes:
|
||||
# - Remove __is_new__ only
|
||||
#
|
||||
# After all new instances are processed, the dmmap_wireless configuration is committed.
|
||||
###############################################################################
|
||||
mark_ap_instances_applied() {
|
||||
for sec in $(uci -q -c /etc/bbfdm/dmmap show dmmap_wireless | grep "=wifi-iface" | cut -d. -f2 | cut -d= -f1); do
|
||||
is_new=$(uci -q -c /etc/bbfdm/dmmap get dmmap_wireless.${sec}.__is_new__)
|
||||
|
||||
if [ "${is_new}" = "1" ]; then
|
||||
# Get the controller-side section name
|
||||
config_sec_name=$(uci -q -c /etc/bbfdm/dmmap get dmmap_wireless.${sec}.section_name)
|
||||
|
||||
# Skip if section_name is empty
|
||||
if [ -z "${config_sec_name}" ]; then
|
||||
uci -q -c /etc/bbfdm/dmmap delete dmmap_wireless.${sec}.__is_new__
|
||||
continue
|
||||
fi
|
||||
|
||||
# Check type of the corresponding wireless section
|
||||
config_sec_type=$(uci -q get wireless."${config_sec_name}")
|
||||
if [ -n "${config_sec_type}" ] && [ "${config_sec_type}" = "wifi-iface" ]; then
|
||||
# New wireless AP instance — skip mapcontroller reload
|
||||
mapcontroller=0
|
||||
fi
|
||||
|
||||
# Remove the new-instance flag
|
||||
uci -q -c /etc/bbfdm/dmmap delete dmmap_wireless.${sec}.__is_new__
|
||||
fi
|
||||
done
|
||||
|
||||
# Commit all changes to dmmap_wireless
|
||||
uci -q -c /etc/bbfdm/dmmap commit dmmap_wireless
|
||||
}
|
||||
|
||||
# Finalize newly created AP AccessPoint instances
|
||||
mark_ap_instances_applied
|
||||
|
||||
# Apply logic based on flags
|
||||
if [ "$mapcontroller" -eq 1 ]; then
|
||||
reload_mapcontroller
|
||||
|
||||
Reference in New Issue
Block a user