File: diskless.preinst

package info (click to toggle)
diskless 0.3.6
  • links: PTS
  • area: main
  • in suites: potato
  • size: 460 kB
  • ctags: 111
  • sloc: perl: 2,467; sh: 375; makefile: 104
file content (46 lines) | stat: -rw-r--r-- 897 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#! /bin/sh

warn() {
	cat <<@EOF

              DISKLESS 1.3 INSTALLATION WARNING

You are upgrading squid from an $1 version to the 1.3 version. The $1
and 1.3 versions are NOT compatible. The structure of the diskless
images is completely different. In particular, the /usr directory can no
longer be shared with the NFS server.

If you have old diskless images, then they can continue to operate on
the computer. However, it will be impossible to update them using this
version of diskless. You should be able to downgrade to the previous
version at any time.

If this is not acceptable, then please quit now.
@EOF
	echo -n "QUIT NOW? [Y/n] "
	read ans
	case "$ans" in
		n*|N*)
			;;
		*)
			exit 1
			;;
	esac
}

#
# See if we upgraded from 1.0 or 1.1
#
if [ "$1" = upgrade ] || [ "$1" = install ]
then
	case "$2" in
		1.0.*)
			warn 1.0
			;;
		1.1.*)
			warn 1.1
			;;
	esac
fi

#DEBHELPER#