File: postinst

package info (click to toggle)
bridge 0.1-7
  • links: PTS
  • area: main
  • in suites: potato
  • size: 104 kB
  • ctags: 14
  • sloc: ansic: 188; sh: 63; makefile: 53
file content (45 lines) | stat: -rw-r--r-- 1,189 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
#!/bin/sh

set -e

case $1 in
	abort*) exit 0
		;;
	install*)
echo ""
echo "BEWARE : Please know what you are doing here. Running"
echo "the bridge without knowing what is going on on your Network and this"
echo "Machine might spell desaster for the people hooked up to those networks"
echo "and might cause trouble for this machine connecting to the networks!"
echo ""
echo "You must have your kernel compiled for bridging operations!"
echo ""
echo "The DEFAULT CONFIGURATION is to bridge between eth0 and eth1."
echo "If that is what you want then you can start the bridge now otherwise"
echo "read the documentation in /usr/doc/bridge and start manually."
echo ""
echo -n "Start the Bridge on bootup (N/y) ?"
read ANS

if [ ANS = "y" ]; then
update-rc.d bridge defaults >/dev/null
echo "Bridge startup on boot enabled."
else
echo "Bridge will not automatically startup on boot"
echo "Start bridge manually  with /etc/init.d/bridge start"
fi

echo -n "Start the Bridge now (N/y) ?"
read ANS
if [ $ANS = "y" ]; then
/etc/init.d/bridge start
echo "Bridge started"
else
echo "Bridge can be started now with /etc/init.d/bridge start."
fi

		;;
	upgrade*)	/etc/init.d/bridge start
		;;
esac