X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=lfs%2Finitscripts;h=a9fadf4de8bbd047b3a06a1691b35bc2c25d8db5;hp=44ce96a1a1688c39ebb74f0118230911d5752857;hb=8dc25f04ba659b6f88f0eef91258088c4b3fe978;hpb=231048413ceb290dacedb62a38063e7079d9ef56 diff --git a/lfs/initscripts b/lfs/initscripts index 44ce96a1a1..a9fadf4de8 100644 --- a/lfs/initscripts +++ b/lfs/initscripts @@ -1,22 +1,20 @@ ############################################################################### -# This file is part of the IPCop Firewall. # # # -# IPCop is free software; you can redistribute it and/or modify # +# IPFire.org - A linux based firewall # +# Copyright (C) 2009 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # +# the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # -# IPCop is distributed in the hope that it will be useful, # +# This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # -# along with IPCop; if not, write to the Free Software # -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# # -# Makefiles are based on LFSMake, which is # -# Copyright (C) 2002 Rod Roard # +# along with this program. If not, see . # # # ############################################################################### @@ -50,35 +48,62 @@ md5 : $(TARGET) : @$(PREBUILD) - - # Make directories install -d -m 755 /etc/rc.d/rc0.d - install -d -m 755 /etc/rc.d/rc1.d - install -d -m 755 /etc/rc.d/rc2.d install -d -m 755 /etc/rc.d/rc3.d - install -d -m 755 /etc/rc.d/rc4.d - install -d -m 755 /etc/rc.d/rc5.d install -d -m 755 /etc/rc.d/rc6.d install -d -m 755 /etc/rc.d/rcsysinit.d install -d -m 755 /etc/rc.d/init.d + install -d -m 755 /etc/rc.d/init.d/networking + install -d -m 755 /etc/rc.d/init.d/networking/red.up + install -d -m 755 /etc/rc.d/init.d/networking/red.down + install -d -m 755 /etc/rc.d/helper install -d -m 755 /etc/sysconfig + -rm -rf /etc/init.d + ln -svf rc.d/init.d /etc/init.d for i in $(DIR_SRC)/src/initscripts/init.d/*; do \ install -v -m 754 $$i /etc/rc.d/init.d/; \ done chmod 644 /etc/rc.d/init.d/functions + for i in $(DIR_SRC)/src/initscripts/init.d/networking/*; do \ + if [ -f $$i ]; then \ + install -v -m 754 $$i /etc/rc.d/init.d/networking/; \ + fi; \ + done + + for i in $(DIR_SRC)/src/initscripts/init.d/networking/red.up/*; do \ + install -v -m 754 $$i /etc/rc.d/init.d/networking/red.up/; \ + done + + for i in $(DIR_SRC)/src/initscripts/init.d/networking/red.down/*; do \ + install -v -m 754 $$i /etc/rc.d/init.d/networking/red.down/; \ + done + + for i in $(DIR_SRC)/src/initscripts/sysconfig/*; do \ + install -v -m 644 $$i /etc/sysconfig/; \ + done + chmod -v 755 /etc/sysconfig/{firewall,rc}.local + + for i in $(DIR_SRC)/src/initscripts/helper/*; do \ + install -v -m 755 $$i /etc/rc.d/helper/; \ + done + ln -sf ../init.d/sysklogd /etc/rc.d/rc0.d/K90sysklogd ln -sf ../init.d/sendsignals /etc/rc.d/rc0.d/S60sendsignals - ln -sf ../init.d/mountfs /etc/rc.d/rc0.d/S70mountfs - ln -sf ../init.d/swap /etc/rc.d/rc0.d/S80swap - ln -sf ../init.d/localnet /etc/rc.d/rc0.d/S90localnet + ln -sf ../init.d/localnet /etc/rc.d/rc0.d/S70localnet + ln -sf ../init.d/mountfs /etc/rc.d/rc0.d/S80mountfs + ln -sf ../init.d/swap /etc/rc.d/rc0.d/S90swap ln -sf ../init.d/halt /etc/rc.d/rc0.d/S99halt - ln -sf ../init.d/sysklogd /etc/rc.d/rc1.d/K90sysklogd - ln -sf ../init.d/sysklogd /etc/rc.d/rc2.d/K90sysklogd ln -sf ../init.d/sysklogd /etc/rc.d/rc3.d/S10sysklogd - ln -sf ../init.d/sysklogd /etc/rc.d/rc4.d/S10sysklogd - ln -sf ../init.d/sysklogd /etc/rc.d/rc5.d/S10sysklogd + ln -sf ../init.d/smartenabler /etc/rc.d/rc3.d/S19smartenabler + ln -sf ../init.d/messagebus /etc/rc.d/rc3.d/S15messagebus + ln -sf ../init.d/messagebus /etc/rc.d/rc0.d/K85messagebus + ln -sf ../init.d/messagebus /etc/rc.d/rc6.d/K85messagebus + ln -sf ../init.d/bluetooth /etc/rc.d/rc3.d/S16bluetooth + ln -sf ../init.d/bluetooth /etc/rc.d/rc0.d/K84bluetooth + ln -sf ../init.d/bluetooth /etc/rc.d/rc6.d/K84bluetooth + ln -sf ../init.d/cpufreq /etc/rc.d/rc3.d/S18cpufreq ln -sf ../init.d/sysklogd /etc/rc.d/rc6.d/K90sysklogd ln -sf ../init.d/sendsignals /etc/rc.d/rc6.d/S60sendsignals ln -sf ../init.d/mountfs /etc/rc.d/rc6.d/S70mountfs @@ -86,29 +111,51 @@ $(TARGET) : ln -sf ../init.d/localnet /etc/rc.d/rc6.d/S90localnet ln -sf ../init.d/reboot /etc/rc.d/rc6.d/S99reboot ln -sf ../init.d/sshd /etc/rc.d/rc0.d/K30sshd - ln -sf ../init.d/sshd /etc/rc.d/rc1.d/K30sshd - ln -sf ../init.d/sshd /etc/rc.d/rc2.d/K30sshd ln -sf ../init.d/sshd /etc/rc.d/rc3.d/S30sshd - ln -sf ../init.d/sshd /etc/rc.d/rc4.d/S30sshd - ln -sf ../init.d/sshd /etc/rc.d/rc5.d/S30sshd ln -sf ../init.d/sshd /etc/rc.d/rc6.d/K30sshd ln -sf ../init.d/apache /etc/rc.d/rc0.d/K28apache - ln -sf ../init.d/apache /etc/rc.d/rc1.d/K28apache - ln -sf ../init.d/apache /etc/rc.d/rc2.d/K28apache ln -sf ../init.d/apache /etc/rc.d/rc3.d/S32apache - ln -sf ../init.d/apache /etc/rc.d/rc4.d/S32apache - ln -sf ../init.d/apache /etc/rc.d/rc5.d/S32apache ln -sf ../init.d/apache /etc/rc.d/rc6.d/K28apache ln -sf ../init.d/fcron /etc/rc.d/rc0.d/K08fcron - ln -sf ../init.d/fcron /etc/rc.d/rc1.d/K08fcron - ln -sf ../init.d/fcron /etc/rc.d/rc2.d/S40fcron ln -sf ../init.d/fcron /etc/rc.d/rc3.d/S40fcron - ln -sf ../init.d/fcron /etc/rc.d/rc4.d/S40fcron - ln -sf ../init.d/fcron /etc/rc.d/rc5.d/S40fcron ln -sf ../init.d/fcron /etc/rc.d/rc6.d/K08fcron + ln -sf ../init.d/snort /etc/rc.d/rc0.d/K78snort + ln -sf ../init.d/snort /etc/rc.d/rc6.d/K78snort + ln -sf ../init.d/network /etc/rc.d/rc0.d/K80network + ln -sf ../init.d/network /etc/rc.d/rc3.d/S20network + ln -sf ../init.d/network /etc/rc.d/rc6.d/K80network + ln -sf ../init.d/random /etc/rc.d/rc0.d/K45random + ln -sf ../init.d/random /etc/rc.d/rc3.d/S25random + ln -sf ../init.d/random /etc/rc.d/rc6.d/K45random + ln -sf ../../sysconfig/rc.local /etc/rc.d/rc3.d/S98rc.local + ln -sf ../init.d/beep /etc/rc.d/rc0.d/K99beep + ln -sf ../init.d/beep /etc/rc.d/rc3.d/S99beep + ln -sf ../init.d/beep /etc/rc.d/rc6.d/K99beep + ln -sf ../init.d/tmpfs /etc/rc.d/rc0.d/K85tmpfs + ln -sf ../init.d/tmpfs /etc/rc.d/rc3.d/S01tmpfs + ln -sf ../init.d/tmpfs /etc/rc.d/rc6.d/K85tmpfs + ln -sf ../init.d/mediatomb /etc/rc.d/rc3.d/S98mediatomb + ln -sf ../init.d/mediatomb /etc/rc.d/rc0.d/K02mediatomb + ln -sf ../init.d/mediatomb /etc/rc.d/rc6.d/K02mediatomb + ln -sf ../init.d/sslh /etc/rc.d/rc3.d/S98sslh + ln -sf ../init.d/sslh /etc/rc.d/rc0.d/K02sslh + ln -sf ../init.d/sslh /etc/rc.d/rc6.d/K02sslh + ln -sf ../init.d/vdradmin /etc/rc.d/rc3.d/S99vdradmin + ln -sf ../init.d/vdradmin /etc/rc.d/rc0.d/K01vdradmin + ln -sf ../init.d/vdradmin /etc/rc.d/rc6.d/K01vdradmin + ln -sf ../init.d/motion /etc/rc.d/rc3.d/S99motion + ln -sf ../init.d/motion /etc/rc.d/rc0.d/K01motion + ln -sf ../init.d/motion /etc/rc.d/rc6.d/K01motion + ln -sf ../init.d/cyrus-sasl /etc/rc.d/rc0.d/K49cyrus-sasl + ln -sf ../init.d/cyrus-sasl /etc/rc.d/rc3.d/S24cyrus-sasl + ln -sf ../init.d/cyrus-sasl /etc/rc.d/rc6.d/K49cyrus-sasl + ln -sf ../init.d/leds /etc/rc.d/rc0.d/K79leds + ln -sf ../init.d/leds /etc/rc.d/rc3.d/S21leds + ln -sf ../init.d/leds /etc/rc.d/rc6.d/K79leds ln -sf ../init.d/mountkernfs /etc/rc.d/rcsysinit.d/S00mountkernfs ln -sf ../init.d/modules /etc/rc.d/rcsysinit.d/S05modules ln -sf ../init.d/udev /etc/rc.d/rcsysinit.d/S10udev + ln -sf ../init.d/checkfstab /etc/rc.d/rcsysinit.d/S19checkfstab ln -sf ../init.d/swap /etc/rc.d/rcsysinit.d/S20swap ln -sf ../init.d/checkfs /etc/rc.d/rcsysinit.d/S30checkfs ln -sf ../init.d/mountfs /etc/rc.d/rcsysinit.d/S40mountfs @@ -118,26 +165,30 @@ $(TARGET) : ln -sf ../init.d/console /etc/rc.d/rcsysinit.d/S70console ln -sf ../init.d/localnet /etc/rc.d/rcsysinit.d/S80localnet ln -sf ../init.d/sysctl /etc/rc.d/rcsysinit.d/S90sysctl - - install -m 644 $(DIR_SRC)/src/initscripts/sysconfig/createfiles /etc/sysconfig/ - install -m 644 $(DIR_SRC)/src/initscripts/sysconfig/modules /etc/sysconfig/ - install -m 644 $(DIR_SRC)/src/initscripts/sysconfig/rc /etc/sysconfig/ - install -m 644 $(DIR_SRC)/src/initscripts/sysconfig/clock /etc/sysconfig/ - install -m 644 $(DIR_SRC)/src/initscripts/sysconfig/network /etc/sysconfig/ - -# -mkdir -p /etc/rc.d/helper -# for i in $(DIR_SRC)/src/rc.d/* ; do \ -# if [ -f $$i ]; then \ -# sed "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" $$i > /etc/rc.d/`basename $$i`; \ -# fi; \ -# done -# for i in $(DIR_SRC)/src/rc.d/helper/* ; do \ -# if [ -f $$i ]; then \ -# sed "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" $$i > /etc/rc.d/helper/`basename $$i`; \ -# fi; \ -# done -# chmod -R 755 /etc/rc.d -# chgrp nobody /etc/rc.d/rc.red -# chmod 4750 /etc/rc.d/rc.red - + + ln -sf ../../dnsmasq /etc/rc.d/init.d/networking/red.up/05-RS-dnsmasq + ln -sf ../../firewall /etc/rc.d/init.d/networking/red.up/20-RL-firewall + ln -sf ../../../../../usr/local/bin/outgoingfwctrl \ + /etc/rc.d/init.d/networking/red.up/22-outgoingfwctrl + ln -sf ../../../../../usr/local/bin/snortctrl \ + /etc/rc.d/init.d/networking/red.up/23-RS-snort + ln -sf ../../../../../usr/local/bin/qosctrl \ + /etc/rc.d/init.d/networking/red.up/24-RS-qos + ln -sf ../../../../../usr/local/bin/setportfw \ + /etc/rc.d/init.d/networking/red.up/25-portfw + ln -sf ../../../../../usr/local/bin/setxtaccess \ + /etc/rc.d/init.d/networking/red.up/26-xtaccess + ln -sf ../../../../../usr/local/bin/dialctrl.pl \ + /etc/rc.d/init.d/networking/red.up/99-U-dialctrl.pl + ln -sf ../../squid /etc/rc.d/init.d/networking/red.up/27-RS-squid + + ln -sf ../../dnsmasq /etc/rc.d/init.d/networking/red.down/05-RS-dnsmasq + ln -sf ../../firewall /etc/rc.d/init.d/networking/red.down/20-RL-firewall + ln -sf ../../../../../usr/local/bin/dialctrl.pl \ + /etc/rc.d/init.d/networking/red.down/99-D-dialctrl.pl + + for i in green blue orange; do \ + ln -sf any /etc/rc.d/init.d/networking/$$i; \ + done + @$(POSTBUILD)