File: nfs-kernel-server.preinst

package info (click to toggle)
nfs-utils 1%3A2.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 7,276 kB
  • sloc: ansic: 52,182; sh: 5,371; python: 2,151; makefile: 971
file content (18 lines) | stat: -rw-r--r-- 467 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

set -e

if [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt 1:2.6.4-6~; then
    # These files are local state but were wrongly shipped as empty
    # files in older versions.  On upgrade from an older version dpkg
    # will remove them.  Create protective links so we can at least
    # restore them in postinst.
    for f in /var/lib/nfs/etab  \
	     /var/lib/nfs/rmtab; do
	if [ -f "$f" ]; then
	    ln "$f" "$f.bak"
	fi
    done
fi

#DEBHELPER#