Notify users of installed update?

When I installed Kinoite on a friends computer, they asked me how often they should restart it to install updates. I told them that about every week or so would do but I'm wondering if there's a way I could, in my own image, have a system that shows a single notification when a new update is installed and ready to reboot.
8 Replies
Luke Skywunker
You can create a systemd unit file that overrides the one in your image that's updating via rpm-ostree or bootc. You can use the command notify-send to create your own custom notification message rpm-ostree - /usr/lib/systemd/system/rpm-ostreed-automatic.service bootc - /usr/lib/systemd/system/bootc-fetch-apply-updates.service
Luke Skywunker
You can copy the file into your repo's files/ directory and then use the files module to copy it to the correct place. Afterwards, you can use the systemd module to enable it
BlueBuild
files
Copy files to your image at build time
BlueBuild
systemd
The systemd module streamlines the management of systemd units during image building.
TKK13909
TKK13909OP2w ago
so files/systemd/system/rpm-ostreed-automatic.service? I'm assuming it would be proper to just add an && to the end of the exec
Luke Skywunker
I tend to put it in it's own directory in files/ like files/rpm-ostree-service/rpm-ostreed-automatic.service and then have the files module do
type: files
source: rpm-ostree-service
destination: /usr/lib/systemd/system/
type: files
source: rpm-ostree-service
destination: /usr/lib/systemd/system/
You might want to throw everything in a bash call (i.e. /bin/bash -c 'command in here') Unless systemd does support that, but I'm not entirely sure
TKK13909
TKK13909OP2w ago
Is it better to do one over the other or is it personal preference?
Luke Skywunker
Personal pref Just keeps my tree clean But since you brought up this question, I think I'm going to create this for my images lol
TKK13909
TKK13909OP2w ago
^_^ currently building... We'll see if it works
xyny
xyny2d ago
this could be a bling ;)

Did you find this page helpful?