1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007 Michael Tremer & Christian Schmidt #
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. #
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. #
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/>. #
19 ###############################################################################
21 ###############################################################################
23 ###############################################################################
30 TARGET = $(DIR_INFO)/$(THISAPP)
32 ###############################################################################
34 ###############################################################################
44 ###############################################################################
45 # Installation Details
46 ###############################################################################
52 -mkdir -pv /{bin,boot,etc/opt,etc/modprobe.d,home,lib,mnt,opt}
53 -mkdir -pv /{media/{floppy,cdrom,usbkey},sbin,srv,var}
54 -install -dv -m 0750 /root
55 -install -dv -m 1777 /tmp /var/tmp
56 -mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}
57 -mkdir -pv /usr/{,local/}share/{doc,info,locale,man}
58 -mkdir -v /usr/{,local/}share/{misc,terminfo,zoneinfo}
59 -mkdir -pv /usr/{,local/}share/man/man{1..8}
60 #-for dir in /usr /usr/local; do \
61 # ln -sv share/{man,doc,info} $$dir; \
65 # for this reason, stage2 rebuild will broke the iso:perl, grubbatch
66 -ln -sv /tools/bin/{bash,cat,grep,pwd,stty} /bin
67 -ln -sv /tools/bin/perl /usr/bin
68 -ln -sv /tools/lib/libgcc_s.so{,.1} /usr/lib
72 for i in $(DIR_SRC)/config/etc/*; do \
73 [ -f $$i ] && cp $$i /etc; \
76 echo "$(NAME) v$(VERSION) - $(SLOGAN)" > /etc/issue
77 echo "===============================" >> /etc/issue
78 echo "\n running on \s \r \m" >> /etc/issue
81 install --directory --mode=0755 --owner=root --group=root /etc/profile.d
82 for i in $(DIR_SRC)/config/profile.d/*; do \
83 [ -f $$i ] && cp $$i /etc/profile.d; \
86 ln -svf ../bashrc /etc/profile.d/bashrc.sh
89 for i in `find $(DIR_SRC)/src/scripts -maxdepth 1 -type f`; do \
90 sed "s+CONFIG_ROOT+$(CONFIG_ROOT)+g" $$i > /usr/local/bin/`basename $$i`; \
91 chmod 755 /usr/local/bin/`basename $$i`; \
95 -mkdir -p /home/nobody
96 chown -R nobody:nobody /home/nobody
98 # Create /var dirs and files
99 -mkdir -v /var/{lock,log,mail,run,spool,empty}
100 -mkdir -pv /var/{opt,cache,lib/{misc,locate},local}
101 -mkdir -pv /var/log/{counter,calamaris}
102 chown nobody.nobody /var/log/calamaris
103 touch /var/run/utmp /var/log/{btmp,lastlog,wtmp,net-traffic.log}
104 chgrp -v utmp /var/run/utmp /var/log/lastlog
105 chmod -v 664 /var/run/utmp /var/log/lastlog
108 chmod 0711 /var/empty
110 # A small hack to include /root to the iso but not all of it's files.