File: preinst

package info (click to toggle)
ipmasq 3.4.4
  • links: PTS
  • area: main
  • in suites: potato
  • size: 300 kB
  • ctags: 3
  • sloc: sh: 281; makefile: 48
file content (35 lines) | stat: -rw-r--r-- 1,134 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
#!/bin/bash -e

if [ "$1" = "install" -o "$1" = "upgrade" ]; then
    case $2 in
    3.[123]*)    # version 3.1.0 - 3.3.5
	echo "The rules files located in /etc/ipmasq/rules have been placed under"
	echo "package manager control as of version 3.4.0.  It is safe (and"
	echo "recommended) to allow dpkg to replace your version."
	echo
	echo -n "Press ENTER to continue."
	read dummy
	;;
    esac

    case $2 in
    3.[123]*|3.4.[0123])	#version 3.1.0 - 3.4.3
        echo "The rules files I50external.def and O50external.def have changed"
	echo "position to I90external.def and O90external.def, respectively."
	echo "May I move these rules files (and their corresponding .rul files)"
	echo -n "to their new positions? [Y/n] "
	read externalmove
	case $externalmove in
	    [Nn]*)	;;
	    *)		RULES=/etc/ipmasq/rules
	    		mv $RULES/I50external.def $RULES/I90external.def 2>/dev/null
			mv $RULES/I50external.rul $RULES/I90external.rul 2>/dev/null || true
	    		mv $RULES/O50external.def $RULES/O90external.def 2>/dev/null
			mv $RULES/O50external.rul $RULES/O90external.rul 2>/dev/null || true
			;;
	esac
    esac
fi

#DEBHELPER#