diff options
Diffstat (limited to 'debian/sitesummary-client.postinst')
-rw-r--r-- | debian/sitesummary-client.postinst | 16 |
1 files changed, 14 insertions, 2 deletions
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# |