From 71ac4c0508d22334e6b03f53f1164f20a07ea6b5 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 25 Mar 2013 16:28:23 +0100 Subject: /debian/itzks-systems-common.postinst: Preseed OCS Inventory Agent. --- debian/itzks-systems-common.postinst | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'debian/itzks-systems-common.postinst') 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) -- cgit v1.2.3