Skip to content

Commit 43760e5

Browse files
committed
Fixed LD_LIBRARY_PATH
1 parent 21798d2 commit 43760e5

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

etc/init.d/common

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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+
112117
create_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

etc/init.d/entware-start

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# Entware startup script
33

44
PATH=/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

86
NFQWS_BIN="/opt/usr/bin/nfqws"
97
CONFFILE="/opt/etc/nfqws/nfqws.conf"

0 commit comments

Comments
 (0)