On Mon, Jun 23, 2014 at 02:46:42PM +0200, Lennart Poettering wrote: > On Mon, 23.06.14 13:34, Michal Sekletar ([email protected]) wrote: > > What's the rationale?
This came up while discussing the issue when some script saved list of actions it took and same script could be called to undo those actions on the system. Of course reporter of this issue saw logs that some of undo actions are failing because they actually never succeeded because script in question was called from %post during kickstarted installation. Related bugzilla where they are requesting proposed change: https://bugzilla.redhat.com/show_bug.cgi?id=1110675 > > So far the logic always was to turn systemctl invocations into NOPs so > that packaging scripts in invoked in chroot() environments won't > fail. Why do you want them to fail? This sounds wrong? Thinking about this once again it doesn't seem as such a good idea now. Not sure really... > > > --- > > src/systemctl/systemctl.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c > > index 727be58..2dac67c 100644 > > --- a/src/systemctl/systemctl.c > > +++ b/src/systemctl/systemctl.c > > @@ -6644,7 +6644,7 @@ found: > > } else { > > if (running_in_chroot() > 0) { > > log_info("Running in chroot, ignoring request."); > > - return 0; > > + return -ENOTSUP; > > } > > > > if ((verb->bus != FORCE || arg_force <= 0) && !bus) { > > @@ -6895,7 +6895,7 @@ int main(int argc, char*argv[]) { > > > > if (running_in_chroot() > 0 && arg_action != ACTION_SYSTEMCTL) { > > log_info("Running in chroot, ignoring request."); > > - r = 0; > > + r = -ENOTSUP; > > goto finish; > > } > > > > > Lennart > > -- > Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
