From: varac Date: Sun, 20 Jan 2013 16:32:02 +0000 (+0100) Subject: added custom fact apt_running X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=92d2d7be5f99920c67245d02c1ce76288967db62;p=puppet-apt.git added custom fact apt_running --- diff --git a/lib/facter/apt_running.rb b/lib/facter/apt_running.rb new file mode 100644 index 0000000..e8f2156 --- /dev/null +++ b/lib/facter/apt_running.rb @@ -0,0 +1,7 @@ +Facter.add("apt_running") do + setcode do + #Facter::Util::Resolution.exec('/usr/bin/dpkg -s mysql-server >/dev/null 2>&1 && echo true || echo false') + Facter::Util::Resolution.exec('pgrep apt-get >/dev/null 2>&1 && echo true || echo false') + end +end +