Browse files

OS-1672 add support for 'SDC Agents' in the sysinfo output.

  • Loading branch information...
1 parent 8debf6e commit ff0982edfbb9a29335b451107967221b36a8f229 @joshwilsdon joshwilsdon committed Dec 10, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 src/sysinfo
View
14 src/sysinfo
@@ -884,6 +884,20 @@ END
done
cat <<END
},
+END
+
+ if [[ ${ZONENAME} == "global" && -f /.smartdc_version \
+ && -d /opt/smartdc/agents/lib/node_modules ]]; then
+
+ # on SDC we also want to output the agents versions
+ find /opt/smartdc/agents/lib/node_modules/ -maxdepth 2 \
+ -name package.json -exec cat {} \; \
+ | json -g -o json -a name version \
+ | sed -e "s/^\[/\"SDC Agents\": \[/" \
+ | sed -e "s/^/ /" | sed -e "s/\]$/\],/"
+ fi
+
+ cat <<END
"Network Interfaces": {
END

0 comments on commit ff0982e

Please sign in to comment.