summaryrefslogtreecommitdiff
path: root/extra/rc-update.sh
blob: 427b960313902ca96b3e54f83869d29d9cb2f3af (plain)
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
47
48
49
#!/bin/sh

# vdr-installer fuer kanotix 
# von Marc Wernecke - 14.02.2006
# kanotix gibt es bei http://www.kanotix.com
#

if [ $# -eq 0 ] ; then 
echo "this script needs a command..." 
echo "possible commands are..."
echo "remove"
echo "defaults"
exit 
fi

unfreeze-rc.d 

case $1 in
  install )
	if [ -f /etc/init.d/samba ] ; then update-rc.d samba defaults 50 ; fi
  ;;

  remove )
	/etc/init.d/cupsys stop
	update-rc.d -f cupsys remove
	/etc/init.d/courier-authdaemon stop
	update-rc.d -f courier-authdaemon remove
	/etc/init.d/courier-mta stop
	update-rc.d -f courier-mta remove
	/etc/init.d/ppp stop
	update-rc.d -f ppp remove
  ;;
  defaults )
	if [ -f /etc/init.d/cupsys ] ; then update-rc.d cupsys defaults 20 ; fi
	if [ -f /etc/init.d/courier-authdaemon ] ; then update-rc.d courier-authdaemon defaults 20 ; fi
	if [ -f /etc/init.d/courier-mta ] ; then update-rc.d courier-mta defaults 20 ; fi
	if [ -f /etc/init.d/ppp ] ; then update-rc.d ppp defaults 14 ; fi
  ;;
  * ) 
	echo "\"$1\" - command not found"
	echo "possible commands are..."
	echo "remove"
	echo "defaults"
  ;;
esac

freeze-rc.d 

exit 0