logadm/lib/puppet/type/logadm.rb
# Validates the current logadm.conf file. If it's invalid,
# restore's the backup
Validates the current logadm.conf file. If it's invalid,
restore's the backup
Validates the current logadm . conf file . If it ' s invalid restore ' s the backup
def validate_entry
            if File.exist?('/usr/sbin/logadm')
                valid = Kernel.system("/usr/sbin/logadm -f #{self[:conf_file]} -V #{self[:name]} > /dev/null 2>&1")
                if !valid
                    self.err "Restoring previous #{self[:conf_file]}. Requested entry is invalid."
                    restore
                end
            else
                self.notice "Unable to validate, /usr/sbin/logadm unavailable"
            end
        end
def validate_entry if File . exist? ( '/usr/sbin/logadm' ) valid = Kernel . system ( "/usr/sbin/logadm -f #{self[:conf_file]} -V #{self[:name]} > /dev/null 2>&1" ) if ! valid self . err "Restoring previous #{self[:conf_file]}. Requested entry is invalid." restore end else self . notice "Unable to validate, /usr/sbin/logadm unavailable" end end
Validates the current logadm.conf file.
Validates the current logadm . conf file .