mcst-linux-kernel/patches-2024.06.26/cockpit-188/0002-use-sysvinit-shutdown....

25 lines
1.3 KiB
Diff

diff -Naur a/pkg/packagekit/updates.jsx b/pkg/packagekit/updates.jsx
--- a/pkg/packagekit/updates.jsx 2021-07-13 16:44:13.651665596 +0000
+++ b/pkg/packagekit/updates.jsx 2021-07-13 16:45:04.928651405 +0000
@@ -901,7 +901,7 @@
this.setState({ state: "restart" });
// give the user a chance to actually read the message
window.setTimeout(() => {
- cockpit.spawn(["shutdown", "--reboot", "now"], { superuser: true, err: "message" })
+ cockpit.spawn(["shutdown", "-r", "now"], { superuser: true, err: "message" })
.fail(ex => {
this.state.errorMessages.push(ex);
this.setState({ state: "updateError" });
diff -Naur a/pkg/systemd/shutdown.js b/pkg/systemd/shutdown.js
--- a/pkg/systemd/shutdown.js 2021-07-13 16:44:34.712070484 +0000
+++ b/pkg/systemd/shutdown.js 2021-07-13 16:45:36.893265939 +0000
@@ -173,7 +173,7 @@
/* Perform the actual action */
function perform(message) {
return calculate().then(function(when) {
- var arg = (operation == "shutdown") ? "--poweroff" : "--reboot";
+ var arg = (operation == "shutdown") ? "-hP" : "-r";
var message = $("#shutdown-dialog textarea").val();
if (operation == "restart")
cockpit.hint("restart");