makegraphs umgebaut, sodass nurnoch rrd daten geschrieben werden die graphen
[people/pmueller/ipfire-2.x.git] / lfs / configroot
CommitLineData
cd1a2927
MT
1###############################################################################
2# This file is part of the IPCop Firewall. #
3# #
4# IPCop is free software; you can redistribute it and/or modify #
5# it under the terms of the GNU General Public License as published by #
6# the Free Software Foundation; either version 2 of the License, or #
7# (at your option) any later version. #
8# #
9# IPCop is distributed in the hope that it will be useful, #
10# but WITHOUT ANY WARRANTY; without even the implied warranty of #
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
12# GNU General Public License for more details. #
13# #
14# You should have received a copy of the GNU General Public License #
15# along with IPCop; if not, write to the Free Software #
16# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
17# #
18# Makefiles are based on LFSMake, which is #
19# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
20# #
cd1a2927
MT
21###############################################################################
22
23###############################################################################
24# Definitions
25###############################################################################
26
27include Config
28
15679d9f
MT
29VER = ipfire
30
cd1a2927
MT
31THISAPP = configroot
32DIR_APP = $(DIR_SRC)/$(THISAPP)
33TARGET = $(DIR_INFO)/$(THISAPP)
34
35###############################################################################
36# Top-level Rules
37###############################################################################
38
39install : $(TARGET)
40
41check :
42
43download :
44
45md5 :
46
47###############################################################################
48# Installation Details
49###############################################################################
50
51$(TARGET) :
52 @$(PREBUILD)
53
54 # Create all directories
786f2c8a
MT
55 for i in addon-lang auth backup ca certs connscheduler crls ddns dhcp dhcpc dmzholes \
56 ethernet extrahd/bin fwlogs isdn key langs logging main mbmon menu.d modem net-traffic \
57 nfs optionsfw outgoing/bin patches pakfire portfw \
c3df33af 58 ppp private proxy/advanced/cre proxy/calamaris/bin qos/bin red remote snort time tripwire/report \
786f2c8a 59 updatexlrator/bin updatexlrator/autocheck urlfilter/autoupdate urlfilter/bin upnp vpn \
46c01c09 60 wakeonlan wireless xtaccess ; do \
cd1a2927
MT
61 mkdir -p $(CONFIG_ROOT)/$$i; \
62 done
63
64 # Touch empty files
65 for i in auth/users backup/include.user backup/exclude.user \
1fde937c 66 certs/index.txt ddns/config ddns/noipsettings ddns/settings ddns/ipcache dhcp/settings \
59de0b00 67 dhcp/fixleases dhcp/advoptions dmzholes/config ethernet/aliases ethernet/settings ethernet/known_nics ethernet/scanned_nics \
786f2c8a 68 extrahd/scan extrahd/devices extrahd/partitions extrahd/settings fwlogs/ipsettings fwlogs/portsettings\
4e565351 69 isdn/settings main/hosts main/settings optionsfw/settings outgoing/settings outgoing/rules pakfire/settings \
cd1a2927 70 portfw/config ppp/settings-1 ppp/settings-2 ppp/settings-3 ppp/settings-4 \
c3df33af 71 ppp/settings-5 ppp/settings proxy/settings proxy/advanced/settings proxy/advanced/cre/enable remote/settings qos/settings qos/classes qos/subclasses qos/level7config qos/portconfig \
e645448e 72 qos/tosconfig snort/settings tripwire/settings upnp/settings vpn/config vpn/settings vpn/ipsec.conf \
4e565351 73 vpn/ipsec.secrets vpn/caconfig wakeonlan/clients.conf wireless/config wireless/settings; do \
cd1a2927
MT
74 touch $(CONFIG_ROOT)/$$i; \
75 done
76
77 # Copy initial configfiles
78 cp $(DIR_SRC)/config/cfgroot/header.pl $(CONFIG_ROOT)/
79 cp $(DIR_SRC)/config/cfgroot/general-functions.pl $(CONFIG_ROOT)/
80 cp $(DIR_SRC)/config/cfgroot/lang.pl $(CONFIG_ROOT)/
3ea75603 81 cp $(DIR_SRC)/config/cfgroot/countries.pl $(CONFIG_ROOT)/
350b52c5 82 cp $(DIR_SRC)/config/cfgroot/graphs.pl $(CONFIG_ROOT)/
4e565351 83 cp $(DIR_SRC)/config/cfgroot/advoptions-list $(CONFIG_ROOT)/dhcp/advoptions-list
cd1a2927
MT
84 cp $(DIR_SRC)/config/cfgroot/backup-exclude $(CONFIG_ROOT)/backup/exclude.system
85 cp $(DIR_SRC)/config/cfgroot/backup-include $(CONFIG_ROOT)/backup/include.system
86 cp $(DIR_SRC)/config/cfgroot/backup-exclude.hardware $(CONFIG_ROOT)/backup/exclude.hardware
4e565351 87 cp $(DIR_SRC)/config/cfgroot/connscheduler-lib.pl $(CONFIG_ROOT)/connscheduler/lib.pl
1fde937c 88 cp $(DIR_SRC)/config/cfgroot/connscheduler.conf $(CONFIG_ROOT)/connscheduler
aa2870e6 89 cp $(DIR_SRC)/config/extrahd/* $(CONFIG_ROOT)/extrahd/bin/
52345790 90 cp $(DIR_SRC)/config/cfgroot/mbmon-settings $(CONFIG_ROOT)/mbmon/settings
24249567 91 cp $(DIR_SRC)/config/menu/* $(CONFIG_ROOT)/menu.d/
cd1a2927
MT
92 cp $(DIR_SRC)/config/cfgroot/modem-defaults $(CONFIG_ROOT)/modem/defaults
93 cp $(DIR_SRC)/config/cfgroot/modem-settings $(CONFIG_ROOT)/modem/settings
10a04d70 94 cp $(DIR_SRC)/config/cfgroot/net-traffic-lib.pl $(CONFIG_ROOT)/net-traffic/net-traffic-lib.pl
60cbd6e7 95 cp $(DIR_SRC)/config/cfgroot/nfs-server $(CONFIG_ROOT)/nfs/nfs-server
d9b7aa33 96 cp $(DIR_SRC)/config/cfgroot/p2protocols $(CONFIG_ROOT)/outgoing/p2protocols
ebb9187c 97 cp $(DIR_SRC)/config/outgoingfw/outgoingfw.pl $(CONFIG_ROOT)/outgoing/bin/
822c5bd0 98 cp $(DIR_SRC)/config/outgoingfw/defaultservices $(CONFIG_ROOT)/outgoing/
cd1a2927 99 cp $(DIR_SRC)/config/cfgroot/proxy-acl $(CONFIG_ROOT)/proxy/acl-1.4
5e773594 100 cp $(DIR_SRC)/config/qos/* $(CONFIG_ROOT)/qos/bin/
b40388bb 101 cp $(DIR_SRC)/config/cfgroot/ssh-settings $(CONFIG_ROOT)/remote/settings
cd1a2927
MT
102 cp $(DIR_SRC)/config/cfgroot/xtaccess-config $(CONFIG_ROOT)/xtaccess/config
103 cp $(DIR_SRC)/config/cfgroot/time-settings $(CONFIG_ROOT)/time/settings
104 cp $(DIR_SRC)/config/cfgroot/logging-settings $(CONFIG_ROOT)/logging/settings
ed38f89d
MT
105 cp $(DIR_SRC)/config/cfgroot/useragents $(CONFIG_ROOT)/proxy/advanced
106 cp $(DIR_SRC)/langs/list $(CONFIG_ROOT)/langs/
cd1a2927
MT
107
108 # Oneliner configfiles
109 echo "ENABLED=off" > $(CONFIG_ROOT)/vpn/settings
110 echo "VPN_DELAYED_START=0" >>$(CONFIG_ROOT)/vpn/settings
111 echo "01" > $(CONFIG_ROOT)/certs/serial
112 echo "nameserver 1.2.3.4" > $(CONFIG_ROOT)/ppp/fake-resolv.conf
3ea75603 113 echo "DISABLEPING=NO" > $(CONFIG_ROOT)/optionsfw/settings
cd1a2927 114
cd1a2927
MT
115 # Modify variables in header.pl
116 sed -i -e "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" \
117 -e "s+VERSION+$(VERSION)+g" \
118 $(CONFIG_ROOT)/header.pl
119
120 # Modify variables in general-functions.pl
121 sed -i -e "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" \
122 -e "s+VERSION+$(VERSION)+g" \
123 $(CONFIG_ROOT)/general-functions.pl
124
125 # Modify CONFIG_ROOT in lang.pl
126 sed -i -e "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" \
127 $(CONFIG_ROOT)/lang.pl
128
129 # Language files
27e4cd2f
MT
130 cp $(DIR_SRC)/langs/de/cgi-bin/de.pl $(CONFIG_ROOT)/langs/
131 cp $(DIR_SRC)/langs/en/cgi-bin/en.pl $(CONFIG_ROOT)/langs/
cd1a2927
MT
132
133 # Configroot permissions
134 chown -R nobody:nobody $(CONFIG_ROOT)
135 chown root:root $(CONFIG_ROOT)
136 for i in backup/ header.pl general-functions.pl lang.pl addon-lang/ langs/ red/ ; do \
137 chown -R root:root $(CONFIG_ROOT)/$$i; \
138 done
cd1a2927
MT
139 chown root:nobody $(CONFIG_ROOT)/dhcpc
140
141 @$(POSTBUILD)