[OpenWrt-Devel] [PATCH] dropbear: fix forever hanging startup when jffs2 fails to mount

Bastian Bittorf bittorf at bluebottle.com
Tue Feb 16 12:50:57 EST 2016


* John Crispin <blogic at openwrt.org> [16.02.2016 18:39]:
> > fix that by using 'mv -f' which omits the interactive question:
> > 
> > root at 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.

i agree, that this is not elegant but:

without this patch the box keeps unreachable because
dropbear does NOT start - so the only chance to get a
working router back is to solder a serial console.
failsafe is also broken.

i dont think there is a good way for making sure if
moving a file to a target *will* succeed 8-) so at
least we should fail and go further (= start the daemon)
instead of hanging forever.

i tested ALL init-scripts in this stage (jffs2 mounted
readonly) and this is the only one which hangs. so this
is at least a workaround for now...

another approach could be to simply let 'cp/rm/mv' fail if the
command is not invoked interactive, but it sounds somehow special
and we should stick to POSIX...

bye, bastian
_______________________________________________
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