logadm/lib/puppet/type/logadm.rb
def serialized_entry
            options = []
            options << "-a '#{self[:post_command]}'" if self[:post_command]
            options << "-A #{self[:age]}" if self[:age]
            options << "-b '#{self[:pre_command]}'" if self[:pre_command]
            options << "-c" if self[:copy_truncate]
            options << "-C #{self[:count]}" if self[:count]
            options << "-e #{self[:mail]}" if self[:mail]
            options << "-E '#{self[:expire_command]}'" if self[:expire_command]
            options << "-g #{self[:group]}" if self[:group]
            options << "-m #{self[:mode]}" if self[:mode]
            options << "-M '#{self[:move_command]}'" if self[:move_command]
            options << "-n" if self[:noop]
            options << "-N" if self[:ignore_missing]
            options << "-o #{self[:owner]}" if self[:owner]
            options << "-p #{self[:period]}" if self[:period]
            options << "-R '#{self[:run_on_rotate]}'" if self[:run_on_rotate]
            options << "-s #{self[:size]}" if self[:size]
            options << "-S #{self[:max_size]}" if self[:max_size]
            options << "-t #{self[:template]}" if self[:template]
            options << "-T #{self[:old_template]}" if self[:old_template]
            options << "-z #{self[:compress_count]}" if self[:compress_count]
            if self[:pattern]
                "#{self[:name]} #{options.join(' ')} #{self[:pattern]}"
                        else
                "#{self[:name]} #{options.join(' ')}"
                        end
        end
# Returns a string of the appropriate line to add to
# logadm.conf for this resource.
Returns a string of the appropriate line to add to
logadm.conf for this resource.
Returns a string of the appropriate line to add to logadm . conf for this resource .
def serialized_entry
            options = []
            options << "-a '#{self[:post_command]}'" if self[:post_command]
            options << "-A #{self[:age]}" if self[:age]
            options << "-b '#{self[:pre_command]}'" if self[:pre_command]
            options << "-c" if self[:copy_truncate]
            options << "-C #{self[:count]}" if self[:count]
            options << "-e #{self[:mail]}" if self[:mail]
            options << "-E '#{self[:expire_command]}'" if self[:expire_command]
            options << "-g #{self[:group]}" if self[:group]
            options << "-m #{self[:mode]}" if self[:mode]
            options << "-M '#{self[:move_command]}'" if self[:move_command]
            options << "-n" if self[:noop]
            options << "-N" if self[:ignore_missing]
            options << "-o #{self[:owner]}" if self[:owner]
            options << "-p #{self[:period]}" if self[:period]
            options << "-R '#{self[:run_on_rotate]}'" if self[:run_on_rotate]
            options << "-s #{self[:size]}" if self[:size]
            options << "-S #{self[:max_size]}" if self[:max_size]
            options << "-t #{self[:template]}" if self[:template]
            options << "-T #{self[:old_template]}" if self[:old_template]
            options << "-z #{self[:compress_count]}" if self[:compress_count]
            if self[:pattern]
                "#{self[:name]} #{options.join(' ')} #{self[:pattern]}"
                        else
                "#{self[:name]} #{options.join(' ')}"
                        end
        end
def serialized_entry options = [ ] options << "-a '#{self[:post_command]}'" if self [ :post_command ] options << "-A #{self[:age]}" if self [ :age ] options << "-b '#{self[:pre_command]}'" if self [ :pre_command ] options << "-c" if self [ :copy_truncate ] options << "-C #{self[:count]}" if self [ :count ] options << "-e #{self[:mail]}" if self [ :mail ] options << "-E '#{self[:expire_command]}'" if self [ :expire_command ] options << "-g #{self[:group]}" if self [ :group ] options << "-m #{self[:mode]}" if self [ :mode ] options << "-M '#{self[:move_command]}'" if self [ :move_command ] options << "-n" if self [ :noop ] options << "-N" if self [ :ignore_missing ] options << "-o #{self[:owner]}" if self [ :owner ] options << "-p #{self[:period]}" if self [ :period ] options << "-R '#{self[:run_on_rotate]}'" if self [ :run_on_rotate ] options << "-s #{self[:size]}" if self [ :size ] options << "-S #{self[:max_size]}" if self [ :max_size ] options << "-t #{self[:template]}" if self [ :template ] options << "-T #{self[:old_template]}" if self [ :old_template ] options << "-z #{self[:compress_count]}" if self [ :compress_count ] if self [ :pattern ] "#{self[:name]} #{options.join(' ')} #{self[:pattern]}" else "#{self[:name]} #{options.join(' ')}" end end
Returns a string of the appropriate line to add to
logadm.conf for this resource.
Returns a string of the appropriate line to add to logadm . conf for this resource .