nft-qos: fix include on image build service enable
authorImran Khan <gururug@gmail.com>
Sun, 12 Dec 2021 14:17:12 +0000 (01:17 +1100)
committerRosen Penev <rosenp@gmail.com>
Fri, 17 Dec 2021 22:07:47 +0000 (14:07 -0800)
Fixes: f88485f572ec1ff9082106ccf0ccb20fc7af5801 ("nft-qos: silence buildsystem errors")
Prefixing IPKG_INSTROOT to sourced includes is ineffective for this
package.

Source includes only when empty to avoid image make errors.

Signed-off-by: Imran Khan <gururug@gmail.com>
net/nft-qos/files/nft-qos.init

index 6c5842a49c8aa4ba58204f0484b7c7cd7cbf89fe..4a85e20c0ecf2d942bc6776346873d6ad268eda9 100755 (executable)
@@ -3,12 +3,14 @@
 # Copyright (C) 2018 rosysong@rosinson.com
 #
 
-. "${IPKG_INSTROOT}/lib/nft-qos/core.sh"
-. "${IPKG_INSTROOT}/lib/nft-qos/monitor.sh"
-. "${IPKG_INSTROOT}/lib/nft-qos/dynamic.sh"
-. "${IPKG_INSTROOT}/lib/nft-qos/static.sh"
-. "${IPKG_INSTROOT}/lib/nft-qos/mac.sh"
-. "${IPKG_INSTROOT}/lib/nft-qos/priority.sh"
+if [ -z "${IPKG_INSTROOT}" ]; then
+       . /lib/nft-qos/core.sh
+       . /lib/nft-qos/monitor.sh
+       . /lib/nft-qos/dynamic.sh
+       . /lib/nft-qos/static.sh
+       . /lib/nft-qos/mac.sh
+       . /lib/nft-qos/priority.sh
+fi
 
 START=99
 USE_PROCD=1