Skip to content

Commit

Permalink
Notes about SystemdUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidner committed Sep 4, 2017
1 parent b85f8d9 commit 459c57a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/systemd/src/lib/yast2/systemd_unit.rb
Expand Up @@ -58,7 +58,8 @@ class PropMap < Hash

extend Forwardable

# @return []
# @return [String] eg. "apache2"
# (the canonical one, may be different from unit_name)
attr_reader :name
# @return [String] eg. "apache2"
attr_reader :unit_name
Expand All @@ -82,7 +83,9 @@ def initialize(full_unit_name, propmap = {})
@propmap = propmap.merge!(DEFAULT_PROPMAP)

@properties = show
# eg "Failed to get properties: Unit name apache2@.service is not valid."
@error = properties.error
# Id is not present when the unit name is not valid
@name = id.to_s.split(".").first || unit_name
end

Expand Down

0 comments on commit 459c57a

Please sign in to comment.