Skip to content

Commit

Permalink
DNF Automatic reboot: 5-minute delay and wall by default
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-goode authored and inknos committed Jan 26, 2023
1 parent a435559 commit 7a623b9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dnf/automatic/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def __init__(self):
self.add_option('network_online_timeout', libdnf.conf.OptionNumberInt32(60))
self.add_option('reboot', libdnf.conf.OptionEnumString('never',
libdnf.conf.VectorString(['never', 'when-changed', 'when-needed'])))
self.add_option('reboot_command', libdnf.conf.OptionString('shutdown -r'))
self.add_option('reboot_command', libdnf.conf.OptionString('shutdown -r +5 \'Rebooting after applying package updates\''))

def imply(self):
if self.apply_updates:
Expand Down
4 changes: 2 additions & 2 deletions doc/automatic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ Setting the mode of operation of the program.
When the system should reboot following upgrades. ``never`` does not reboot the system. ``when-changed`` triggers a reboot after any upgrade. ``when-needed`` triggers a reboot only when rebooting is necessary to apply changes, such as when systemd or the kernel is upgraded.

``reboot_command``
string, default: ``shutdown -r``
string, default: ``shutdown -r +5 'Rebooting after applying package updates'``

Specify the command to run to trigger a reboot of the system. For example, add a 5-minute delay and a wall message by using ``shutdown -r +5 'Rebooting after upgrading packages'``
Specify the command to run to trigger a reboot of the system. For example, to skip the 5-minute delay and wall message, use ``shutdown -r``



Expand Down
2 changes: 1 addition & 1 deletion etc/dnf/automatic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ apply_updates = no
reboot = never

# The command that is run to trigger a system reboot.
reboot_command = "shutdown -r"
reboot_command = "shutdown -r +5 'Rebooting after applying package updates'"


[emitters]
Expand Down

0 comments on commit 7a623b9

Please sign in to comment.