diff options
Diffstat (limited to 'package/base-files/files/lib/functions.sh')
-rw-r--r-- | package/base-files/files/lib/functions.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index 2bad45324f..d8604415cc 100644 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -384,4 +384,14 @@ board_name() { [ -e /tmp/sysinfo/board_name ] && cat /tmp/sysinfo/board_name || echo "generic" } +cmdline_get_var() { + local var=$1 + local cmdlinevar tmp + + for cmdlinevar in $(cat /proc/cmdline); do + tmp=${cmdlinevar##${var}} + [ "=" = "${tmp:0:1}" ] && echo ${tmp:1} + done +} + [ -z "$IPKG_INSTROOT" ] && [ -f /lib/config/uci.sh ] && . /lib/config/uci.sh |