Skip to content

Commit

Permalink
systemd: Log 'shutdown' command output
Browse files Browse the repository at this point in the history
The tests ar efailing, and we'd like to see if shutdown is actually
completing successfully.

Closes #2941
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>
  • Loading branch information
stefwalter authored and mvollmer committed Oct 12, 2015
1 parent 290ce96 commit 86f1120
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions pkg/systemd/host.js
Original file line number Diff line number Diff line change
Expand Up @@ -902,12 +902,16 @@ PageShutdownDialog.prototype = {

var arg = (op == "shutdown") ? "--poweroff" : "--reboot";

var promise = cockpit.spawn(["shutdown", arg, when, message], { superuser: "try" });
var promise = cockpit.spawn(["shutdown", arg, when, message], { superuser: "try", err: "out" });
$('#shutdown-dialog').dialog("promise", promise);
promise.done(function() {
if (op == "restart")
cockpit.hint("restart");
});
promise
.stream(function(data) {
console.log(data);
})
.done(function() {
if (op == "restart")
cockpit.hint("restart");
});
},

restart: function() {
Expand Down

0 comments on commit 86f1120

Please sign in to comment.