summaryrefslogtreecommitdiff
path: root/debian/itzks-systems-common.postinst
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2013-03-25 16:28:23 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2013-03-25 16:28:23 +0100
commit71ac4c0508d22334e6b03f53f1164f20a07ea6b5 (patch)
tree3ebf456769185395b4bf7f06e2a7c5c10065240a /debian/itzks-systems-common.postinst
parent1d4dd7220566d45d560a8efbea9fe03e0f4bcbfd (diff)
downloaditzks-systems-71ac4c0508d22334e6b03f53f1164f20a07ea6b5.tar.gz
itzks-systems-71ac4c0508d22334e6b03f53f1164f20a07ea6b5.tar.bz2
itzks-systems-71ac4c0508d22334e6b03f53f1164f20a07ea6b5.zip
/debian/itzks-systems-common.postinst: Preseed OCS Inventory Agent.
Diffstat (limited to 'debian/itzks-systems-common.postinst')
-rwxr-xr-xdebian/itzks-systems-common.postinst20
1 files changed, 19 insertions, 1 deletions
diff --git a/debian/itzks-systems-common.postinst b/debian/itzks-systems-common.postinst
index 2108e21..3713291 100755
--- a/debian/itzks-systems-common.postinst
+++ b/debian/itzks-systems-common.postinst
@@ -20,12 +20,30 @@ set -e
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
+do_preseed() {
+ pkg="$1"
+ template="$2"
+ type="$3"
+ value="$4"
+ log "Preseeding $template to $value"
+ echo $pkg $template $type "$value" | debconf-set-selections || \
+ error "Failed to load preseed '$template'"
+}
case "$1" in
configure)
- mkdir -p /etc/debian-edu/
+ # query the school name and preseed ocsinventory-agent
+ mkdir -p /etc/debian-edu/
db_get itzks-systems-common/customer-name
+
+ # write the school name to an /etc/ file
echo $RET 1> /etc/debian-edu/itzks.school
+
+ # and finally preseed ocsinventory-agent
+ do_preseed ocsinventory-agent ocsinventory-agent/tag string $RET
+ do_preseed ocsinventory-agent ocsinventory-agent/method select http
+ do_preseed ocsinventory-agent ocsinventory-agent/server string inventory.it-zukunft-schule.de
+
;;
abort-upgrade|abort-remove|abort-deconfigure)