mirror of
https://github.com/openwrt/openwrt.git
synced 2025-03-11 15:04:26 +00:00
base-files: add generic board_name function to functions.sh
This will be used to replace all those nasty board specific scripts that do basically the same thing Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry picked from commit ec991424749b9eed37d01bc8adb9fb22fb0c98a7)
This commit is contained in:
parent
62a8252a0f
commit
f173464f13
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user