From: chip Date: Thu, 18 Mar 2004 21:45:34 +0000 (+0000) Subject: * Make /etc/exports a conffile. (closes: #224557) X-Git-Tag: nfs-utils-1-0-6-post2~5 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=d0131f1c645c57b914a38bbd7c651f3a546129ee;p=nfs-utils.git * Make /etc/exports a conffile. (closes: #224557) * Remove debconf warning notes in favor of nfs-kernel-server.NEWS. (closes: #228365) * Don't bother removing nfs-server's init links; it's long dead. --- diff --git a/debian/changelog b/debian/changelog index 0326c13..8a79ea8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,17 @@ -nfs-utils (1:1.0.6-2) unstable; urgency=low - - * Test kernel version in init script; if kernel is 2.4 or later, - rpc.lockd is unnecessary. Existing tests still apply to earlier - kernels. (closes: #205867) - - -- +nfs-utils (1:1.0.6-2) unstable; urgency=medium + + * Upstream CVS sync. + * Urgency "medium" to get debconf fix into testing. + * Make /etc/exports a conffile. (closes: #224557) + * Remove debconf warning notes in favor of nfs-kernel-server.NEWS. + (closes: #228365) + * Test kernel version in init script; all kernels from 2.4 forward + have a lockd thread, and don't need rpc.lockd. Probe older kernels + by checking for lockd-related symbols. When in doubt, go ahead and + run rpc.lockd; if it's not needed, it exits. (closes: #205867) + * Don't bother removing nfs-server's init links; it's long dead. + + -- Chip Salzenberg Thu, 18 Mar 2004 16:53:50 -0500 nfs-utils (1:1.0.6-1) unstable; urgency=low diff --git a/debian/etc.exports b/debian/etc.exports new file mode 100644 index 0000000..26b16e1 --- /dev/null +++ b/debian/etc.exports @@ -0,0 +1,2 @@ +# /etc/exports: the access control list for filesystems which may be exported +# to NFS clients. See exports(5). diff --git a/debian/nfs-common.postinst b/debian/nfs-common.postinst index a69cf6a..5af4731 100755 --- a/debian/nfs-common.postinst +++ b/debian/nfs-common.postinst @@ -12,6 +12,13 @@ case "$1" in update-rc.d -f nfs-common remove >/dev/null 2>&1 || true fi update-rc.d nfs-common defaults 21 79 >/dev/null + + # Remove obsolete debconf questions + if [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_unregister nfs-common/tcpwrappers-statd || true + db_stop + fi ;; esac diff --git a/debian/nfs-common.postrm b/debian/nfs-common.postrm index ff64e77..005c928 100755 --- a/debian/nfs-common.postrm +++ b/debian/nfs-common.postrm @@ -5,5 +5,9 @@ case "$1" in purge) update-rc.d nfs-common remove >/dev/null + + rm -f /var/lib/nfs/state \ + /var/lib/nfs/sm/* \ + /var/lib/nfs/sm.bak/* ;; esac diff --git a/debian/nfs-common.templates b/debian/nfs-common.templates deleted file mode 100644 index 91f67f7..0000000 --- a/debian/nfs-common.templates +++ /dev/null @@ -1,5 +0,0 @@ -Template: nfs-common/tcpwrappers-statd -Type: note -_Description: statd uses tcpwrappers - The statd daemon uses tcpwrappers to control access. To configure it, use - program name "statd" in /etc/hosts.allow and /etc/hosts.deny. diff --git a/debian/nfs-kernel-server.NEWS b/debian/nfs-kernel-server.NEWS new file mode 100644 index 0000000..dcea315 --- /dev/null +++ b/debian/nfs-kernel-server.NEWS @@ -0,0 +1,8 @@ +nfs-utils (1:1.0.1-1) unstable; urgency=low + + * Exports default to "sync", that is, synchronous writes. + This is safer but MUCH SLOWER than the old default of "async". + All exports should be marked as either "sync" or "async" to + avoid a warning from exportfs. + + -- Chip Salzenberg Mon, 26 Aug 2002 12:17:57 -0400 diff --git a/debian/nfs-kernel-server.conffiles b/debian/nfs-kernel-server.conffiles index bb8c385..78db655 100644 --- a/debian/nfs-kernel-server.conffiles +++ b/debian/nfs-kernel-server.conffiles @@ -1,2 +1,3 @@ +/etc/exports /etc/default/nfs-kernel-server /etc/init.d/nfs-kernel-server diff --git a/debian/nfs-kernel-server.postinst b/debian/nfs-kernel-server.postinst index 4bef322..fa43e13 100755 --- a/debian/nfs-kernel-server.postinst +++ b/debian/nfs-kernel-server.postinst @@ -2,36 +2,26 @@ #DEBHELPER# -. /usr/share/debconf/confmodule - case "$1" in configure) - db_get nfs-kernel-server/tcpwrappers-mountd || true + for f in /var/lib/nfs/etab \ + /var/lib/nfs/rmtab \ + /var/lib/nfs/xtab; do + [ -e $f ] || touch $f + done - touch /var/lib/nfs/etab \ - /var/lib/nfs/rmtab \ - /var/lib/nfs/xtab + update-rc.d nfs-kernel-server defaults 20 80 >/dev/null - if test -s /etc/exports - then - : do nothing - else - cat </etc/exports -# /etc/exports: the access control list for filesystems which may be exported -# to NFS clients. See exports(5). -EOF + # Remove obsolete debconf questions + if [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_unregister nfs-kernel-server/sync-default || true + db_unregister nfs-kernel-server/tcpwrappers-mountd || true + db_stop fi - - # The old nfs-server's init script can't tell that it's been - # removed, so we have to kill the symlinks to it. - update-rc.d -f nfs-server remove >/dev/null - - update-rc.d nfs-kernel-server defaults 20 80 >/dev/null ;; esac -db_stop - act="restart" [ "$1:$2" = "configure:" ] && act="start" invoke-rc.d nfs-kernel-server $act diff --git a/debian/nfs-kernel-server.postrm b/debian/nfs-kernel-server.postrm index a326cd3..6ee42b7 100755 --- a/debian/nfs-kernel-server.postrm +++ b/debian/nfs-kernel-server.postrm @@ -5,6 +5,10 @@ case "$1" in purge) update-rc.d nfs-kernel-server remove >/dev/null + + rm -f /var/lib/nfs/etab \ + /var/lib/nfs/rmtab \ + /var/lib/nfs/xtab ;; esac diff --git a/debian/nfs-kernel-server.templates b/debian/nfs-kernel-server.templates deleted file mode 100644 index 85d86e4..0000000 --- a/debian/nfs-kernel-server.templates +++ /dev/null @@ -1,17 +0,0 @@ -Template: nfs-kernel-server/sync-default -Type: note -_Description: NFS server defaults to synchronous writes - To comply with standards and increase data safety, the Linux NFS server - now defaults to synchronous writes. Since this is a major change, it is - not silent: All exports should be explicitly marked as either "sync" or - "async". Exports not so marked will elicit warnings. - -Template: nfs-kernel-server/tcpwrappers-mountd -Type: note -_Description: in /etc/hosts.{allow,deny}, replace "rpc.mountd" with "mountd" - The mount daemon uses tcpwrappers to control access. To configure it, use - program name "mountd" in /etc/hosts.allow and /etc/hosts.deny. - . - Older versions of nfs-kernel-server included a mount daemon that called - itself "rpc.mountd". Therefore, you should replace all occurrences of - "rpc.mountd" with "mountd" in /etc/hosts.allow and /etc/hosts.deny. diff --git a/debian/rules b/debian/rules index 344bf6e..e2bb39c 100755 --- a/debian/rules +++ b/debian/rules @@ -51,7 +51,8 @@ binary-arch: build done; \ rm -f tmp/usr/sbin/*quota*; \ rm -f tmp/usr/share/man/man8/*quota*; \ - rm -rf tmp/var/lib/nfs/* + rm -rf tmp/var/lib/nfs/*; \ + cp --preserve=timestamps etc.exports tmp/etc/exports # Fixups End Here # dh_installdocs -A README dh_installexamples