From: chip Date: Mon, 16 Sep 2002 01:56:32 +0000 (+0000) Subject: * Start nfs-common after nfs-kernel-server so that the server is running X-Git-Tag: nfs-utils-1-0-2-pre4~10 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=e2d471f26fe47530d1d8fee9fdf1330203d458bc * Start nfs-common after nfs-kernel-server so that the server is running when statd restarts. In postinst, remove bad rc.d links from old packages. From Philippe Troin . (closes: #160800) * Make init scripts exit with non-zero status when daemons don't start. * Add titles to templates where I forgot them. (closes: #158489) * Add /etc/default/{nfs-common,nfs-kernel-server} so setting random parameters doesn't require editing init scripts. (closes: #131539) * Split templates into separate files, and add French templates. (closes: #134630) * Use invoke-rc.d to avoid premature daemon starts. (closes: 158574) * Change priority of nfs-kernel-server to 'optional'. --- diff --git a/debian/changelog b/debian/changelog index ce71df2..1954f30 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +nfs-utils (1:1.0.2-1) unstable; urgency=low + + * New upstream version: + > Allow program stdin to be a non-INET socket. (closes: #142557) + * Start nfs-common after nfs-kernel-server so that the server is running + when statd restarts. In postinst, remove bad rc.d links from old + packages. From Philippe Troin . (closes: #160800) + * Make init scripts exit with non-zero status when daemons don't start. + * Add titles to templates where I forgot them. (closes: #158489) + * Add /etc/default/{nfs-common,nfs-kernel-server} so setting random + parameters doesn't require editing init scripts. (closes: #131539) + * Split templates into separate files, and add French templates. + (closes: #134630) + * Use invoke-rc.d to avoid premature daemon starts. (closes: 158574) + * Change priority of nfs-kernel-server to 'optional'. + + -- + nfs-utils (1:1.0.1-1) unstable; urgency=low * New upstream version: diff --git a/debian/control b/debian/control index 7878935..8b46a68 100644 --- a/debian/control +++ b/debian/control @@ -6,6 +6,7 @@ Build-Depends: debhelper, libwrap0-dev Standards-Version: 3.1.1.1 Package: nfs-kernel-server +Priority: optional Architecture: any Depends: debconf (>= 1.0), nfs-common (>= 1:0.3.3-3), ${shlibs:Depends} Provides: knfs, nfs-server diff --git a/debian/nfs-common.conffiles b/debian/nfs-common.conffiles index 7ad0f45..1e04e55 100644 --- a/debian/nfs-common.conffiles +++ b/debian/nfs-common.conffiles @@ -1 +1,2 @@ +/etc/default/nfs-common /etc/init.d/nfs-common diff --git a/debian/nfs-common.default b/debian/nfs-common.default new file mode 100644 index 0000000..664c2e7 --- /dev/null +++ b/debian/nfs-common.default @@ -0,0 +1,8 @@ +# Options for rpc.statd. +# Should rpc.statd listen on a specific port? +# If so, set this variable to a statd argument like: "--port 1000". +STATDOPTS= + +# Are you _sure_ that your kernel does or does not need a lockd daemon? +# If so, set this variable to either "yes" or "no". +NEED_LOCKD= diff --git a/debian/nfs-common.init b/debian/nfs-common.init index 2ae17b3..f6c4a8a 100755 --- a/debian/nfs-common.init +++ b/debian/nfs-common.init @@ -9,26 +9,36 @@ # locking functionality. # -PREFIX= +set -e -# Should rpc.statd listen on a specific port? -# If so, set this variable to a statd argument like: "--port 1000". -STATDPORT="" +# What is this? +DESC="NFS common utilities" -NEED_LOCKD=yes -if test -f /proc/ksyms -then - # We need to be conservative and run lockd, - # unless we can prove that it isn't required. - grep -q lockdctl /proc/ksyms || NEED_LOCKD=no +# Read config +DEFAULTFILE=/etc/default/nfs-common +PREFIX= +NEED_LOCKD= +if [ -f $DEFAULTFILE ]; then + . $DEFAULTFILE fi +# Determine whether lockd is required +case "$NEED_LOCKD" in +yes|no) ;; +*) # We must be conservative and run lockd, + # unless we can prove that it's not required. + NEED_LOCKD=yes + if test -f /proc/ksyms + then + grep -q lockdctl /proc/ksyms || NEED_LOCKD=no + fi + ;; +esac + +# Exit if required binaries are missing. [ -x $PREFIX/sbin/rpc.statd ] || exit 0 [ -x $PREFIX/sbin/rpc.lockd ] || [ "$NEED_LOCKD" = no ] || exit 0 -# What is this? -DESC="NFS common utilities" - # See how we were called. case "$1" in start) @@ -36,12 +46,12 @@ case "$1" in printf "Starting $DESC:" printf " statd" start-stop-daemon --start --quiet \ - --exec $PREFIX/sbin/rpc.statd -- $STATDPORT + --exec $PREFIX/sbin/rpc.statd -- $STATDOPTS if [ "$NEED_LOCKD" = yes ] then printf " lockd" start-stop-daemon --start --quiet \ - --exec $PREFIX/sbin/rpc.lockd + --exec $PREFIX/sbin/rpc.lockd || true fi echo "." ;; @@ -52,7 +62,7 @@ case "$1" in then printf " lockd" start-stop-daemon --stop --oknodo --quiet \ - --name rpc.lockd --user 0 + --name rpc.lockd --user 0 || true fi printf " statd" start-stop-daemon --stop --oknodo --quiet \ diff --git a/debian/nfs-common.postinst b/debian/nfs-common.postinst index 37eba1a..0b9e3bd 100755 --- a/debian/nfs-common.postinst +++ b/debian/nfs-common.postinst @@ -4,10 +4,17 @@ case "$1" in configure) - update-rc.d nfs-common defaults 19 81 >/dev/null + if [ "$2" != "" -a "$2" != "" ] \ + && dpkg --compare-versions "$2" lt "1:1.0-3" \ + || ( dpkg --compare-versions "$2" ge "1:1.0.1" \ + && dpkg --compare-versions "$2" lt "1:1.0.2-1" ) + then + update-rc.d -f nfs-common-remove >/dev/null + fi + update-rc.d nfs-common defaults 21 79 >/dev/null ;; esac act="restart" [ "$1:$2" = "configure:" ] && act="start" -/etc/init.d/nfs-common $act +invoke-rc.d nfs-common $act diff --git a/debian/nfs-common.templates b/debian/nfs-common.templates index fe11b12..8780993 100644 --- a/debian/nfs-common.templates +++ b/debian/nfs-common.templates @@ -3,11 +3,3 @@ 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. -Description-de: statd benutzt tcpwrappers - Der statd-Daemon benutzt tcpwrappers für die Zugriffskontrolle. Um - diesen zu konfigurieren, benutzen Sie den Namen "statd" in den Dateien - /etc/hosts.allow und /etc/hosts.deny. -Description-ru: statd ÉÓÐÏÌØÚÕÅÔ tcp-×ÒÁÐÐÅÒÙ - äÅÍÏÎ statd ÉÓÐÏÌØÚÕÅÔ tcp-×ÒÁÐÐÅÒÙ ÄÌÑ ÕÐÒÁ×ÌÅÎÉÑ ÄÏÓÔÕÐÏÍ. þÔÏÂÙ - ÎÁÓÔÒÏÉÔØ ×ÒÁÐÐÅÒ, ÉÓÐÏÌØÚÕÊÔÅ ÉÍÑ ÐÒÏÇÒÁÍÍÙ "statd" × ÆÁÊÌÁÈ - /etc/hosts.allow É /etc/hosts.deny. diff --git a/debian/nfs-common.templates.de b/debian/nfs-common.templates.de new file mode 100644 index 0000000..5046bfa --- /dev/null +++ b/debian/nfs-common.templates.de @@ -0,0 +1,9 @@ +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. +Description-de: statd benutzt tcpwrappers + Der statd-Daemon benutzt tcpwrappers für die Zugriffskontrolle. Um + diesen zu konfigurieren, benutzen Sie den Namen "statd" in den Dateien + /etc/hosts.allow und /etc/hosts.deny. diff --git a/debian/nfs-common.templates.fr b/debian/nfs-common.templates.fr new file mode 100644 index 0000000..d2b72f0 --- /dev/null +++ b/debian/nfs-common.templates.fr @@ -0,0 +1,9 @@ +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. +Description-fr: statd utilise tcpwrapper + Le programme statd fonctionne avec tcpwrapper pour le contrôle d'accès. + Utilisez le nom de programme « statd » dans /etc/hosts.allow et + /etc/hosts.deny pour changer ce contrôle d'accès. diff --git a/debian/nfs-common.templates.ru b/debian/nfs-common.templates.ru new file mode 100644 index 0000000..bbbcae8 --- /dev/null +++ b/debian/nfs-common.templates.ru @@ -0,0 +1,9 @@ +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. +Description-ru: statd ÉÓÐÏÌØÚÕÅÔ tcp-×ÒÁÐÐÅÒÙ + äÅÍÏÎ statd ÉÓÐÏÌØÚÕÅÔ tcp-×ÒÁÐÐÅÒÙ ÄÌÑ ÕÐÒÁ×ÌÅÎÉÑ ÄÏÓÔÕÐÏÍ. þÔÏÂÙ + ÎÁÓÔÒÏÉÔØ ×ÒÁÐÐÅÒ, ÉÓÐÏÌØÚÕÊÔÅ ÉÍÑ ÐÒÏÇÒÁÍÍÙ "statd" × ÆÁÊÌÁÈ + /etc/hosts.allow É /etc/hosts.deny. diff --git a/debian/nfs-kernel-server.conffiles b/debian/nfs-kernel-server.conffiles index 804d5da..bb8c385 100644 --- a/debian/nfs-kernel-server.conffiles +++ b/debian/nfs-kernel-server.conffiles @@ -1 +1,2 @@ +/etc/default/nfs-kernel-server /etc/init.d/nfs-kernel-server diff --git a/debian/nfs-kernel-server.default b/debian/nfs-kernel-server.default new file mode 100644 index 0000000..4c6110b --- /dev/null +++ b/debian/nfs-kernel-server.default @@ -0,0 +1,5 @@ +# Number of servers to start up +RPCNFSDCOUNT=8 + +# Options for rpc.mountd +RPCMOUNTDOPTS= diff --git a/debian/nfs-kernel-server.init b/debian/nfs-kernel-server.init index 548b5e0..0fa19bb 100755 --- a/debian/nfs-kernel-server.init +++ b/debian/nfs-kernel-server.init @@ -10,16 +10,24 @@ # which is configured via the /etc/exports file. # +set -e + +# What is this? +DESC="NFS kernel daemon" PREFIX=/usr + +# Exit if required binaries are missing. [ -x $PREFIX/sbin/rpc.nfsd ] || exit 0 [ -x $PREFIX/sbin/rpc.mountd ] || exit 0 [ -x $PREFIX/sbin/exportfs ] || exit 0 -# What is this? -DESC="NFS kernel daemon" - -RPCNFSDCOUNT=8 # Number of servers to be started up by default +# Read config +DEFAULTFILE=/etc/default/nfs-kernel-server +RPCNFSDCOUNT=8 RPCMOUNTDOPTS= +if [ -f $DEFAULTFILE ]; then + . $DEFAULTFILE +fi # See how we were called. case "$1" in @@ -79,4 +87,3 @@ case "$1" in esac exit 0 - diff --git a/debian/nfs-kernel-server.postinst b/debian/nfs-kernel-server.postinst index 1f1e039..4bef322 100755 --- a/debian/nfs-kernel-server.postinst +++ b/debian/nfs-kernel-server.postinst @@ -34,4 +34,4 @@ db_stop act="restart" [ "$1:$2" = "configure:" ] && act="start" -/etc/init.d/nfs-kernel-server $act +invoke-rc.d nfs-kernel-server $act diff --git a/debian/nfs-kernel-server.templates b/debian/nfs-kernel-server.templates index 9596aa2..fb7f632 100644 --- a/debian/nfs-kernel-server.templates +++ b/debian/nfs-kernel-server.templates @@ -1,10 +1,10 @@ Template: nfs-kernel-server/sync-default Type: note -Description: 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. +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 @@ -16,19 +16,3 @@ Description: in /etc/hosts.{allow,deny}, replace "rpc.mountd" with "mountd" called itself "rpc.mountd". Therefore, you should replace all occurrences of "rpc.mountd" with "mountd" in /etc/hosts.allow and /etc/hosts.deny. -Description-de: "rpc.mountd" mit "mountd" in /etc/hosts.{allow,deny} ersetzen - =C4ltere Versionen von nfs-kernel-server enthalten einen Mount-daemon, - der als "rpc.mountd" bezeichnet wird. Der aktuelle Daemon wird jedoch - nur noch "mountd" genannt. - . - Deshalb sollten Sie alle Referenzen zu "rpc.mountd" in den Dateien - /etc/hosts.allow und /etc/hosts.deny mit "mountd" ersetzen. -Description-ru: úÁÍÅÎÉÔÅ × /etc/hosts.{allow,deny} "rpc.mountd" ÎÁ "mountd" - äÅÍÏÎ ÍÏÎÔÉÒÏ×ÁÎÉÑ ÉÓÐÏÌØÚÕÅÔ ÄÌÑ ÕÐÒÁ×ÌÅÎÉÑ ÄÏÓÔÕÐÏÍ tcp-×ÒÁÐÐÅÒÙ. - þÔÏÂÙ ÉÈ ÎÁÓÔÒÏÉÔØ, ÉÓÐÏÌØÚÕÊÔÅ ÉÍÑ "mountd" × /etc/hosts.allow É - /etc/hosts.deny. - . - âÏÌÅÅ ÓÔÁÒÙÅ ×ÅÒÓÉÉ nfs-kernel-server ×ËÌÀÞÁÌÉ ÄÅÍÏÎ ÍÏÎÔÉÒÏ×ÁÎÉÑ, - ËÏÔÏÒÙÊ ÎÁÚÙ×ÁÌ ÓÅÂÑ "rpc.mountd". ðÏÜÔÏÍÕ, ×Ù ÄÏÌÖÎÙ ÚÁÍÅÎÉÔØ ×ÓÅ - ×ÈÏÖÄÅÎÉÑ "rpc.mountd" ÎÁ "mountd" × ÆÁÊÌÁÈ /etc/hosts.allow É - /etc/hosts.deny. diff --git a/debian/nfs-kernel-server.templates.de b/debian/nfs-kernel-server.templates.de new file mode 100644 index 0000000..f0e2654 --- /dev/null +++ b/debian/nfs-kernel-server.templates.de @@ -0,0 +1,17 @@ +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. +Description-de: "rpc.mountd" mit "mountd" in /etc/hosts.{allow,deny} ersetzen + =C4ltere Versionen von nfs-kernel-server enthalten einen Mount-daemon, + der als "rpc.mountd" bezeichnet wird. Der aktuelle Daemon wird jedoch + nur noch "mountd" genannt. + . + Deshalb sollten Sie alle Referenzen zu "rpc.mountd" in den Dateien + /etc/hosts.allow und /etc/hosts.deny mit "mountd" ersetzen. diff --git a/debian/nfs-kernel-server.templates.fr b/debian/nfs-kernel-server.templates.fr new file mode 100644 index 0000000..77f03d3 --- /dev/null +++ b/debian/nfs-kernel-server.templates.fr @@ -0,0 +1,18 @@ +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 "mount" 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. +Description-fr: Remplacez rpc.mountd par mountd dans /etc/hosts.{allow,deny} + Le programme mount fonctionne avec tcpwrapper pour le contrôle d'accès. + Utilisez le nom de programme « mount » dans /etc/hosts.allow et + /etc/hosts.deny pour changer ce contrôle d'accès. + . + Les versions précédentes de nfs-kernel-server avaient un programme + mount qui s'identifiait comme « rpc.mountd ». Par conséquent, vous + devriez remplacer partout « rpc.mountd » par « mountd » dans + /etc/hosts.allow et /etc/hosts.deny. diff --git a/debian/nfs-kernel-server.templates.ru b/debian/nfs-kernel-server.templates.ru new file mode 100644 index 0000000..ba15314 --- /dev/null +++ b/debian/nfs-kernel-server.templates.ru @@ -0,0 +1,19 @@ +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. +Description-ru: úÁÍÅÎÉÔÅ × /etc/hosts.{allow,deny} "rpc.mountd" ÎÁ "mountd" + äÅÍÏÎ ÍÏÎÔÉÒÏ×ÁÎÉÑ ÉÓÐÏÌØÚÕÅÔ ÄÌÑ ÕÐÒÁ×ÌÅÎÉÑ ÄÏÓÔÕÐÏÍ tcp-×ÒÁÐÐÅÒÙ. + þÔÏÂÙ ÉÈ ÎÁÓÔÒÏÉÔØ, ÉÓÐÏÌØÚÕÊÔÅ ÉÍÑ "mountd" × /etc/hosts.allow É + /etc/hosts.deny. + . + âÏÌÅÅ ÓÔÁÒÙÅ ×ÅÒÓÉÉ nfs-kernel-server ×ËÌÀÞÁÌÉ ÄÅÍÏÎ ÍÏÎÔÉÒÏ×ÁÎÉÑ, + ËÏÔÏÒÙÊ ÎÁÚÙ×ÁÌ ÓÅÂÑ "rpc.mountd". ðÏÜÔÏÍÕ, ×Ù ÄÏÌÖÎÙ ÚÁÍÅÎÉÔØ ×ÓÅ + ×ÈÏÖÄÅÎÉÑ "rpc.mountd" ÎÁ "mountd" × ÆÁÊÌÁÈ /etc/hosts.allow É + /etc/hosts.deny.