logadm/lib/puppet/type/logadm.rb
def entry_on_disk
            if @entry_on_disk
                @entry_on_disk
            else
                if File.exist?(self[:conf_file])
                    line = File.open(self[:conf_file]).detect do |line|
                        line.match(/^#{self[:name]}\s/)
                    end
                    if line
                        @entry_on_disk = line.chomp
                    else
                        nil
                    end
                else
                    nil
                end
            end
        end
# Return the line from the logadm.conf file which matches this resource
# if one exists. Otherwise, return nil.
Return the line from the logadm.conf file which matches this resource
if one exists. Otherwise, return nil.
Return the line from the logadm . conf file which matches this resource if one exists . Otherwise return nil .
def entry_on_disk
            if @entry_on_disk
                @entry_on_disk
            else
                if File.exist?(self[:conf_file])
                    line = File.open(self[:conf_file]).detect do |line|
                        line.match(/^#{self[:name]}\s/)
                    end
                    if line
                        @entry_on_disk = line.chomp
                    else
                        nil
                    end
                else
                    nil
                end
            end
        end
def entry_on_disk if @entry_on_disk @entry_on_disk else if File . exist? ( self [ :conf_file ] ) line = File . open ( self [ :conf_file ] ) . detect do | line | line . match ( / ^ #{ self [ :name ] } \s / ) end if line @entry_on_disk = line . chomp else nil end else nil end end end
Return the line from the logadm.conf file which matches this resource
if one exists.
Return the line from the logadm . conf file which matches this resource if one exists .