]> git.99rst.org Git - openwrt-packages.git/commitdiff
nodogsplash: minor cleanup
authorMoritz Warning <redacted>
Sun, 16 Aug 2026 20:27:32 +0000 (22:27 +0200)
committerJosef Schlehofer <redacted>
Tue, 18 Aug 2026 17:14:08 +0000 (19:14 +0200)
A few minor cleanup changes:

- redirect warning message that causes abort to stderr
- replace bashism: &> redirect and shell substitution
- remove unused variables IPT and WD_DIR

Signed-off-by: Moritz Warning <redacted>
net/nodogsplash/Makefile
net/nodogsplash/files/etc/init.d/nodogsplash
net/nodogsplash/files/usr/lib/nodogsplash/restart.sh

index 09a81310f01d6afa6cbf8104e4b8656e523a419c..8102f0a96f4442624a015e3d4b11bcdbfa9d2c90 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nodogsplash
 PKG_VERSION:=5.0.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/nodogsplash/nodogsplash/tar.gz/v$(PKG_VERSION)?
index 8b186486c0649216a24e81812584265589272128..c2682a8e5762a95874e66498967a4f3bdd5492ca 100755 (executable)
@@ -9,9 +9,6 @@ STOP=95
 
 USE_PROCD=1
 
-IPT=/usr/sbin/iptables
-WD_DIR=/usr/bin
-
 # Run in PROCD (-f) and log to SYSLOG (-s)
 OPTIONS="-f -s"
 #
@@ -77,7 +74,7 @@ setup_firewall() {
 
   for rule in authenticated-users preauthenticated-users users-to-router trusted-users trusted-users-to-router; do
     # uci does not allow dashes
-    uci_name=${rule//-/_}
+    uci_name=$(echo "$rule" | tr - _)
     addline "FirewallRuleSet $rule {"
     config_list_foreach "$cfg" "$uci_name" append_firewall
     addline "}"
@@ -158,7 +155,7 @@ generate_uci_config() {
   for option in fasport fasremoteip faspath fas_secure_enabled ; do
     config_get val "$cfg" "$option"
     if [ -n "$val" ]; then
-      echo "Warning: nodogsplash does not support $option"
+      echo "Warning: nodogsplash does not support $option" >&2
       return 1
     fi
   done
index e67f11d127b6c80852590f6e78d61b0135b92061..512b9e2b4f34733cd720b9a20ecd6410e394a0d9 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Check if nodogsplash is running
-if ndsctl status &> /dev/null; then
+if ndsctl status >/dev/null 2>&1; then
   if [ "$(uci -q get nodogsplash.@nodogsplash[0].fwhook_enabled)" = "1" ]; then
     /etc/init.d/nodogsplash restart
   fi
git clone https://git.99rst.org/PROJECT