Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

OpenVPN unit file is parameterized (see @):

> ls /usr/lib/systemd/system/openvpn*
/usr/lib/systemd/system/openvpn@.service

The problem is that I cannot list the parameterized service names by systemctl command if they are disabled even with option --all:

> systemctl --full --all -t service | grep openvpn

However, I can still list names of non-parameterized disabled services (iptables in this example):

> systemctl --full --all -t service | grep iptables
iptables.service loaded inactive dead IPv4 firewall with iptables

How to get list of all units even if some of them are parameterized?

The question is actually more complicated (I could easily list available unit files to answer myself). However, the problem is in the inconsistency.

  • When openvpn@example.com service is enabled, it can be listed by the above command.
  • When openvpn@example.com service is disabled, it cannot.

It seems like an obvious bug (or limitation of the fact that systemd does not probably understand whether parameterized service is actually configured when we enable it). However, I rather ask the crowd than jump into this conclusion.

share|improve this question
    
Command systemctl --full --all -t service list-unit-files can list required unit file. However, it is still not the actual full service name which can be used for systemctl's commands start, stop, ... –  uvsmtid Nov 11 '13 at 13:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.