code de-duplication of recent bootloader autoupgrde changes (bnc#885634)
Merge pull request #70 from jsrain/master

code de-duplication of recent bootloader autoupgrde changes (bnc#885634)