From 36480a8cebbfe69376abbd37b95f85feb191b2da Mon Sep 17 00:00:00 2001
From: Erik Alexandre Pucci <eap08@c3sl.ufpr.br>
Date: Sat, 10 Sep 2011 13:38:49 -0300
Subject: [PATCH] bootstrap-install: Collect more information in
 collec_information()

Collect OS information (distro and kernel) and the information about
existing files inside seed_mec user home ("ls -lR").

Signed-off-by: Erik Alexandre Pucci <eap08@c3sl.ufpr.br>
Acked-by: Adriano da Luz <al08@c3sl.ufpr.br>
---
 bootstraps/bootstrap-install | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/bootstraps/bootstrap-install b/bootstraps/bootstrap-install
index b002605..d3831c3 100644
--- a/bootstraps/bootstrap-install
+++ b/bootstraps/bootstrap-install
@@ -62,6 +62,19 @@ collect_information(){
     cat ${AGENT_DIR}/client/conf/inep
     printf "\n\n----------------------------------\n\n"
 
+    printf "    OS information\n%b" \
+           "    ==============\n\n"
+    printf "Distro\n"
+    DISTRO=$(cut -sd ' ' -f1 /etc/issue | head -n 1)
+    if test -f "/etc/le_version"; then
+      printf "Linux Educacional $(cat /etc/le_version)\n"
+    elif test "${DISTRO}" = "Ubuntu" -a -f "/usr/lib/edu/fbedu/tutorial.htm"; then
+      printf "Linux Educacional\n"
+    fi
+    printf "Kernel\n"
+    cut -d " " -f3 /proc/version
+    printf "\n\n----------------------------------\n\n"
+
     printf "    Commands\n%b" \
            "    ========\n\n"
     printf "ifconfig\n"
@@ -77,6 +90,11 @@ collect_information(){
     done
     printf "\n\n----------------------------------\n\n"
 
+    printf "    seed_mec user files\n%b" \
+           "    ===================\n\n"
+    ls -lR "${SEED_MEC_HOME}"
+    printf "\n\n----------------------------------\n\n"
+
     printf "    Inventory XML\n%b" \
            "    =============\n\n"
     cat ${AGENT_DIR}/data/collect-data.xml
-- 
GitLab