On 16/02/2016 12:13, Bastian Bittorf wrote:
> if something goes wrong while mounting jffs2 (e.g. full flash
> and the mount is readonly) the dropbear-init script will hang
> forever (and so the startup-procedure) asking:
> 
> root@OpenWrt:~ /etc/init.d/dropbear boot
> mv: overwrite '/etc/dropbear/dropbear_rsa_host_key'? <cursor blinking>
> 
> fix that by using 'mv -f' which omits the interactive question:
> 
> root@OpenWrt:~ mv -f /tmp/dropbear/dropbear_* /etc/dropbear/
> mv: can't remove '/etc/dropbear/dropbear_rsa_host_key': Read-only file system
> 

this is really only fighting the symptoms. we dont really want to have
all scripts be aware of and handle full flash. i am not sure this is the
right approach to use.

        John

> so the startup can continue.
> 
> Signed-off-by: Bastian Bittorf <[email protected]>
> ---
>  package/network/services/dropbear/files/dropbear.init | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/network/services/dropbear/files/dropbear.init 
> b/package/network/services/dropbear/files/dropbear.init
> index 03745c9..56565bd 100755
> --- a/package/network/services/dropbear/files/dropbear.init
> +++ b/package/network/services/dropbear/files/dropbear.init
> @@ -100,7 +100,7 @@ keygen()
>  
>       lock /tmp/.switch2jffs
>       mkdir -p /etc/dropbear
> -     mv /tmp/dropbear/dropbear_* /etc/dropbear/
> +     mv -f /tmp/dropbear/dropbear_* /etc/dropbear/
>       lock -u /tmp/.switch2jffs
>       chown root /etc/dropbear
>       chmod 0700 /etc/dropbear
> 
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to