Bug 51386 - Broken symlinks in /lib/systemd/system partially breaks systemctl unit listing
Summary: Broken symlinks in /lib/systemd/system partially breaks systemctl unit listing
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-24 11:57 UTC by JR
Modified: 2012-09-13 19:33 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description JR 2012-06-24 11:57:07 UTC
Kubuntu 12.04 x86_64, running systemd (185) git revision eab367b9 (120622).

If you have a broken symlink in /{,usr}/lib/systemd/system/ you can no longer run 'systemctl list-unit-files', nor 'systemctl list-units --type=x' where x is the file extension of your broken symlink. The error message is the very generic 'file not found' message.

How to reproduce:
>$ sudo ln -sf asdf /lib/systemd/system/kittens.service
>$ systemctl list-unit-files
>Failed to issue method call: No such file or directory

The root cause here is user error (mine), obviously.

Could systemctl be tweaked to handle the situation more gracefully, or at the very least mention what files it fails to read? Perhaps both?
Comment 1 Lennart Poettering 2012-09-13 19:33:52 UTC
Fixed in git.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.