Class: Yast2::Systemd::SocketFinder
- Inherits:
-
Object
- Object
- Yast2::Systemd::SocketFinder
- Defined in:
- library/systemd/src/lib/yast2/systemd/socket_finder.rb
Overview
This class is responsible for finding out which sockets trigger a given service.
When systemd is working properly, the relationship between services and sockets is cached in
order to reduce the amount of calls to systemctl show
. However, during the installation, where
systemd is not fully operational, this class just tries to find a socket named after the
service.
Instance Method Summary collapse
-
#for_service(service_name) ⇒ Yast2::SystemdSocket?
Returns the socket for a given service.
Instance Method Details
#for_service(service_name) ⇒ Yast2::SystemdSocket?
Returns the socket for a given service
43 44 45 46 47 48 |
# File 'library/systemd/src/lib/yast2/systemd/socket_finder.rb', line 43 def for_service(service_name) socket_name = socket_name_for(service_name) return nil unless socket_name Yast2::Systemd::Socket.find(socket_name) end |