[OpenWrt-Devel] [PATCH] base-files: remove a 'not found' error message during system boot

Jo-Philipp Wich jow at openwrt.org
Thu Oct 2 11:46:33 EDT 2014


Hi Michel,

On 02.10.2014 15:24, Michel Stam wrote:
> During boot, a not found message is displayed for systems which do
> not have uci 'network.globals.ula_prefix' defined in
> /etc/config/network. The error message itself is not used and can
> be ignored.
> 
> Signed-off-by: Michel Stam <m.stam at fugro.nl>
> ---
>  package/base-files/files/etc/uci-defaults/12_network-generate-ula | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/base-files/files/etc/uci-defaults/12_network-generate-ula b/package/base-files/files/etc/uci-defaults/12_network-generate-ula
> index 56b7eb3..fb4e3eb 100644
> --- a/package/base-files/files/etc/uci-defaults/12_network-generate-ula
> +++ b/package/base-files/files/etc/uci-defaults/12_network-generate-ula
> @@ -1,6 +1,6 @@
>  #!/bin/sh
>  
> -[ "$(uci get network.globals.ula_prefix)" != "auto" ] && exit 0
> +[ "$(uci get network.globals.ula_prefix 2>/dev/null)" != "auto" ] && exit 0

I think it is cleaner to use "uci -q ..." here.

>  r1=$(dd if=/dev/urandom bs=1 count=1 |hexdump -e '1/1 "%02x"')
>  r2=$(dd if=/dev/urandom bs=2 count=1 |hexdump -e '2/1 "%02x"')
> 

~ Jow
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list