From d6911608fc3cae1667cfe6c366a58729b92376dc Mon Sep 17 00:00:00 2001 From: Nick Peng Date: Sat, 8 Dec 2018 17:01:43 +0800 Subject: [PATCH] bug fix --- package/openwrt/control/postinst | 9 +++------ package/openwrt/files/etc/init.d/smartdns | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/package/openwrt/control/postinst b/package/openwrt/control/postinst index 32198f7..1a97636 100644 --- a/package/openwrt/control/postinst +++ b/package/openwrt/control/postinst @@ -6,10 +6,7 @@ chmod +x /etc/init.d/smartdns [ "${IPKG_NO_SCRIPT}" = "1" ] && exit 0 . ${IPKG_INSTROOT}/lib/functions.sh default_postinst $0 $@ - - - - - - +ret=$? +/etc/init.d/smartdns enable +exit $ret diff --git a/package/openwrt/files/etc/init.d/smartdns b/package/openwrt/files/etc/init.d/smartdns index 7474d8e..5758a2d 100644 --- a/package/openwrt/files/etc/init.d/smartdns +++ b/package/openwrt/files/etc/init.d/smartdns @@ -222,6 +222,7 @@ start_service() { uci delete smartdns.@smartdns[0].old_port 2>/dev/null uci add_list smartdns.@smartdns[0].old_redirect="$redirect" 2>/dev/null uci add_list smartdns.@smartdns[0].old_port="$SMARTDNS_PORT" 2>/dev/null + uci commit smartdns config_foreach load_server "server"