Updated
8 days
ago.
4 hacker ♥️.
1 follower.
Description
systemd v257 comes with a nice new technology: varlink With soft-reboot, the rebootmgr dbus interface needs a clean rewrite anyways, so change that to sd-varlink. Problem: sd-varlink in systemd v257 is not documented, Lennarts comment: who is interested to use that should look at the code.
Goals
Have at least a minimal server/client with polkit authentication running.
Sources
Results
- At first fix upstream to make a simple non-systemd App linking against sd-varlink, PR: https://github.com/systemd/systemd/pull/35240
- First communication to get rebootmgr status:
# echo "{}" | varlinkctl call /tmp/rebootmgr.socket org.openSUSE.rebootmgr.Status { "RebootStatus" : 1, "RebootMethod" : "soft-reboot" }
- Server communication is fully implemented (except one sd_json problem...), client can at least trigger a reboot:
Client:# ./rebootmgrd -d Starting rebootmgrd (rebootmgr) 3.0... Varlink method "Reboot" called... Reboot request: 1, force: 0
Ok, who cares that the client seg.faults at the end, the main thing is the machine will reboot# ./rebootmgrctl reboot method=1, forced=0 Segmentation fault (core dumped)
- rebootmgrctl [status|status --full|reboot|cancel] is implemented and works:
Starting rebootmgrd (rebootmgr) 3.0... Varlink method "Reboot" called... Reboot request: reboot, force: false Reboot in 18310 seconds at Sat 2024-11-23 03:59:43 CET Varlink method "Cancel" called... Varlink method "Reboot" called... Reboot request: reboot, force: false Reboot in 18595 seconds at Sat 2024-11-23 04:04:46 CET time_handler called
- polkit: the sd-varlink polkit authentication support is systemd internal, so needs another 1-2 hackweeks to write support from scratch.
Looking for hackers with the skills:
Nothing? Add some keywords!
This project is part of:
Hack Week 24
Comments
Be the first to comment!
Similar Projects
This project is one of its kind!