Snort scripts and config update.
[ipfire-2.x.git] / lfs / initscripts
1 ###############################################################################
2 #                                                                             #
3 # IPFire.org - A linux based firewall                                         #
4 # Copyright (C) 2009  Michael Tremer & Christian Schmidt                      #
5 #                                                                             #
6 # This program is free software: you can redistribute it and/or modify        #
7 # it under the terms of the GNU General Public License as published by        #
8 # the Free Software Foundation, either version 3 of the License, or           #
9 # (at your option) any later version.                                         #
10 #                                                                             #
11 # This program is distributed in the hope that it will be useful,             #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of              #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
14 # GNU General Public License for more details.                                #
15 #                                                                             #
16 # You should have received a copy of the GNU General Public License           #
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
18 #                                                                             #
19 ###############################################################################
20
21 ###############################################################################
22 # Definitions
23 ###############################################################################
24
25 include Config
26
27 VER = ipfire
28
29 THISAPP    = initscripts
30 DIR_APP    = $(DIR_SRC)/$(THISAPP)
31 TARGET     = $(DIR_INFO)/$(THISAPP)
32
33 ###############################################################################
34 # Top-level Rules
35 ###############################################################################
36
37 install : $(TARGET)
38
39 check :
40
41 download :
42
43 md5 :
44
45 ###############################################################################
46 # Installation Details
47 ###############################################################################
48
49 $(TARGET) :
50         @$(PREBUILD)
51         install -d -m 755 /etc/rc.d/rc0.d
52         install -d -m 755 /etc/rc.d/rc3.d
53         install -d -m 755 /etc/rc.d/rc6.d
54         install -d -m 755 /etc/rc.d/rcsysinit.d
55         install -d -m 755 /etc/rc.d/init.d
56         install -d -m 755 /etc/rc.d/init.d/networking
57         install -d -m 755 /etc/rc.d/init.d/networking/red.up
58         install -d -m 755 /etc/rc.d/init.d/networking/red.down
59         install -d -m 755 /etc/rc.d/helper
60         install -d -m 755 /etc/sysconfig
61         -rm -rf /etc/init.d
62         ln -svf rc.d/init.d /etc/init.d
63
64         for i in $(DIR_SRC)/src/initscripts/init.d/*; do \
65                 install -v -m 754 $$i /etc/rc.d/init.d/; \
66         done
67         chmod 644 /etc/rc.d/init.d/functions
68
69         for i in $(DIR_SRC)/src/initscripts/init.d/networking/*; do \
70                 if [ -f $$i ]; then \
71                         install -v -m 754 $$i /etc/rc.d/init.d/networking/; \
72                 fi; \
73         done
74
75         for i in $(DIR_SRC)/src/initscripts/init.d/networking/red.up/*; do \
76                 install -v -m 754 $$i /etc/rc.d/init.d/networking/red.up/; \
77         done
78
79         for i in $(DIR_SRC)/src/initscripts/init.d/networking/red.down/*; do \
80                 install -v -m 754 $$i /etc/rc.d/init.d/networking/red.down/; \
81         done
82
83         for i in $(DIR_SRC)/src/initscripts/sysconfig/*; do \
84                 install -v -m 644 $$i /etc/sysconfig/; \
85         done
86         chmod -v 755 /etc/sysconfig/{firewall,rc}.local
87
88         for i in $(DIR_SRC)/src/initscripts/helper/*; do \
89                 install -v -m 755 $$i /etc/rc.d/helper/; \
90         done
91
92         ln -sf ../init.d/sysklogd    /etc/rc.d/rc0.d/K90sysklogd
93         ln -sf ../init.d/sendsignals /etc/rc.d/rc0.d/S60sendsignals
94         ln -sf ../init.d/localnet    /etc/rc.d/rc0.d/S70localnet
95         ln -sf ../init.d/mountfs     /etc/rc.d/rc0.d/S80mountfs
96         ln -sf ../init.d/swap        /etc/rc.d/rc0.d/S90swap
97         ln -sf ../init.d/halt        /etc/rc.d/rc0.d/S99halt
98         ln -sf ../init.d/sysklogd    /etc/rc.d/rc3.d/S10sysklogd
99         ln -sf ../init.d/smartenabler /etc/rc.d/rc3.d/S19smartenabler
100         ln -sf ../init.d/messagebus  /etc/rc.d/rc3.d/S15messagebus
101         ln -sf ../init.d/messagebus  /etc/rc.d/rc0.d/K85messagebus
102         ln -sf ../init.d/messagebus  /etc/rc.d/rc6.d/K85messagebus
103         ln -sf ../init.d/bluetooth   /etc/rc.d/rc3.d/S16bluetooth
104         ln -sf ../init.d/bluetooth   /etc/rc.d/rc0.d/K84bluetooth
105         ln -sf ../init.d/bluetooth   /etc/rc.d/rc6.d/K84bluetooth
106         ln -sf ../init.d/cpufreq     /etc/rc.d/rc3.d/S18cpufreq
107         ln -sf ../init.d/sysklogd    /etc/rc.d/rc6.d/K90sysklogd
108         ln -sf ../init.d/sendsignals /etc/rc.d/rc6.d/S60sendsignals
109         ln -sf ../init.d/mountfs     /etc/rc.d/rc6.d/S70mountfs
110         ln -sf ../init.d/swap        /etc/rc.d/rc6.d/S80swap
111         ln -sf ../init.d/localnet    /etc/rc.d/rc6.d/S90localnet
112         ln -sf ../init.d/reboot      /etc/rc.d/rc6.d/S99reboot
113         ln -sf ../init.d/sshd        /etc/rc.d/rc0.d/K30sshd
114         ln -sf ../init.d/sshd        /etc/rc.d/rc3.d/S30sshd
115         ln -sf ../init.d/sshd        /etc/rc.d/rc6.d/K30sshd
116         ln -sf ../init.d/apache      /etc/rc.d/rc0.d/K28apache
117         ln -sf ../init.d/apache      /etc/rc.d/rc3.d/S32apache
118         ln -sf ../init.d/apache      /etc/rc.d/rc6.d/K28apache
119         ln -sf ../init.d/fcron       /etc/rc.d/rc0.d/K08fcron
120         ln -sf ../init.d/fcron       /etc/rc.d/rc3.d/S40fcron
121         ln -sf ../init.d/fcron       /etc/rc.d/rc6.d/K08fcron
122         ln -sf ../init.d/snort       /etc/rc.d/rc0.d/K78snort
123         ln -sf ../init.d/snort       /etc/rc.d/rc6.d/K78snort
124         ln -sf ../init.d/network     /etc/rc.d/rc0.d/K80network
125         ln -sf ../init.d/network     /etc/rc.d/rc3.d/S20network
126         ln -sf ../init.d/network     /etc/rc.d/rc6.d/K80network
127         ln -sf ../init.d/random      /etc/rc.d/rc0.d/K45random
128         ln -sf ../init.d/random      /etc/rc.d/rc3.d/S25random
129         ln -sf ../init.d/random      /etc/rc.d/rc6.d/K45random
130         ln -sf ../../sysconfig/rc.local /etc/rc.d/rc3.d/S98rc.local
131         ln -sf ../init.d/beep        /etc/rc.d/rc0.d/K99beep
132         ln -sf ../init.d/beep        /etc/rc.d/rc3.d/S99beep
133         ln -sf ../init.d/beep        /etc/rc.d/rc6.d/K99beep
134         ln -sf ../init.d/tmpfs       /etc/rc.d/rc0.d/K85tmpfs
135         ln -sf ../init.d/tmpfs       /etc/rc.d/rc3.d/S01tmpfs
136         ln -sf ../init.d/tmpfs       /etc/rc.d/rc6.d/K85tmpfs
137         ln -sf ../init.d/mediatomb   /etc/rc.d/rc3.d/S98mediatomb
138         ln -sf ../init.d/mediatomb   /etc/rc.d/rc0.d/K02mediatomb
139         ln -sf ../init.d/mediatomb   /etc/rc.d/rc6.d/K02mediatomb
140         ln -sf ../init.d/sslh        /etc/rc.d/rc3.d/S98sslh
141         ln -sf ../init.d/sslh        /etc/rc.d/rc0.d/K02sslh
142         ln -sf ../init.d/sslh        /etc/rc.d/rc6.d/K02sslh
143         ln -sf ../init.d/vdradmin    /etc/rc.d/rc3.d/S99vdradmin
144         ln -sf ../init.d/vdradmin    /etc/rc.d/rc0.d/K01vdradmin
145         ln -sf ../init.d/vdradmin    /etc/rc.d/rc6.d/K01vdradmin
146         ln -sf ../init.d/motion      /etc/rc.d/rc3.d/S99motion
147         ln -sf ../init.d/motion      /etc/rc.d/rc0.d/K01motion
148         ln -sf ../init.d/motion      /etc/rc.d/rc6.d/K01motion
149         ln -sf  ../init.d/cyrus-sasl /etc/rc.d/rc0.d/K49cyrus-sasl
150         ln -sf  ../init.d/cyrus-sasl /etc/rc.d/rc3.d/S24cyrus-sasl
151         ln -sf  ../init.d/cyrus-sasl /etc/rc.d/rc6.d/K49cyrus-sasl
152         ln -sf ../init.d/leds        /etc/rc.d/rc0.d/K79leds
153         ln -sf ../init.d/leds        /etc/rc.d/rc3.d/S21leds
154         ln -sf ../init.d/leds        /etc/rc.d/rc6.d/K79leds
155         ln -sf ../init.d/mountkernfs /etc/rc.d/rcsysinit.d/S00mountkernfs
156         ln -sf ../init.d/modules     /etc/rc.d/rcsysinit.d/S05modules
157         ln -sf ../init.d/udev        /etc/rc.d/rcsysinit.d/S10udev
158         ln -sf ../init.d/checkfstab  /etc/rc.d/rcsysinit.d/S19checkfstab
159         ln -sf ../init.d/swap        /etc/rc.d/rcsysinit.d/S20swap
160         ln -sf ../init.d/checkfs     /etc/rc.d/rcsysinit.d/S30checkfs
161         ln -sf ../init.d/mountfs     /etc/rc.d/rcsysinit.d/S40mountfs
162         ln -sf ../init.d/udev_retry  /etc/rc.d/rcsysinit.d/S45udev_retry
163         ln -sf ../init.d/cleanfs     /etc/rc.d/rcsysinit.d/S50cleanfs
164         ln -sf ../init.d/setclock    /etc/rc.d/rcsysinit.d/S60setclock
165         ln -sf ../init.d/console     /etc/rc.d/rcsysinit.d/S70console
166         ln -sf ../init.d/localnet    /etc/rc.d/rcsysinit.d/S80localnet
167         ln -sf ../init.d/sysctl      /etc/rc.d/rcsysinit.d/S90sysctl
168         
169         ln -sf ../../dnsmasq /etc/rc.d/init.d/networking/red.up/05-RS-dnsmasq
170         ln -sf ../../firewall /etc/rc.d/init.d/networking/red.up/20-RL-firewall
171         ln -sf ../../../../../usr/local/bin/outgoingfwctrl \
172                 /etc/rc.d/init.d/networking/red.up/22-outgoingfwctrl
173         ln -sf ../../../../../usr/local/bin/snortctrl \
174                 /etc/rc.d/init.d/networking/red.up/23-RS-snort
175         ln -sf ../../../../../usr/local/bin/qosctrl \
176                 /etc/rc.d/init.d/networking/red.up/24-RS-qos
177         ln -sf ../../../../../usr/local/bin/setportfw \
178                 /etc/rc.d/init.d/networking/red.up/25-portfw
179         ln -sf ../../../../../usr/local/bin/setxtaccess \
180                 /etc/rc.d/init.d/networking/red.up/26-xtaccess
181         ln -sf ../../../../../usr/local/bin/dialctrl.pl \
182                 /etc/rc.d/init.d/networking/red.up/99-U-dialctrl.pl
183         ln -sf ../../squid /etc/rc.d/init.d/networking/red.up/27-RS-squid
184         
185         ln -sf ../../dnsmasq /etc/rc.d/init.d/networking/red.down/05-RS-dnsmasq
186         ln -sf ../../firewall /etc/rc.d/init.d/networking/red.down/20-RL-firewall
187         ln -sf ../../../../../usr/local/bin/dialctrl.pl \
188                 /etc/rc.d/init.d/networking/red.down/99-D-dialctrl.pl
189
190         for i in green blue orange; do \
191                 ln -sf any /etc/rc.d/init.d/networking/$$i; \
192         done
193         
194         @$(POSTBUILD)