File: fixwrappers

package info (click to toggle)
diald 0.99.4-5
  • links: PTS
  • area: main
  • in suites: sarge, woody
  • size: 1,076 kB
  • ctags: 936
  • sloc: ansic: 7,109; tcl: 977; sh: 891; perl: 306; makefile: 110
file content (39 lines) | stat: -rwxr-xr-x 841 bytes parent folder | download | duplicates (3)
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
#!/bin/sh

if [ ! -r /usr/lib/libwrap.a ]; then
	exit 0
fi

x=`ar t /usr/lib/libwrap.a setenv.o 2> /dev/null`
if [ "$x" = 'setenv.o' ]; then
	echo
	echo "HANG ON..."
	echo
	echo "Your tcp_wrappers library contains an implementation of"
	echo "setenv(3) which is not needed and which may cause problems"
	echo "with programs which inadvertantly use this instead of the"
	echo "implementation in libc."
	echo
	echo "Do you wish to remove the version from your tcp_wrappers lib?"
	echo "Please enter Y or N"
	while read x; do
		case "$x" in
			Y*|y*)
				ar d /usr/lib/libwrap.a setenv.o
				if [ $? -eq 0 ]; then
					echo "Removed successfully"
					exit 0
				fi
				echo "Removal failed."
				exit 1
				;;
			N*|n*)
				echo "Ok. It is still there. Good luck."
				exit 0
				;;
			*)
				echo "Please enter Y or N"
				;;
		esac
	done
fi