Author: luka
Date: 2016-05-11 00:36:15 +0200 (Wed, 11 May 2016)
New Revision: 49324

Modified:
   trunk/package/base-files/files/lib/preinit/10_sysinfo
Log:
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 <[email protected]>

Modified: trunk/package/base-files/files/lib/preinit/10_sysinfo
===================================================================
--- trunk/package/base-files/files/lib/preinit/10_sysinfo       2016-05-10 
22:36:13 UTC (rev 49323)
+++ trunk/package/base-files/files/lib/preinit/10_sysinfo       2016-05-10 
22:36:15 UTC (rev 49324)
@@ -3,7 +3,7 @@
        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
 }
 
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to