File: prerm

package info (click to toggle)
modutils 2.3.11-13.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,156 kB
  • ctags: 1,038
  • sloc: ansic: 10,567; sh: 2,120; lex: 484; makefile: 479; yacc: 362
file content (35 lines) | stat: -rw-r--r-- 792 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/sh -e
# pre remove script for the Debian GNU/Linux modutils package

set -e

pkg=modutils

if [ ! \( "$1" = "upgrade" -o "$1" = "remove" \) ]; then
	exit 0
fi

# Do the FHS-documentation-symlink-trick
if [ -L /usr/doc/$pkg ]; then
	rm -f /usr/doc/$pkg
fi


if [ "$1" = "remove" ]; then
	if [ -f /proc/modules ] ; then
		echo "WARNING: Kernel was compiled with modules support!"
		echo "Removing the modutils package could result in an unusable"
		echo "system if you use modules. Remove this package only if you"
		echo "are really sure of what you are doing."
		echo ""
		echo -n "If you really want to remove modutils type 'yes': "
		read ANSWER
		if [ "$ANSWER" != "yes" ]; then
			echo "Aborting removal of modutils package"
			exit 1
		fi
	fi
fi

/etc/init.d/kerneld stop
exit 0