Skip to content

schedule automatic updates, restarts + announcements #651

Description

@edmundlaugasson

Is your feature request related to a problem? Please describe.
Problem is, that in case computers are working 24/7 and automatic updates are allowed, never don't know, when it really happens. Also if needed logout, restart, it is not announced to users. This all should be configurable. If computer restarted or shut down in the middle of updates, this can render Linux Mint into broken state.

Describe the solution you'd like
All the following options should be configurable and not mandatory.
Under Mintupdate there could be an option to allow automatic updates at fixed time. Usually in organizations there is fixed time agreed for updates.
Also when update is running, don't allow do restart or shut down.
Allow to enable announcement (also custom message), when automatic updates are started and when finished. Announcing inside Mintupdate is not enough as in case of automatic updates, no Mintupdate window is open. Sounds like most efficient way is to show announcement balloon in system tray. Or consider other announcement ways.
Allow to enable showing also automatic updates progress in systray, visible as small icon, e.g. circle, that fulfills itself according automatic update progress.
When new kernel installed, announce about the need to restart computer and offer a button to restart right now.
Allow schedule automatic restart after automatic kernel or any other critical component installation. This should happen only, when new kernel or any other critical system component has been installed. People usually don't get any information and don't know to restart computer. Some people just wont restart computer regardless of appropriate messages. Again - it is agreed beforehand in organizations, that fixed time (w.g. after work, at night, etc) will be computers updated and if new kernel installed, also restarted. This will ensure, that automatically installed kernels and other critical components will be taken into use. Also automatic old kernel removal can work then.
There could be also automatic dynamical mode like in MS Windows, based on system usability activity. This applies, when user has very irregular times to work with computer, e.g. travelling often in different timezones, has just irregular working hours, etc.
Also it would be good to postpone automatic updates for certain time, e.g. offering previously configured time period, e.g. 5 minutes. Also user can enter the amount of time to postpone. Or offer also cancel for today or until certain date automatic updates. Although not postpone longer than certain number of days configured by administrator. This will ensure, that updates are still installed and Linux Mint will not get vulnerable.
Allow also bulk deployment e.g. via scripting, central software management for many computers of these settings.
Basically this seems to mean configure CRON system-wide file /etc/crontab via Mintupdate GUI and possibly run some additional scripts or have some more functionality built-in into Mintupdate. Also automating and deploying such configuration for many computers via scripting, central software management.

Describe alternatives you've considered
Writing commands, script into CRON for updates, automatic restarts, announcements. Although determining new kernel installation after update and restart only then, has no good idea yet.
Announcements can be done using libnotify-bin package via CRON:
/etc/update-messages.sh

#!/bin/bash
export DISPLAY=:0; export XAUTHORITY=~/.Xauthority; /usr/bin/notify-send -t 20000 "Important message" "After 5 minutes, the software will update automatically and reboot the computer. Please save all your work and then close the programs you are using and leave your computer running."
/bin/sleep 1m
export DISPLAY=:0; export XAUTHORITY=~/.Xauthority; /usr/bin/notify-send  -t 4000 "4 minutes" "... then the software will be updated automatically and the computer will be rebooted"
/bin/sleep 1m
export DISPLAY=:0; export XAUTHORITY=~/.Xauthority; /usr/bin/notify-send  -t 4000 "3 minutes" "... then the software will be updated automatically and the computer will be rebooted"
/bin/sleep 1m
export DISPLAY=:0; export XAUTHORITY=~/.Xauthority; /usr/bin/notify-send  -t 4000 "2 minutes" "... then the software will be updated automatically and the computer will be rebooted"
/bin/sleep 1m
export DISPLAY=:0; export XAUTHORITY=~/.Xauthority; /usr/bin/notify-send -t 4000 "1 minutes" "... then the software will be updated automatically and the computer will be rebooted"
/bin/sleep 5
export DISPLAY=:0; export XAUTHORITY=~/.Xauthority; /usr/bin/notify-send -t 4000 "55 seconds" "... then the software will be updated automatically and the computer will be rebooted"
/bin/sleep 5
export DISPLAY=:0; export XAUTHORITY=~/.Xauthority; /usr/bin/notify-send -t 4000 "50 seconds" "... then the software will be updated automatically and the computer will be rebooted"
/bin/sleep 5
export DISPLAY=:0; export XAUTHORITY=~/.Xauthority; /usr/bin/notify-send -t 4000 "45 seconds" "... then the software will be updated automatically and the computer will be rebooted"
/bin/sleep 5
export DISPLAY=:0; export XAUTHORITY=~/.Xauthority; /usr/bin/notify-send -t 4000 "40 seconds" "... then the software will be updated automatically and the computer will be rebooted"
/bin/sleep 5
export DISPLAY=:0; export XAUTHORITY=~/.Xauthority; /usr/bin/notify-send -t 4000 "35 seconds" "... then the software will be updated automatically and the computer will be rebooted"
/bin/sleep 5
export DISPLAY=:0; export XAUTHORITY=~/.Xauthority; /usr/bin/notify-send -t 4000 "30 seconds" "... then the software will be updated automatically and the computer will be rebooted"
/bin/sleep 5
export DISPLAY=:0; export XAUTHORITY=~/.Xauthority; /usr/bin/notify-send -t 4000 "25 seconds" "... then the software will be updated automatically and the computer will be rebooted"
/bin/sleep 5
export DISPLAY=:0; export XAUTHORITY=~/.Xauthority; /usr/bin/notify-send -t 4000 "20 seconds" "... then the software will be updated automatically and the computer will be rebooted"
/bin/sleep 5
export DISPLAY=:0; export XAUTHORITY=~/.Xauthority; /usr/bin/notify-send -t 4000 "15 seconds" "... then the software will be updated automatically and the computer will be rebooted"
/bin/sleep 5
export DISPLAY=:0; export XAUTHORITY=~/.Xauthority; /usr/bin/notify-send -t 4000 "10 seconds" "... then the software will be updated automatically and the computer will be rebooted"
/bin/sleep 5
export DISPLAY=:0; export XAUTHORITY=~/.Xauthority; /usr/bin/notify-send -t 4000 "5 seconds" "... then the software will be updated automatically and the computer will be rebooted"
/bin/sleep 5
export DISPLAY=:0; export XAUTHORITY=~/.Xauthority; /usr/bin/notify-send -t 10000000 "The software is being updated" "Please do nothing more with your computer. After that, the computer reboots automatically. Until the upgrade is complete - please do not use it. If there is a problem, please notify the administrator."

Here the problem is, that this script is user-specific. Currently no good solution for automatic system-wide announcements regardless of existing or future users. Especially for such case, when user is not logged it - even then it would be good to announce about coming, ongoing update process and reboot.
Also determining critical components after kernel has no good solution yet. It would be also good to know, which components after kernel are such, that require restart or at least relogin. Also determining whether after recent update was new kernel installed or not. This seems to be possible to solve using scripting, perhaps a more deep programming.

Additional context
Automatic reboots might sound not a good idea. Also allowing automatic updates with automatic old kernel removal in situation, where user will not do restarts due to lack of information about new kernels installed, is also not good idea. Allowing automatic updates with automatic new kernel installation inevitably requires automatic reboots in order to take newly installed kernels into effect. Certainly such activity requires prior agreement and this is not a problem. It is very common, that in organizations is fixed time for updates and if needed, also reboots.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions