liske/needrestart

Remove empty lines from output

Opened this issue · 0 comments

phd commented

Add option/default to remove empty lines from output.

Current output looks like this:

Scanning processes...                                                                                                                                                                                                                       
Scanning candidates...                                                                                                                                                                                                                      
Scanning processor microcode...                                                                                                                                                                                                             
Scanning linux images...                                                                                                                                                                                                                    

Pending kernel upgrade!
Running kernel version:
  6.11.11-x64v3-xanmod1
Diagnostics:
  The currently running kernel has an ABI compatible upgrade pending.

Restarting the system to load the new kernel will not be handled automatically, so you should consider rebooting.

The processor microcode seems to be up-to-date.

Restarting services...

Service restarts being deferred:
 /etc/needrestart/restart.d/dbus.service
 systemctl restart networkd-dispatcher.service
 systemctl restart sddm.service

No containers need to be restarted.

User sessions running outdated binaries:
 phd @ session #1: kdeinit5[8263], plasma_session[8236], sddm-helper[7920], startplasma-x11[7939]
 phd @ user manager service: at-spi-bus-laun[8657], hp-systray[8675,8795], plasmashell[8623], systemd[7923]

No VM guests are running outdated hypervisor (qemu) binaries on this host.

After:

Scanning processes...                                                                                                                                                                                                                       
Scanning candidates...                                                                                                                                                                                                                      
Scanning processor microcode...                                                                                                                                                                                                             
Scanning linux images...                                                                                                                                                                                                                    
Pending kernel upgrade!
Running kernel version:
  6.11.11-x64v3-xanmod1
Diagnostics:
  The currently running kernel has an ABI compatible upgrade pending.
Restarting the system to load the new kernel will not be handled automatically, so you should consider rebooting.
The processor microcode seems to be up-to-date.
Restarting services...
Service restarts being deferred:
 /etc/needrestart/restart.d/dbus.service
 systemctl restart networkd-dispatcher.service
 systemctl restart sddm.service
No containers need to be restarted.
User sessions running outdated binaries:
 phd @ session #1: kdeinit5[8263], plasma_session[8236], sddm-helper[7920], startplasma-x11[7939]
 phd @ user manager service: at-spi-bus-laun[8657], hp-systray[8675,8795], plasmashell[8623], systemd[7923]
No VM guests are running outdated hypervisor (qemu) binaries on this host.

Also consider adding indent for sections:

Scanning processes...                                                                                                                                                                                                                       
Scanning candidates...                                                                                                                                                                                                                      
Scanning processor microcode...                                                                                                                                                                                                             
Scanning linux images...                                                                                                                                                                                                                    
Pending kernel upgrade!
    Running kernel version:
        6.11.11-x64v3-xanmod1
    Diagnostics:
        The currently running kernel has an ABI compatible upgrade pending.
    Restarting the system to load the new kernel will not be handled automatically, so you should consider rebooting.
The processor microcode seems to be up-to-date.
Restarting services...
Service restarts being deferred:
    /etc/needrestart/restart.d/dbus.service
    systemctl restart networkd-dispatcher.service
    systemctl restart sddm.service
No containers need to be restarted.
User sessions running outdated binaries:
    phd @ session #1: kdeinit5[8263], plasma_session[8236], sddm-helper[7920], startplasma-x11[7939]
    phd @ user manager service: at-spi-bus-laun[8657], hp-systray[8675,8795], plasmashell[8623], systemd[7923]
No VM guests are running outdated hypervisor (qemu) binaries on this host.