Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (40 sloc) 2.44 KB

iSOFTLinux System Update Daemon WorkFlow

iSOFTLinux System Update daemon workflow

DISADVANTAGE of installing Update packages during libraries and services that are currently running:

  • command line reboot or poweroff will break the update workflow;
  • hardware turn off computer will break too;
  • conflicts with running services.

Thanks for systemd Offline System Updates, isoft-update-client daemon does not need to use systemd-logind Inhibit, but use powerful system-update.target:

iSOFTLinux Offline System Update

ADVANTAGE of systemd offline system update:

  • systemd booted into special system-update.target with a few of services started;
  • it will goto special target time and time again (without removing the symlink) if break the workflow;
  • remove symlink after update, then reboot to normal default.target;
  • textmode UI with update percentage.

Testcase for ArchLinux

Change update script to your own

$ mkdir /usr/lib/systemd/system/system-update.target.wants
$ touch /usr/lib/systemd/system/isoft-offline-update.service
$ ln -s /usr/lib/systemd/system/isoft-offline-update.service /usr/lib/systemd/system/system-update.target.wants/isoft-offline-update.service

isoft-offline-update.service

[Unit]                                                                             
Description=Updates the operating system whilst offline                            
Requires=dbus.socket                                                               
OnFailure=reboot.target                                                            

[Service]                                                                          
ExecStart=/usr/lib/isoft-update-client/isoft-offline-update

simple isoft-offline-update script:

#!/bin/bash
sleep 13
plymouth display-message --text="iSOFTLinux Offline System Updating..."
sleep 13
plymouth display-message --text="Updated successfully, rebooting..."
rm /system-update
reboot

PackageKit provides nicely formatted output offline update please fork it for your own system update flow ;-)