From: Sam Hartman Date: Sun, 5 Nov 2000 03:09:19 +0000 (+0000) Subject: * Add debconf support for /etc/openafs/* X-Git-Tag: debian/1.0.snap20001104-1~24 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=9fc1dff087e1c2a95107e01e96474433ec77746f;p=packages%2Fo%2Fopenafs.git * Add debconf support for /etc/openafs/* * Define openafs-client package * Move files into packges --- diff --git a/debian/control b/debian/control index de8938877..0d3e1bb0b 100644 --- a/debian/control +++ b/debian/control @@ -1,17 +1,17 @@ Source: openafs -Section: unknown +Section: non-us Priority: optional -Maintainer: unknown -Build-Depends: debhelper +Maintainer: Sam Hartman +Build-Depends: debhelper, libncurses5-dev, libpam0g-dev, bison Standards-Version: 3.1.1 -Package: openafs +Package: openafs-client Architecture: any -Depends: ${shlibs:Depends} -Description: - - -Package: openafs-doc -Architecture: all -Description: Documentation for openafs - +Depends: ${shlibs:Depends}, debconf +Description: The AFS distributed filesystem- client support + AFS is a distributed filesystem allowing cross-platform sharing of + files among multiple computers. Facilities are provided for access + control, authentication, backup and administrative management. + . + This package provides basic client support to mount and manipulate + AFS. diff --git a/debian/openafs-client.config b/debian/openafs-client.config new file mode 100644 index 000000000..ac513768e --- /dev/null +++ b/debian/openafs-client.config @@ -0,0 +1,11 @@ +#!/bin/sh -e + +. /usr/share/debconf/confmodule ||exit + +db_version 2.0 +db_input medium openafs-client/thiscell ||true +db_go + +db_input high openafs-client/cachesize ||true + +db_go diff --git a/debian/openafs-client.dirs b/debian/openafs-client.dirs new file mode 100644 index 000000000..36d778cf9 --- /dev/null +++ b/debian/openafs-client.dirs @@ -0,0 +1,2 @@ +var/cache/openafs +etc/openafs diff --git a/debian/openafs-client.postinst b/debian/openafs-client.postinst new file mode 100644 index 000000000..7faabfbf3 --- /dev/null +++ b/debian/openafs-client.postinst @@ -0,0 +1,46 @@ +#! /bin/sh +# postinst script for openafs + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# + +case "$1" in + configure) + + . /usr/share/debconf/confmodule + + db_version 2.0 + + db_get openafs-client/thiscell + echo $RET >/etc/openafs/ThisCell + db_get openafs-client/cachesize + echo /afs:/var/cache/openafs:$RET >/etc/openafs/cacheinfo + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/openafs-client.postrm b/debian/openafs-client.postrm new file mode 100644 index 000000000..095d39e5e --- /dev/null +++ b/debian/openafs-client.postrm @@ -0,0 +1,40 @@ +#! /bin/sh +# postrm script for openafs +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see /usr/share/doc/packaging-manual/ + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + + ;; + +purge) + rm /etc/openafs/cacheinfo 2>/dev/null ||true + rm /etc/openafs/ThisCell 2>?dev/null ||true + ;; + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 0 + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + + diff --git a/debian/openafs-client.templates b/debian/openafs-client.templates new file mode 100644 index 000000000..5281fcbfe --- /dev/null +++ b/debian/openafs-client.templates @@ -0,0 +1,12 @@ +Template: openafs-client/thiscell +Type: string +Description: What AFS cell does this workstation belong to? + AFS filespace is organized into cells or administrative domains. + Each workstation belongs to one cell. Usually the cell is the DNS + domain name of the workstation. + +template: openafs-client/cachesize +Type: string +Description: How large is your AFS cache (kb)? +Default: 50000 + diff --git a/debian/rules b/debian/rules index c44f7d3bf..e03369296 100755 --- a/debian/rules +++ b/debian/rules @@ -58,9 +58,9 @@ install: build dh_installdirs # Add here commands to install the package into debian/tmp. - $(MAKE) install DESTDIR=`pwd`/debian/tmp + cat debian/filelist |debian/movefiles + - dh_movefiles # Build architecture-independent files here. # Pass -i to all debhelper commands in this target to reduce clutter. @@ -101,7 +101,7 @@ binary-arch: build install dh_testversion 1.1.17 dh_testdir dh_testroot -# dh_installdebconf + dh_installdebconf dh_installdocs dh_installexamples dh_installmenu @@ -118,6 +118,7 @@ binary-arch: build install dh_compress dh_fixperms # You may want to make some executables suid here. + chmod 700 debian/openafs-client/var/cache/openafs dh_suidregister dh_installdeb # dh_makeshlibs