dreport: add fanctl dump output to BMC dump

Execute "fanctl dump" command and append the output json
file to the BMC dump.

Tested:
Fan control dump written to: /tmp/fan_control_dump.json
{
    "flight_recorder": [
        "Mar 24 14:12:55.323331:        main: Startup",
.
.
.

}

Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Change-Id: I52e972382f9e9c2aabab8c9034fd4da7775203e5
diff --git a/tools/dreport.d/plugins.d/fanctldump b/tools/dreport.d/plugins.d/fanctldump
new file mode 100644
index 0000000..003c7c1
--- /dev/null
+++ b/tools/dreport.d/plugins.d/fanctldump
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+#
+# config: 2 20
+# @brief: Get fanctl dump details
+#
+
+. $DREPORT_INCLUDE/functions
+
+desc="fan control dump"
+file_name="fan_control_dump.json"
+
+# collect data only if fanctl is present
+if [ -e "/usr/bin/fanctl" ]; then
+
+  command="rm -f /tmp/fan_control_dump.json; /usr/bin/fanctl dump; \
+           cat /tmp/fan_control_dump.json"
+
+  add_cmd_output "$command" "$file_name" "$desc"
+  rm -f /tmp/fan_control_dump.json
+
+fi