name: cpuinfo
plugin: resource
command: cpuinfo_resource
estimated_duration: 0.08
description: Gets CPU resource info from /proc/cpuinfo

name: cdimage
plugin: resource
user: root
command: cdimage_resource
estimated_duration: 0.5
description: Gets installation info from casper.log and media-info

name: dpkg
plugin: resource
command: dpkg_resource
estimated_duration: 0.5
requires: package.name == "dpkg"
description: Gets info on the version of dpkg installed

name: gconf
plugin: resource
command: gconf_resource | filter_templates -w 'name=.*proxy.*'
estimated_duration: 0.6
requires: package.name == "gconf2"
description: Generates resource info from gconf settings

name: lsb
plugin: resource
command: lsb_resource
estimated_duration: 1.0
requires: package.name == "lsb-release"
description: Generates release info based on /etc/lsb-release

name: meminfo
plugin: resource
command: meminfo_resource
estimated_duration: 0.12
description: Generates resource info based on /proc/meminfo

name: module
plugin: resource
command: module_resource
estimated_duration: 0.4
description: Generates resources info on running kernel modules

name: package
plugin: resource
command: dpkg-query -W -f='name: ${Package}\nversion: ${Version}\n\n'
estimated_duration: 4.0
description: Generates a list of packages

name: executable
plugin: resource
description: Generates a resource for all available executables
command:
    find -H $(echo "$PATH" | sed -e 's/:/ /g') -maxdepth 1 -type f -executable -printf "name: %f\n\n"

name: device
plugin: resource
command: udev_resource
estimated_duration: 0.36
requires: package.name == "udev"
description: Creates resource info from udev 

name: dmi
plugin: resource
user: root
requires: package.name == "dmidecode"
command: dmi_resource
estimated_duration: 0.5

name: efi
plugin: resource
user: root
command: efi_resource
estimated_duration: 0.3

name: uname
plugin: resource
command: uname_resource
estimated_duration: 0.04
description: Creates resource info from uname output

name: sleep
plugin: resource
command: for state in `cat /sys/power/state`; do echo "$state: supported"; done
description: Create resource info for supported sleep states
estimated_duration: 0.100

plugin: local
name: optical_drive
requires: device.category == 'CDROM'
_description: Create resource info for supported optical actions
command:
 cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=CDROM"'
 name: optical_drive_`ls /sys$path/block`
 plugin: resource
 command: optical_resource /dev/`ls /sys/$path/block`
 estimated_duration: 0.5
 description: Create resource info for supported optical actions
 EOF

name: block_device
plugin: resource
command: block_device_resource
estimated_duration: 0.060
description: Create resource info for removable block devices 

name: display
plugin: resource
command: display_resource
estimated_duration: 0.3
requires: package.name == "x11-xserver-utils"
description: Creates display resource info from xrandr output

name: usb
plugin: resource
description: Creates resource info for supported USB versions
command: 
 for version in 2 3; do 
     echo -n "usb$version: "
     lsusb |grep -q "Linux Foundation ${version}.0 root hub" && echo "supported" || echo "unsupported"
 done
estimated_duration: 0.15

name: xinput
plugin: resource
command: xinput_resource
requires: package.name == "xinput"
description: Creates resource info from xinput output.

name: environment
plugin: resource
description: Create resource info for environment variables
command:
 IFS=$'\n'
 for e in `env | sed 's/=/:/g'`; do
     echo $e | awk -F':' '{print $1 ": " $2}'
 done

name: mobilebroadband
plugin: resource
description: Create resource for mobile broadband devices
command:
 if mm-test --no-scan | grep -q 'GSM modem'
 then
    echo "gsm: supported"
 fi
 if mm-test --no-scan | grep -q 'CDMA modem'
 then
    echo "cdma: supported"
 fi

name: virtualization
plugin: resource
requires: package.name == "cpu-checker"
description: Resource for hardware virtualization
command:
 if kvm-ok > /dev/null
 then
     echo "kvm: supported"
 else
     echo "kvm: unsupported"
 fi

name: IEEE_80211
plugin: resource
command: 80211_resource
estimated_duration: 0.02
description: Creates resource info for wifi supported protocols/interfaces

name: rtc
plugin: resource
command: 
  if [ -e /sys/class/rtc ]
  then
      echo "state: supported"
  else
      echo "state: unsupported"
  fi
estimated_duration: 0.04
description: Creates resource info for RTC
