chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test: update test-engine.c to work again
[elogind.git]
/
src
/
systemctl.vala
diff --git
a/src/systemctl.vala
b/src/systemctl.vala
index e3e675f479f7ce28bf59327620d76b8be593f9d5..6cce93bec6ba6833c7135f5189c0edd585cefe89 100644
(file)
--- a/
src/systemctl.vala
+++ b/
src/systemctl.vala
@@
-252,25
+252,17
@@
int main (string[] args) {
for (int i = 2; i < args.length; i++) {
for (int i = 2; i < args.length; i++) {
- ObjectPath p = manager.load_unit(args[i]);
-
- Unit u = bus.get_object(
- "org.freedesktop.systemd1",
- p,
- "org.freedesktop.systemd1.Unit") as Unit;
-
string mode = replace ? "replace" : "fail";
string mode = replace ? "replace" : "fail";
-
ObjectPath j = null;
if (args[1] == "start")
ObjectPath j = null;
if (args[1] == "start")
- j =
u.start(
mode);
+ j =
manager.start_unit(args[i],
mode);
else if (args[1] == "stop")
else if (args[1] == "stop")
- j =
u.stop(
mode);
+ j =
manager.stop_unit(args[i],
mode);
else if (args[1] == "restart")
else if (args[1] == "restart")
- j =
u.restart(
mode);
+ j =
manager.restart_unit(args[i],
mode);
else if (args[1] == "reload")
else if (args[1] == "reload")
- j =
u.reload(
mode);
+ j =
manager.reload_unit(args[i],
mode);
if (block)
jobs.append(j);
if (block)
jobs.append(j);
@@
-283,14
+275,7
@@
int main (string[] args) {
return 1;
}
return 1;
}
- ObjectPath p = manager.load_unit(args[2]);
-
- Unit u = bus.get_object(
- "org.freedesktop.systemd1",
- p,
- "org.freedesktop.systemd1.Unit") as Unit;
-
- ObjectPath j = u.start("isolate");
+ ObjectPath j = manager.start_unit(args[2], "isolate");
if (block) {
manager.subscribe();
if (block) {
manager.subscribe();