natmap: fix service not stopped when disabled in luci
authorRichard Yu <yurichard3839@gmail.com>
Mon, 26 Dec 2022 04:28:52 +0000 (12:28 +0800)
committerTianling Shen <cnsztl@immortalwrt.org>
Tue, 27 Dec 2022 08:40:23 +0000 (16:40 +0800)
luci removes `enable` option when disabled,
fix by setting default value to 0.

Signed-off-by: Richard Yu <yurichard3839@gmail.com>
(cherry picked from commit 8111d494749ad1f56218852fb9a587e99c173870)

net/natmap/files/natmap.init

index 3688880b3e1d3b9a4020d67028811b6ad1ec8697..a0ec4b26df53b6167344109984c2955f839bc05d 100644 (file)
@@ -17,7 +17,7 @@ load_interfaces() {
 
 validate_section_natmap() {
        uci_load_validate "${NAME}" natmap "$1" "$2" \
-               'enable:bool:1' \
+               'enable:bool:0' \
                'family:string' \
                'udp_mode:bool:0' \
                'interface:string' \