Merge pull request #301 from ublue-os/rootful-ublue-update

feat: Implement changes for rootful ublue-update
This commit is contained in:
RJ Trujillo 2023-09-17 12:24:07 -06:00 committed by GitHub
commit ab1ca9fa77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 1 deletions

View File

@ -61,7 +61,7 @@ if command -v ublue-update > /dev/null; then
}
upgrade() {
# Pull exit code from ublue-update
ublue-update --force > /dev/null 2>&1
systemctl start ublue-update-force > /dev/null 2>&1
echo $? > /tmp/upgrade-check
}
upgrade | fake_progress

View File

@ -0,0 +1,8 @@
polkit.addRule(function(action, subject) {
if (subject.isInGroup("wheel") &&
action.id == "org.freedesktop.systemd1.manage-units" &&
action.lookup("unit") == "ublue-update-force.service")
{
return polkit.Result.YES;
}
})

View File

@ -0,0 +1,7 @@
[Unit]
Description=Force Universal Blue Update Oneshot Service
[Service]
Type=oneshot
ExecStart=/usr/bin/ublue-update --force
RemainAfterExit=no