]> git.ipfire.org Git - ipfire-2.x.git/blob - lfs/initscripts
ids.cgi: Only show "update ruleset" button if a ruleset is present
[ipfire-2.x.git] / lfs / initscripts
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
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 # Definitions
22 ###############################################################################
23
24 include Config
25
26 VER = ipfire
27
28 THISAPP = initscripts
29 DIR_APP = $(DIR_SRC)/$(THISAPP)
30 TARGET = $(DIR_INFO)/$(THISAPP)
31
32 ###############################################################################
33 # Top-level Rules
34 ###############################################################################
35
36 install : $(TARGET)
37
38 check :
39
40 download :
41
42 md5 :
43
44 ###############################################################################
45 # Installation Details
46 ###############################################################################
47
48 $(TARGET) :
49 @$(PREBUILD)
50 install -d -m 755 /etc/rc.d/rc0.d
51 install -d -m 755 /etc/rc.d/rc3.d
52 install -d -m 755 /etc/rc.d/rc6.d
53 install -d -m 755 /etc/rc.d/rcsysinit.d
54 install -d -m 755 /etc/rc.d/init.d
55 install -d -m 755 /etc/rc.d/init.d/networking
56 install -d -m 755 /etc/rc.d/init.d/networking/red.up
57 install -d -m 755 /etc/rc.d/init.d/networking/red.down
58 install -d -m 755 /etc/rc.d/helper
59 install -d -m 755 /etc/sysconfig
60 -rm -rf /etc/init.d
61 ln -svf rc.d/init.d /etc/init.d
62
63 # Create default ramdisk configuration
64 echo "RAMDISK_MODE=0" > /etc/sysconfig/ramdisk
65
66 for i in $(DIR_SRC)/src/initscripts/system/*; do \
67 install -v -m 754 $$i /etc/rc.d/init.d/; \
68 done
69 chmod 644 /etc/rc.d/init.d/functions
70
71 for i in $(DIR_SRC)/src/initscripts/networking/*; do \
72 if [ -f $$i ]; then \
73 install -v -m 754 $$i /etc/rc.d/init.d/networking/; \
74 fi; \
75 done
76
77 for i in $(DIR_SRC)/src/initscripts/networking/red.up/*; do \
78 install -v -m 754 $$i /etc/rc.d/init.d/networking/red.up/; \
79 done
80
81 for i in $(DIR_SRC)/src/initscripts/networking/red.down/*; do \
82 install -v -m 754 $$i /etc/rc.d/init.d/networking/red.down/; \
83 done
84
85 for i in $(DIR_SRC)/src/initscripts/sysconfig/*; do \
86 install -v -m 644 $$i /etc/sysconfig/; \
87 done
88 chmod -v 755 /etc/sysconfig/{firewall,rc}.local
89
90 for i in $(DIR_SRC)/src/initscripts/helper/*; do \
91 install -v -m 755 $$i /etc/rc.d/helper/; \
92 done
93
94 ln -sf ../init.d/sysklogd /etc/rc.d/rc0.d/K90sysklogd
95 ln -sf ../init.d/sendsignals /etc/rc.d/rc0.d/S60sendsignals
96 ln -sf ../init.d/localnet /etc/rc.d/rc0.d/S70localnet
97 ln -sf ../init.d/mountfs /etc/rc.d/rc0.d/S80mountfs
98 ln -sf ../init.d/swap /etc/rc.d/rc0.d/S90swap
99 ln -sf ../init.d/halt /etc/rc.d/rc0.d/S99halt
100 ln -sf ../init.d/sysklogd /etc/rc.d/rc3.d/S10sysklogd
101 ln -sf ../init.d/smartenabler /etc/rc.d/rc3.d/S19smartenabler
102 ln -sf ../init.d/messagebus /etc/rc.d/rc3.d/S15messagebus
103 ln -sf ../init.d/messagebus /etc/rc.d/rc0.d/K85messagebus
104 ln -sf ../init.d/messagebus /etc/rc.d/rc6.d/K85messagebus
105 ln -sf ../init.d/bluetooth /etc/rc.d/rc3.d/S16bluetooth
106 ln -sf ../init.d/bluetooth /etc/rc.d/rc0.d/K84bluetooth
107 ln -sf ../init.d/bluetooth /etc/rc.d/rc6.d/K84bluetooth
108 ln -sf ../init.d/cpufreq /etc/rc.d/rc3.d/S18cpufreq
109 ln -sf ../init.d/sysklogd /etc/rc.d/rc6.d/K90sysklogd
110 ln -sf ../init.d/sendsignals /etc/rc.d/rc6.d/S60sendsignals
111 ln -sf ../init.d/mountfs /etc/rc.d/rc6.d/S70mountfs
112 ln -sf ../init.d/swap /etc/rc.d/rc6.d/S80swap
113 ln -sf ../init.d/localnet /etc/rc.d/rc6.d/S90localnet
114 ln -sf ../init.d/reboot /etc/rc.d/rc6.d/S99reboot
115 ln -sf ../init.d/sshd /etc/rc.d/rc0.d/K30sshd
116 ln -sf ../init.d/sshd /etc/rc.d/rc3.d/S30sshd
117 ln -sf ../init.d/sshd /etc/rc.d/rc6.d/K30sshd
118 ln -sf ../init.d/apache /etc/rc.d/rc0.d/K28apache
119 ln -sf ../init.d/apache /etc/rc.d/rc3.d/S32apache
120 ln -sf ../init.d/apache /etc/rc.d/rc6.d/K28apache
121 ln -sf ../init.d/fcron /etc/rc.d/rc0.d/K08fcron
122 ln -sf ../init.d/fcron /etc/rc.d/rc3.d/S40fcron
123 ln -sf ../init.d/fcron /etc/rc.d/rc6.d/K08fcron
124 ln -sf ../init.d/suricata /etc/rc.d/rc0.d/K78suricata
125 ln -sf ../init.d/suricata /etc/rc.d/rc6.d/K78suricata
126 ln -sf ../init.d/network /etc/rc.d/rc0.d/K80network
127 ln -sf ../init.d/network /etc/rc.d/rc3.d/S20network
128 ln -sf ../init.d/network /etc/rc.d/rc6.d/K80network
129 ln -sf ../init.d/unbound /etc/rc.d/rc0.d/K79unbound
130 ln -sf ../init.d/unbound /etc/rc.d/rc3.d/S11unbound
131 ln -sf ../init.d/unbound /etc/rc.d/rc6.d/K79unbound
132 ln -sf ../init.d/random /etc/rc.d/rc0.d/K45random
133 ln -sf ../init.d/random /etc/rc.d/rc3.d/S00random
134 ln -sf ../init.d/random /etc/rc.d/rc6.d/K45random
135 ln -sf ../../sysconfig/rc.local /etc/rc.d/rc3.d/S98rc.local
136 ln -sf ../init.d/client175 /etc/rc.d/rc0.d/K34client175
137 ln -sf ../init.d/client175 /etc/rc.d/rc3.d/S66client175
138 ln -sf ../init.d/client175 /etc/rc.d/rc6.d/K34client175
139 ln -sf ../init.d/sslh /etc/rc.d/rc3.d/S98sslh
140 ln -sf ../init.d/sslh /etc/rc.d/rc0.d/K02sslh
141 ln -sf ../init.d/sslh /etc/rc.d/rc6.d/K02sslh
142 ln -sf ../init.d/vdradmin /etc/rc.d/rc3.d/S99vdradmin
143 ln -sf ../init.d/vdradmin /etc/rc.d/rc0.d/K01vdradmin
144 ln -sf ../init.d/vdradmin /etc/rc.d/rc6.d/K01vdradmin
145 ln -sf ../init.d/motion /etc/rc.d/rc3.d/S99motion
146 ln -sf ../init.d/motion /etc/rc.d/rc0.d/K01motion
147 ln -sf ../init.d/motion /etc/rc.d/rc6.d/K01motion
148 ln -sf ../init.d/imspetor /etc/rc.d/rc3.d/S99imspetor
149 ln -sf ../init.d/imspetor /etc/rc.d/rc0.d/K01imspetor
150 ln -sf ../init.d/imspetor /etc/rc.d/rc6.d/K01imspetor
151 ln -sf ../init.d/cyrus-sasl /etc/rc.d/rc0.d/K49cyrus-sasl
152 ln -sf ../init.d/cyrus-sasl /etc/rc.d/rc3.d/S24cyrus-sasl
153 ln -sf ../init.d/cyrus-sasl /etc/rc.d/rc6.d/K49cyrus-sasl
154 ln -sf ../init.d/leds /etc/rc.d/rc0.d/K79leds
155 ln -sf ../init.d/leds /etc/rc.d/rc3.d/S21leds
156 ln -sf ../init.d/leds /etc/rc.d/rc6.d/K79leds
157 ln -sf ../init.d/fireinfo /etc/rc.d/rc3.d/S15fireinfo
158 ln -sf ../init.d/conntrackd /etc/rc.d/rc0.d/K77conntrackd
159 ln -sf ../init.d/conntrackd /etc/rc.d/rc3.d/S22conntrackd
160 ln -sf ../init.d/conntrackd /etc/rc.d/rc6.d/K77conntrackd
161 ln -sf ../init.d/mountkernfs /etc/rc.d/rcsysinit.d/S00mountkernfs
162 ln -sf ../init.d/sysctl /etc/rc.d/rcsysinit.d/S01sysctl
163 ln -sf ../init.d/modules /etc/rc.d/rcsysinit.d/S05modules
164 ln -sf ../init.d/udev /etc/rc.d/rcsysinit.d/S10udev
165 ln -sf ../init.d/waitdrives /etc/rc.d/rcsysinit.d/S19waitdrives
166 ln -sf ../init.d/swap /etc/rc.d/rcsysinit.d/S20swap
167 ln -sf ../init.d/partresize /etc/rc.d/rcsysinit.d/S25partresize
168 ln -sf ../init.d/checkfs /etc/rc.d/rcsysinit.d/S30checkfs
169 ln -sf ../init.d/mountfs /etc/rc.d/rcsysinit.d/S40mountfs
170 ln -sf ../init.d/fsresize /etc/rc.d/rcsysinit.d/S42fsresize
171 ln -sf ../init.d/mounttmpfs /etc/rc.d/rcsysinit.d/S43mounttmpfs
172 ln -sf ../init.d/udev_retry /etc/rc.d/rcsysinit.d/S45udev_retry
173 ln -sf ../init.d/cleanfs /etc/rc.d/rcsysinit.d/S50cleanfs
174 ln -sf ../init.d/setclock /etc/rc.d/rcsysinit.d/S60setclock
175 ln -sf ../init.d/setclock /etc/rc.d/rc0.d/K47setclock
176 ln -sf ../init.d/setclock /etc/rc.d/rc6.d/K47setclock
177 ln -sf ../init.d/console /etc/rc.d/rcsysinit.d/S70console
178 ln -sf ../init.d/pakfire /etc/rc.d/rcsysinit.d/S71pakfire
179 ln -sf ../init.d/aws /etc/rc.d/rcsysinit.d/S74aws
180 ln -sf ../init.d/firstsetup /etc/rc.d/rcsysinit.d/S75firstsetup
181 ln -sf ../init.d/localnet /etc/rc.d/rcsysinit.d/S80localnet
182 ln -sf ../init.d/firewall /etc/rc.d/rcsysinit.d/S85firewall
183 ln -sf ../init.d/rngd /etc/rc.d/rcsysinit.d/S92rngd
184 ln -sf ../init.d/vnstat /etc/rc.d/rc3.d/S01vnstat
185 ln -sf ../init.d/vnstat /etc/rc.d/rc0.d/K51vnstat
186 ln -sf ../init.d/vnstat /etc/rc.d/rc6.d/K51vnstat
187 ln -sf ../init.d/wlanclient /etc/rc.d/rc0.d/K82wlanclient
188 ln -sf ../init.d/wlanclient /etc/rc.d/rc3.d/S19wlanclient
189 ln -sf ../init.d/wlanclient /etc/rc.d/rc6.d/K82wlanclient
190
191 ln -sf ../../../../../usr/local/bin/suricatactrl \
192 /etc/rc.d/init.d/networking/red.up/23-RS-suricata
193 ln -sf ../../../../../usr/local/bin/qosctrl \
194 /etc/rc.d/init.d/networking/red.up/24-RS-qos
195 ln -sf ../../squid /etc/rc.d/init.d/networking/red.up/27-RS-squid
196
197 for i in green blue orange; do \
198 ln -sf any /etc/rc.d/init.d/networking/$$i; \
199 done
200
201 # intel intel no swconfig
202 ifeq "$(BUILD_PLATFORM)" "arm"
203 ln -sf ../init.d/swconfig /etc/rc.d/rcsysinit.d/S73swconfig
204 else
205 rm -vf /etc/rc.d/init.d/swconfig
206 endif
207 ln -sf ../init.d/acpid /etc/rc.d/rc3.d/S12acpid
208 ln -sf ../init.d/acpid /etc/rc.d/rc0.d/K87acpid
209 ln -sf ../init.d/acpid /etc/rc.d/rc6.d/K87acpid
210 @$(POSTBUILD)