diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index b68db6b6bd7e419627b8330f5bf31a780f817561..2b6415a20081b66712ad088b34ee816b5730a36a 100755
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -353,4 +353,8 @@ user_exists() {
 	grep -qs "^${1}:" ${IPKG_INSTROOT}/etc/passwd
 }
 
+board_name() {
+	[ -e /tmp/sysinfo/board_name ] && cat /tmp/sysinfo/board_name || echo "generic"
+}
+
 [ -z "$IPKG_INSTROOT" -a -f /lib/config/uci.sh ] && . /lib/config/uci.sh