diff options
author | John Crispin <blogic@openwrt.org> | 2016-04-11 11:58:57 +0200 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2016-04-11 11:58:57 +0200 |
commit | 5e85ae9e4c85e9ec43f38aa350c5bd0f0e7bea2b (patch) | |
tree | 97963973c202ebe8c1422b0da60644652113a37f /package/base-files/files | |
parent | f8ce7e028d99e3b781961d728ae9e3a4a24e3814 (diff) | |
download | upstream-5e85ae9e4c85e9ec43f38aa350c5bd0f0e7bea2b.tar.gz upstream-5e85ae9e4c85e9ec43f38aa350c5bd0f0e7bea2b.tar.bz2 upstream-5e85ae9e4c85e9ec43f38aa350c5bd0f0e7bea2b.zip |
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 <john@phrozen.org>
Diffstat (limited to 'package/base-files/files')
-rw-r--r-- | package/base-files/files/lib/preinit/10_sysinfo | 2 |
1 files changed, 1 insertions, 1 deletions
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 } |