~ubuntu-branches/ubuntu/hardy/nfs-utils/hardy-updates

« back to all changes in this revision

Viewing changes to debian/nfs-kernel-server.postinst

  • Committer: Bazaar Package Importer
  • Author(s): Nathaniel McCallum
  • Date: 2004-09-10 13:10:39 UTC
  • Revision ID: james.westby@ubuntu.com-20040910131039-qxfjx4pwgoz6imbv
Tags: upstream-1.0.6
ImportĀ upstreamĀ versionĀ 1.0.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
 
 
3
#DEBHELPER#
 
4
 
 
5
. /usr/share/debconf/confmodule
 
6
 
 
7
case "$1" in
 
8
    configure)
 
9
        db_get nfs-kernel-server/tcpwrappers-mountd || true
 
10
 
 
11
        touch /var/lib/nfs/etab  \
 
12
              /var/lib/nfs/rmtab \
 
13
              /var/lib/nfs/xtab
 
14
 
 
15
        if test -s /etc/exports
 
16
        then
 
17
            : do nothing
 
18
        else
 
19
            cat <<EOF >/etc/exports
 
20
# /etc/exports: the access control list for filesystems which may be exported
 
21
#               to NFS clients.  See exports(5).
 
22
EOF
 
23
        fi
 
24
 
 
25
        # The old nfs-server's init script can't tell that it's been
 
26
        # removed, so we have to kill the symlinks to it.
 
27
        update-rc.d -f nfs-server remove >/dev/null
 
28
 
 
29
        update-rc.d nfs-kernel-server defaults 20 80 >/dev/null
 
30
        ;;
 
31
esac
 
32
 
 
33
db_stop
 
34
 
 
35
act="restart"
 
36
[ "$1:$2" = "configure:" ] && act="start"
 
37
invoke-rc.d nfs-kernel-server $act