File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,8 +109,13 @@ validate_config() {
109109 fi
110110}
111111
112+ ndmc_cli() {
113+ local SYSTEM_LD_LIBRARY_PATH="/lib:/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
114+ LD_LIBRARY_PATH="$SYSTEM_LD_LIBRARY_PATH" /bin/ndmc -c "$@"
115+ }
116+
112117create_running_config() {
113- local MARK=$(/bin/ndmc -c show ip policy 2>&1 | grep -i "description = $POLICY_NAME:" -A 1 | grep 'mark:' | grep -o '[^ ]*$' | head -n 1)
118+ local MARK=$(ndmc_cli show ip policy 2>&1 | grep -i "description = $POLICY_NAME:" -A 1 | grep 'mark:' | grep -o '[^ ]*$' | head -n 1)
114119 if [ -n "$MARK" ]; then
115120 POLICY_MARK="0x$MARK/0x0fffffff"
116121 if [ -n "$POLICY_EXCLUDE" ] && [ "$POLICY_EXCLUDE" -ne "0" ]; then
Original file line number Diff line number Diff line change 22# Entware startup script
33
44PATH=/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin:/usr/sbin:/usr/bin:/sbin:/bin
5- # Required for ndmc call from web interface and startup
6- LD_LIBRARY_PATH=/lib:/usr/lib:/opt/lib:/opt/usr/lib
75
86NFQWS_BIN=" /opt/usr/bin/nfqws"
97CONFFILE=" /opt/etc/nfqws/nfqws.conf"
You can’t perform that action at this time.
0 commit comments