libremesh / lime-packages

LibreMesh packages configuring OpenWrt for wireless mesh networking
https://libremesh.org/
GNU Affero General Public License v3.0
277 stars 96 forks source link

Make safe-reboot aware if there is a backup or not #203

Closed nicopace closed 6 years ago

nicopace commented 7 years ago

If there is no backup, safe-reboot shouldn't remove the /etc overlay

ilario commented 7 years ago

Looking at the code here seems that it already checks for the existence of a backup...

    if [ -s $file_etc_lastgood ] ; then
        safe-reboot discard
    fi

So is this check not working?

nicopace commented 6 years ago

Aparently...this was a bug I transcribed from the core team. If you can't reproduce, just tag it and close it :)

nicoechaniz commented 6 years ago

I think it was @altergui who observed this when safe-reboot failed him in node nicojesigioia in QuintanaLibre. @altergui can you explain this further?

altergui commented 6 years ago

On 17/09/17 09:06, nicoechaniz wrote:

I think it was @altergui https://github.com/altergui who observed this when safe-reboot failed him in node nicojesigioia in QuintanaLibre. @altergui https://github.com/altergui can you explain this further?

steps to reproduce:

do "safe-reboot discard" in a node (without having done "safe-reboot" first)

expected: no action, error reported

actual result: node dies

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/libremesh/lime-packages/issues/203#issuecomment-330025664, or mute the thread https://github.com/notifications/unsubscribe-auth/ACr1I2YJPNdxOgv2RIJunDSJTtUfBHj8ks5sjMUQgaJpZM4OsvXP.

ilario commented 6 years ago

Ok, so what's missing is a check before the rm -rf $dir_etc line in safe-reboot.