[LEDE-DEV] [PATCH 3/5] base-files: functions.sh: add include_file()

Roman Yeryomin leroi.lists at gmail.com
Fri Apr 28 05:57:10 PDT 2017


Signed-off-by: Roman Yeryomin <roman at advem.lv>
---
 package/base-files/files/lib/functions.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index 2aaafcf..da47c30 100755
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -270,6 +270,10 @@ include() {
 	done
 }
 
+include_file() {
+	[ -f $1 ] && . $1
+}
+
 find_mtd_index() {
 	local PART="$(grep "\"$1\"" /proc/mtd | awk -F: '{print $1}')"
 	local INDEX="${PART##mtd}"
-- 
2.7.4




More information about the Lede-dev mailing list