aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/changelog2
-rw-r--r--debian/sitesummary-client.config13
-rw-r--r--debian/sitesummary-client.postinst16
-rw-r--r--debian/sitesummary-client.templates6
4 files changed, 31 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog
index 7a05ff2..518a938 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
sitesummary (0.0.5) UNRELEASED; urgency=low
- * Add debconf question for sitegroup too.
+ * Add debconf question for sitegroup and host class.
-- Petter Reinholdtsen <pere@debian.org> Mon, 28 Aug 2006 08:42:49 +0200
diff --git a/debian/sitesummary-client.config b/debian/sitesummary-client.config
index aed5d63..ac5ebab 100644
--- a/debian/sitesummary-client.config
+++ b/debian/sitesummary-client.config
@@ -20,15 +20,22 @@ db_input medium sitesummary-client/collector_url || true
db_go || true
if [ -f /etc/sitesummary/site ] ; then
- SITE=`cat /etc/sitesummary/site`
+ SITE="`cat /etc/sitesummary/site`"
db_set sitesummary-client/site "$SITE"
fi
db_input medium sitesummary-client/site || true
db_go || true
if [ -f /etc/sitesummary/sitegroup ] ; then
- SITE=`cat /etc/sitesummary/sitegroup`
- db_set sitesummary-client/sitegroup "$SITE"
+ SITEGROUP="`cat /etc/sitesummary/sitegroup`"
+ db_set sitesummary-client/sitegroup "$SITEGROUP"
fi
db_input medium sitesummary-client/sitegroup || true
db_go || true
+
+if [ -f /etc/sitesummary/hostclass ] ; then
+ HOSTCLASS="`cat /etc/sitesummary/hostclass`"
+ db_set sitesummary-client/hostclass "$HOSTCLASS"
+fi
+db_input medium sitesummary-client/hostclass || true
+db_go || true
diff --git a/debian/sitesummary-client.postinst b/debian/sitesummary-client.postinst
index 02e505c..28a05bf 100644
--- a/debian/sitesummary-client.postinst
+++ b/debian/sitesummary-client.postinst
@@ -38,7 +38,7 @@ db_get sitesummary-client/site
SITE="$RET"
# Only replace the site file if the content changed
if [ -f /etc/sitesummary/site ] ; then
- OLDSITE=`cat /etc/sitesummary/site`
+ OLDSITE="`cat /etc/sitesummary/site`"
if [ "$SITE" != "$OLDSITE" ] ; then
echo "$SITE" > /etc/sitesummary/site
fi
@@ -50,7 +50,7 @@ db_get sitesummary-client/sitegroup
SITEGROUP="$RET"
# Only replace the sitegroup file if the content changed
if [ -f /etc/sitesummary/sitegroup ] ; then
- OLDSITEGROUP=`cat /etc/sitesummary/sitegroup`
+ OLDSITEGROUP="`cat /etc/sitesummary/sitegroup`"
if [ "$SITEGROUP" != "$OLDSITEGROUP" ] ; then
echo "$SITEGROUP" > /etc/sitesummary/sitegroup
fi
@@ -58,6 +58,18 @@ else
echo "$SITEGROUP" > /etc/sitesummary/sitegroup
fi
+db_get sitesummary-client/hostclass
+HOSTCLASS="$RET"
+# Only replace the hostclass file if the content changed
+if [ -f /etc/sitesummary/hostclass ] ; then
+ OLDHOSTCLASS="`cat /etc/sitesummary/hostclass`"
+ if [ "$HOSTCLASS" != "$OLDHOSTCLASS" ] ; then
+ echo "$HOSTCLASS" > /etc/sitesummary/hostclass
+ fi
+else
+ echo "$HOSTCLASS" > /etc/sitesummary/hostclass
+fi
+
db_stop
#DEBHELPER#
diff --git a/debian/sitesummary-client.templates b/debian/sitesummary-client.templates
index 5ce9390..5dde181 100644
--- a/debian/sitesummary-client.templates
+++ b/debian/sitesummary-client.templates
@@ -15,3 +15,9 @@ Type: string
_Description: Sitegroup?
Insert a string identifying the subgroup within the site where this
machine is located.
+
+Template: sitesummary-client/hostclass
+Type: string
+_Description: Host class?
+ Insert string identifying the host class, like workstation, server,
+ laptop, thin client etc.