File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 44# that seems to have appeared in C10S
55# TODO diagnose and fill in here
66export def reboot [] {
7- # Sometimes systemd daemons are still running old binaries and response "Access denied" when send reboot request
8- # Force a full sync before reboot
9- sync
10- # Allow more delay for bootc to settle
11- sleep 30sec
7+ # Enable polkit permissions for test user (root or non-root)
8+ # to allow logind reboot non-interactively
9+ sudo sh - c ' cat >/etc/polkit-1/rules.d/49-allow-reboot.rules <<EOF
10+ polkit.addRule(function(action, subject) {
11+ if (action.id == "org.freedesktop.login1.reboot" ||
12+ action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||
13+ action.id == "org.freedesktop.login1.power-off") {
14+
15+ if (subject.user == "root" || subject.isInGroup("wheel")) {
16+ return polkit.Result.YES;
17+ }
18+ }
19+ });
20+ EOF'
1221
1322 tmt-reboot
1423}
You can’t perform that action at this time.
0 commit comments