nfs-utils-1.1.4-2-i686
authorMiklos Vajna <vmiklos@frugalware.org>
Mon, 9 Mar 2009 09:29:23 +0000 (10:29 +0100)
committerMiklos Vajna <vmiklos@frugalware.org>
Mon, 9 Mar 2009 09:29:23 +0000 (10:29 +0100)
- depend on quota-tools
- fails with a reasonable error message when:
  * portmap is not running
  * exports does not exist
  * exports is empty
- closes #3666

source/network/nfs-utils/FrugalBuild
source/network/nfs-utils/rc.nfsd

index 11efbf2..372ba42 100644 (file)
@@ -3,7 +3,7 @@
 
 pkgname=nfs-utils
 pkgver=1.1.4
-pkgrel=1
+pkgrel=2
 pkgdesc="Support programs for Network File Systems"
 groups=('network')
 archs=('i686' 'x86_64' 'ppc')
@@ -11,12 +11,12 @@ backup=(etc/exports etc/conf.d/nfsd etc/sysconfig/nfs)
 _F_sourceforge_dirname="nfs"
 _F_sourceforge_ext=".tar.bz2"
 Finclude sourceforge
-depends=('portmap' 'libnfsidmap>=0.21' 'libevent>=1.4.3')
+depends=('portmap' 'libnfsidmap>=0.21' 'libevent>=1.4.3' 'quota-tools')
 makedepends=('tcp_wrappers')
 source=($source exports rc.nfsd rc.nfsd-hu.po nfs)
 sha1sums=('560a063c681239b022f05e2c815402425ede01a6' \
           '02f887f84059e19d50d08295d6d0bc9d56312f65' \
-          '3cd64a99856e431ea71a9f436be3a79f027925b3' \
+          '6b9e078146c366f4218692814c0f8946599cfbdd' \
           'b28e6e7575dc08c3ee4a1b738e25c2f92daa4a62' \
           'c2753a21b4ddc5afadd958a0f36aee6320ff8b5a')
 
index 06b55df..0d579c9 100644 (file)
@@ -21,11 +21,17 @@ daemon=$"NFS services"
 rc_start()
 {
        start_msg
-       if [ ! -r /etc/exports ]; then
-               ok 1 # no config file
+       if [ -z "$(cat /var/run/portmap.pid 2>/dev/null)" ]; then
+               ok 1
+               hint $"Portmap is not running"
+               exit 1
+       elif [ ! -r /etc/exports ]; then
+               ok 1
+               hint $"Configuration file /etc/exports is not readable"
                exit 1
        elif ! fgrep '/' /etc/exports 1> /dev/null 2> /dev/null ; then
-               ok 1 # only comments
+               ok 1
+               hint $"Configuration file /etc/exports is empty"
                exit 1
        fi
        # load kernel module if necessary