The file sysdb.c is fairly cluttered. It makes sense to separate the functional pieces from the setup pieces.
This patch makes no functional changes but moves the internal upgrade routines into a separate source file. This is just to make the code easier to navigate and maintain.