systemctl: share path lookup between 'cat' and 'edit'

System Internals / systemd - Zbigniew Jędrzejewski-Szmek [in.waw.pl] - 15 December 2014 23:30 UTC

'systemctl cat' now works for templates too.

'systemctl edit' does not refuse to edit units that have changed on disk. That restriction didn't seem useful, actually editing units that have changed on disk before they are started is very reasonable.

'edit' with instances and templates works again:

Now:

$ build/systemctl edit getty@ Failed to copy /etc/systemd/system/getty@.service.d/override.conf to /etc/systemd/system/getty@.service.d/.override.confdff6290408c86369: Permission denied $ build/systemctl edit getty@tty3 Failed to create directories for /etc/systemd/system/getty@tty3.service.d/override.conf: Permission denied $ build/systemctl edit --full getty@tty3 Failed to copy /usr/lib/systemd/system/getty@.service to /etc/systemd/system/.getty@tty3.serviced3d175087e7e439b: Permission denied Failed to create temporary file for /etc/systemd/system/getty@tty3.service: Permission denied $ build/systemctl edit --full getty@ Failed to copy /usr/lib/systemd/system/getty@.service to /etc/systemd/system/.getty@.servicea3caad491c0f2f3d: Permission denied Failed to create temporary file for /etc/systemd/system/getty@.service: Permission denied

ad2a035 systemctl: share path lookup between 'cat' and 'edit'
src/systemctl/systemctl.c | 179 ++++++++++++++++++++++++++-------------------
1 file changed, 104 insertions(+), 75 deletions(-)

Upstream: github.com


  • Share