If we're running as pid1, avoid printing anything in the normal success paths as we don't want to affect the physical console by default; the device may be using a splash screen, etc. Also cleanup the code a bit to use a single variable `running_as_pid1`, declare-and-initialize, use the `bool` type, etc. Closes: #1531 Approved by: jlebon