diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2006-08-27 10:19:27 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2006-08-27 10:19:27 +0000 |
commit | d9ff96f60f8aa7515d440df0d233649f99f3438c (patch) | |
tree | 6f83bdb9cfc1a02f775a552972a043895e5fcaaf | |
parent | d2e613ce766fe9d17d326b05d5a9688426000f09 (diff) | |
download | sitesummary-d9ff96f60f8aa7515d440df0d233649f99f3438c.tar.gz sitesummary-d9ff96f60f8aa7515d440df0d233649f99f3438c.tar.bz2 sitesummary-d9ff96f60f8aa7515d440df0d233649f99f3438c.tar.xz |
* Add debconf question for site, and start on code to ask for
collector URL.
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/control | 4 | ||||
-rw-r--r-- | debian/sitesummary-client.config | 15 | ||||
-rw-r--r-- | debian/sitesummary-client.dirs | 1 | ||||
-rw-r--r-- | debian/sitesummary-client.postinst | 25 | ||||
-rw-r--r-- | debian/sitesummary-client.templates | 10 |
6 files changed, 55 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 40ad299..3dadd94 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ sitesummary (0.0.2) UNRELEASED; urgency=low * Not released yet. * Make temp file name more unique by adding process id to it, while I wait for a working getpeername call. + * Add debconf question for site, and start on code to ask for + collector URL. -- Petter Reinholdtsen <pere@debian.org> Sat, 26 Aug 2006 12:10:27 +0200 diff --git a/debian/control b/debian/control index 3a71965..0f05eaf 100644 --- a/debian/control +++ b/debian/control @@ -9,13 +9,13 @@ Standards-Version: 3.7.2 Package: sitesummary Architecture: all Depends: gnupg -Recommends: apache2-mpm-worker | httpd, sitesummary-client +Recommends: ${misc:Depends}, apache2-mpm-worker | httpd, sitesummary-client Description: Generate site summary of submitting hosts, server package Nice server. Package: sitesummary-client Architecture: all -Depends: wget, gnupg +Depends: ${misc:Depends}, wget, gnupg Recommends: dmidecide, pciutils Recommends: sitesummary Description: Generate site summary of submitting hosts, client package diff --git a/debian/sitesummary-client.config b/debian/sitesummary-client.config new file mode 100644 index 0000000..03b1535 --- /dev/null +++ b/debian/sitesummary-client.config @@ -0,0 +1,15 @@ +#!/bin/sh + +# if we do not have debconf, we just skip this +. /usr/share/debconf/confmodule || exit 0 + +db_input medium sitesummary/collector_url || true +db_go || true + +if [ -f /etc/sitesummary/site ] ; then + SITE=`cat /etc/sitesummary/site` + db_set sitesummary/site "$SITE" +fi + +db_input medium sitesummary/site || true +db_go || true diff --git a/debian/sitesummary-client.dirs b/debian/sitesummary-client.dirs new file mode 100644 index 0000000..4000afd --- /dev/null +++ b/debian/sitesummary-client.dirs @@ -0,0 +1 @@ +/etc/sitesummary diff --git a/debian/sitesummary-client.postinst b/debian/sitesummary-client.postinst new file mode 100644 index 0000000..88dddcc --- /dev/null +++ b/debian/sitesummary-client.postinst @@ -0,0 +1,25 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_get sitesummary/collector_url +URL="$RET" + +db_get sitesummary/site +SITE="$RET" + +# Only replace the site file if the content changed +if [ -f /etc/sitesummary/site ] ; then + OLDSITE=`cat /etc/sitesummary/site` + if [ "$SITE" != "$OLDSITE" ] ; then + echo "$SITE" > /etc/sitesummary/site + fi +else + echo "$SITE" > /etc/sitesummary/site +fi + +db_stop + +#DEBHELPER# diff --git a/debian/sitesummary-client.templates b/debian/sitesummary-client.templates new file mode 100644 index 0000000..8a2f0c7 --- /dev/null +++ b/debian/sitesummary-client.templates @@ -0,0 +1,10 @@ +Template: sitesummary/collector_url +Type: text +_Description: URL to sitesummary collector + Where should the sitesummary information be submitted + +Template: sitesummary/site +Type: text +_Description: Site string + Insert a string identifying the site where this machine is located. + |