You are not logged in.
Hi,
I've just made a new install of Arch Linux and everytime i issue 'systemctl start reflector.service' command and try using bash autocomplete feature it shows a message about a not-found service like the one below.
systemctl start refUnit auditd.service could not be found.
lector.service
I tried masking auditd.service but then it just showed 'Unit plymouth-quit-wait.service could not be found.' instead.
It seems it's following the list of not-found services below.
systemctl --all --state=not-found
UNIT LOAD ACTIVE SUB DESCRIPTION
● auditd.service not-found inactive dead auditd.service
● plymouth-quit-wait.service not-found inactive dead plymouth-quit-wait.service
● plymouth-quit.service not-found inactive dead plymouth-quit.service
● plymouth-start.service not-found inactive dead plymouth-start.service
● rc-local.service not-found inactive dead rc-local.service
● syslog.service not-found inactive dead syslog.service
Questions:
How can i stop that from happenning? As i don't really think masking them all is a good solution.
Is it normal to have all these not-found services?
Thanks in advance.
Last edited by leosanvieira (2016-08-15 16:59:12)
Offline
Why would you `systemctl start *`? That is a nonsensical command.
All those services you list belong to packages you can identify with pacman -Fs. I gather these are all packages you once installed, and services you enabled. But you've since removed the packages. So disable the services.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I thought they were generated by unfulfilled dependencies for instance
$ grep -r plymouth-start.service /usr/lib/systemd/system
/usr/lib/systemd/system/systemd-ask-password-console.path:After=plymouth-start.service
/usr/lib/systemd/system/rescue.service:After=sysinit.target plymouth-start.service
/usr/lib/systemd/system/systemd-ask-password-console.service:After=plymouth-start.service systemd-vconsole-setup.serviceThose three files are supplied by the systemd package but it does not supply a plymouth-start.service
Offline
Trilby,
When i used the * character in the post, i meant that as a wild card as this behaviour happens no matter the service i try to start.
As i said, this is a new install, i didn't install these packages and of course i didn't remove them.
But the really strange behaviour is why is it showing during bash autocomplete?
Last edited by leosanvieira (2016-08-14 15:21:18)
Offline
I thought they were generated by unfulfilled dependencies for instance
Ah, it seems so. Those show up in the --state=not-found output for me too. But I've never had any issues. So perhaps we need to clarify what the actual problem is.
But the really strange behaviour is why is it showing during bash autocomplete?
So is the only problem with bash autocomplete? If you "fix" the improperly completed command before blindly hitting enter, are there any problems?
How have you configured autocompletion? I do not get any service file options if I type `systemctl start <TAB>`.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
The message occurs because internally the completion code is itself calling systemctl in various ways to get a list of startable units. Unfortunately it's not filtering out “not-found” units, so one of the systemctl calls it makes is failing with the error message you see.
These “not-found” units can also be created by soft (optional) dependencies in other units.
Note for tab-completion you just need to press TAB, there's no need to enter “*” first.
Offline
As the wild card i had used as an example was causing confusion, i changed it with the actual command 'systemctl start reflector.service'.
Trillby, actually blind hitting enter works, the only problem is the message "dirtying" the actual command issued.
ukhippo, would you classify this behaviour as a bug in bash-completion package?
Offline
$ pacman -Qo /usr/share/bash-completion/completions/systemctl
/usr/share/bash-completion/completions/systemctl is owned by systemd 231-1Offline
https://bbs.archlinux.org/viewtopic.php?id=208963
EDIT: Sorry, I didn't read the OP properly.
Please excuse me.
Last edited by Head_on_a_Stick (2016-08-14 18:18:39)
Jin, Jîyan, Azadî
Offline
Yes it's a bug in /usr/share/bash-completion/completions/systemctl file, which as loqs post shows is provided by systemd
Offline
Bug report: https://bugs.archlinux.org/task/50403
As a workaround, i masked all not-found services and that solved the issue.
Thanks for all the answers.
I'm declaring this solved.
Offline