From 1c93c65a3631ede3fe67c405e7efa0a1381533b8 Mon Sep 17 00:00:00 2001 From: Luka Perkov Date: Tue, 10 May 2016 22:36:15 +0000 Subject: base-files: fix error message during boot preinit spews out this message "cat: can't open '/proc/device-tree/model': No such file or directory" Signed-off-by: John Crispin git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49324 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/files/lib/preinit/10_sysinfo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/base-files/files/lib/preinit/10_sysinfo b/package/base-files/files/lib/preinit/10_sysinfo index 42fd5b6239..be1e6aeca9 100644 --- a/package/base-files/files/lib/preinit/10_sysinfo +++ b/package/base-files/files/lib/preinit/10_sysinfo @@ -3,7 +3,7 @@ do_sysinfo_generic() { mkdir -p /tmp/sysinfo [ -e /tmp/sysinfo/board_name ] || \ echo "$(strings /proc/device-tree/compatible | head -1)" > /tmp/sysinfo/board_name - [ -e /tmp/sysinfo/model ] || \ + [ -n /tmp/sysinfo/model -a -e /proc/device-tree/model ] && \ echo "$(cat /proc/device-tree/model)" > /tmp/sysinfo/model } -- cgit v1.2.3