Add checkfstab (repair fstab and grup.conf if the rootdevice has changed)
[people/pmueller/ipfire-2.x.git] / lfs / initscripts
CommitLineData
cd1a2927 1###############################################################################
cd1a2927 2# #
70df8302
MT
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
5# #
6# This program is free software: you can redistribute it and/or modify #
cd1a2927 7# it under the terms of the GNU General Public License as published by #
70df8302 8# the Free Software Foundation, either version 3 of the License, or #
cd1a2927
MT
9# (at your option) any later version. #
10# #
70df8302 11# This program is distributed in the hope that it will be useful, #
cd1a2927
MT
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 #
70df8302 17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
cd1a2927 18# #
cd1a2927
MT
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
7b9e5f10
MT
27VER = ipfire
28
cd1a2927
MT
29THISAPP = initscripts
30DIR_APP = $(DIR_SRC)/$(THISAPP)
31TARGET = $(DIR_INFO)/$(THISAPP)
32
33###############################################################################
34# Top-level Rules
35###############################################################################
36
37install : $(TARGET)
38
39check :
40
41download :
42
43md5 :
44
45###############################################################################
46# Installation Details
47###############################################################################
48
49$(TARGET) :
50 @$(PREBUILD)
73d9a908 51 install -d -m 755 /etc/rc.d/rc0.d
73d9a908 52 install -d -m 755 /etc/rc.d/rc3.d
73d9a908
MT
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
d1e90efc
MT
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
069680ac 59 install -d -m 755 /etc/rc.d/helper
73d9a908 60 install -d -m 755 /etc/sysconfig
406f019f 61 -rm -rf /etc/init.d
05207d69 62 ln -svf rc.d/init.d /etc/init.d
73d9a908 63
23104841
MT
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
d1e90efc 69 for i in $(DIR_SRC)/src/initscripts/init.d/networking/*; do \
406f019f 70 if [ -f $$i ]; then \
d1e90efc 71 install -v -m 754 $$i /etc/rc.d/init.d/networking/; \
406f019f 72 fi; \
9c16cd92
MT
73 done
74
d1e90efc
MT
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/; \
9c16cd92
MT
77 done
78
d1e90efc
MT
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/; \
9c16cd92
MT
81 done
82
65998e0a
MT
83 for i in $(DIR_SRC)/src/initscripts/sysconfig/*; do \
84 install -v -m 644 $$i /etc/sysconfig/; \
85 done
b7ce6aa3 86 chmod -v 755 /etc/sysconfig/{firewall,rc}.local
65998e0a 87
069680ac
MT
88 for i in $(DIR_SRC)/src/initscripts/helper/*; do \
89 install -v -m 755 $$i /etc/rc.d/helper/; \
90 done
91
73d9a908
MT
92 ln -sf ../init.d/sysklogd /etc/rc.d/rc0.d/K90sysklogd
93 ln -sf ../init.d/sendsignals /etc/rc.d/rc0.d/S60sendsignals
55b4c7ed
MT
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
73d9a908 97 ln -sf ../init.d/halt /etc/rc.d/rc0.d/S99halt
73d9a908 98 ln -sf ../init.d/sysklogd /etc/rc.d/rc3.d/S10sysklogd
d7fb75d9 99 ln -sf ../init.d/smartenabler /etc/rc.d/rc3.d/S19smartenabler
73d9a908
MT
100 ln -sf ../init.d/sysklogd /etc/rc.d/rc6.d/K90sysklogd
101 ln -sf ../init.d/sendsignals /etc/rc.d/rc6.d/S60sendsignals
102 ln -sf ../init.d/mountfs /etc/rc.d/rc6.d/S70mountfs
103 ln -sf ../init.d/swap /etc/rc.d/rc6.d/S80swap
104 ln -sf ../init.d/localnet /etc/rc.d/rc6.d/S90localnet
105 ln -sf ../init.d/reboot /etc/rc.d/rc6.d/S99reboot
23104841 106 ln -sf ../init.d/sshd /etc/rc.d/rc0.d/K30sshd
23104841 107 ln -sf ../init.d/sshd /etc/rc.d/rc3.d/S30sshd
23104841
MT
108 ln -sf ../init.d/sshd /etc/rc.d/rc6.d/K30sshd
109 ln -sf ../init.d/apache /etc/rc.d/rc0.d/K28apache
23104841 110 ln -sf ../init.d/apache /etc/rc.d/rc3.d/S32apache
23104841
MT
111 ln -sf ../init.d/apache /etc/rc.d/rc6.d/K28apache
112 ln -sf ../init.d/fcron /etc/rc.d/rc0.d/K08fcron
23104841 113 ln -sf ../init.d/fcron /etc/rc.d/rc3.d/S40fcron
23104841 114 ln -sf ../init.d/fcron /etc/rc.d/rc6.d/K08fcron
3fd5feeb
MT
115 ln -sf ../init.d/network /etc/rc.d/rc0.d/K80network
116 ln -sf ../init.d/network /etc/rc.d/rc3.d/S20network
117 ln -sf ../init.d/network /etc/rc.d/rc6.d/K80network
71e32384
MT
118 ln -sf ../init.d/random /etc/rc.d/rc0.d/K45random
119 ln -sf ../init.d/random /etc/rc.d/rc3.d/S25random
120 ln -sf ../init.d/random /etc/rc.d/rc6.d/K45random
b7ce6aa3 121 ln -sf ../../sysconfig/rc.local /etc/rc.d/rc3.d/S98rc.local
a3d825db
MT
122 ln -sf ../init.d/beep /etc/rc.d/rc0.d/K99beep
123 ln -sf ../init.d/beep /etc/rc.d/rc3.d/S99beep
124 ln -sf ../init.d/beep /etc/rc.d/rc6.d/K99beep
65998e0a 125
73d9a908
MT
126 ln -sf ../init.d/mountkernfs /etc/rc.d/rcsysinit.d/S00mountkernfs
127 ln -sf ../init.d/modules /etc/rc.d/rcsysinit.d/S05modules
128 ln -sf ../init.d/udev /etc/rc.d/rcsysinit.d/S10udev
ba3e5905 129 ln -sf ../init.d/checkfstab /etc/rc.d/rcsysinit.d/S19checkfstab
73d9a908
MT
130 ln -sf ../init.d/swap /etc/rc.d/rcsysinit.d/S20swap
131 ln -sf ../init.d/checkfs /etc/rc.d/rcsysinit.d/S30checkfs
132 ln -sf ../init.d/mountfs /etc/rc.d/rcsysinit.d/S40mountfs
133 ln -sf ../init.d/udev_retry /etc/rc.d/rcsysinit.d/S45udev_retry
134 ln -sf ../init.d/cleanfs /etc/rc.d/rcsysinit.d/S50cleanfs
135 ln -sf ../init.d/setclock /etc/rc.d/rcsysinit.d/S60setclock
136 ln -sf ../init.d/console /etc/rc.d/rcsysinit.d/S70console
137 ln -sf ../init.d/localnet /etc/rc.d/rcsysinit.d/S80localnet
138 ln -sf ../init.d/sysctl /etc/rc.d/rcsysinit.d/S90sysctl
d1e90efc
MT
139
140 ln -sf ../../dnsmasq /etc/rc.d/init.d/networking/red.up/05-RS-dnsmasq
141 ln -sf ../../firewall /etc/rc.d/init.d/networking/red.up/20-RL-firewall
d1e90efc
MT
142 ln -sf ../../../../../usr/local/bin/outgoingfwctrl \
143 /etc/rc.d/init.d/networking/red.up/22-outgoingfwctrl
144 ln -sf ../../../../../usr/local/bin/snortctrl \
145 /etc/rc.d/init.d/networking/red.up/23-RS-snort
146 ln -sf ../../../../../usr/local/bin/qosctrl \
147 /etc/rc.d/init.d/networking/red.up/24-RS-qos
148 ln -sf ../../../../../usr/local/bin/setportfw \
149 /etc/rc.d/init.d/networking/red.up/25-portfw
150 ln -sf ../../../../../usr/local/bin/setxtaccess \
151 /etc/rc.d/init.d/networking/red.up/26-xtaccess
ebca0d9a
MT
152 ln -sf ../../../../../usr/local/bin/dialctrl.pl \
153 /etc/rc.d/init.d/networking/red.up/99-U-dialctrl.pl
890083f0 154 ln -sf ../../squid /etc/rc.d/init.d/networking/red.up/27-RS-squid
d1e90efc
MT
155
156 ln -sf ../../dnsmasq /etc/rc.d/init.d/networking/red.down/05-RS-dnsmasq
157 ln -sf ../../firewall /etc/rc.d/init.d/networking/red.down/20-RL-firewall
ebca0d9a
MT
158 ln -sf ../../../../../usr/local/bin/dialctrl.pl \
159 /etc/rc.d/init.d/networking/red.down/99-D-dialctrl.pl
d1e90efc
MT
160
161 for i in green blue orange; do \
162 ln -sf any /etc/rc.d/init.d/networking/$$i; \
163 done
164
cd1a2927 165 @$(POSTBUILD)