Hello everybody,
if 'systemctl enable' (and friends) is run inside chroot it always
exits with a bad return code. unit_file_enable() returns the number of
symlink rules that were supposed to be created. So resetting r to 0 and
exiting gracefully should be the correct way. At least it fixes it for me, my
supposed patch is attached.
--
main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];)
putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);}
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 7d6a6a2..ae7a301 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -3660,7 +3660,8 @@ static int enable_unit(DBusConnection *bus, char **args) {
if (r < 0) {
log_error("Operation failed: %s", strerror(-r));
goto finish;
- }
+ } else
+ r = 0;
if (!arg_quiet) {
for (i = 0; i < n_changes; i++) {
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel