We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d31cad4 commit aed0b0aCopy full SHA for aed0b0a
lib/facter/rsyslog_version.rb
@@ -16,7 +16,7 @@
16
when 'RedHat', 'Suse'
17
if File.exist? '/sbin/rsyslogd'
18
# Query rsyslogd binary for the version
19
- Facter::Util::Resolution.exec("rsyslogd -v | head -n 1 | awk '{print $2}' | sed 's/,//g'")
+ Facter::Util::Resolution.exec("rsyslogd -v | sed -n '2q; s/^[^ ]* \([0-9][^ ]*\).*/\1/; s/,//g;p'")
20
else
21
# Fall back to rpm to determine version
22
command = 'rpm -q --qf "%{VERSION}" "rsyslog"'
0 commit comments