From 58d97b5e271bc0d7507eab5b9bd2902181864e02 Mon Sep 17 00:00:00 2001 From: "Daniel F. Dickinson" Date: Fri, 3 Aug 2018 12:36:51 -0400 Subject: modules: Split luci-mod-full Move some common elements to luci-base, and otherwise make three packages out of status, system, and network. They were mostly separated already, but there were some shared elements between status and network that are now in luci-base. Signed-off-by: Daniel F. Dickinson --- .../root/etc/uci-defaults/50_luci-mod-admin-full | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 modules/luci-mod-network/root/etc/uci-defaults/50_luci-mod-admin-full (limited to 'modules/luci-mod-network/root/etc/uci-defaults/50_luci-mod-admin-full') diff --git a/modules/luci-mod-network/root/etc/uci-defaults/50_luci-mod-admin-full b/modules/luci-mod-network/root/etc/uci-defaults/50_luci-mod-admin-full new file mode 100755 index 0000000000..372eb15122 --- /dev/null +++ b/modules/luci-mod-network/root/etc/uci-defaults/50_luci-mod-admin-full @@ -0,0 +1,22 @@ +#!/bin/sh + +if [ "$(uci -q get luci.diag)" != "internal" ]; then + host="" + + if [ -s /etc/os-release ]; then + . /etc/os-release + host="${HOME_URL:-${BUG_URL:-$LEDE_DEVICE_MANUFACTURER_URL}}" + host="${host#*://}" + host="${host%%/*}" + fi + + uci -q batch <<-EOF >/dev/null + set luci.diag=internal + set luci.diag.dns='${host:-openwrt.org}' + set luci.diag.ping='${host:-openwrt.org}' + set luci.diag.route='${host:-openwrt.org}' + commit luci + EOF +fi + +exit 0 -- cgit v1.2.3