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 THISAPP = $(PKG_NAME)-$(VER)
32 OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
34 ###############################################################################
36 ###############################################################################
42 ###############################################################################
43 # Installation Details
44 ###############################################################################
50 -mkdir -pv /{bin,boot,etc/{opt,sysconfig},home,lib,mnt,opt}
51 -mkdir -pv /{media/{floppy,cdrom},sbin,srv,var}
52 -install -dv -m 0750 /root
53 -install -dv -m 1777 /tmp /var/tmp
54 -mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}
55 -mkdir -pv /usr/{,local/}share/{doc,info,locale,man}
56 -mkdir -v /usr/{,local/}share/{misc,terminfo,zoneinfo}
57 -mkdir -pv /usr/{,local/}share/man/man{1..8}
58 -for dir in /usr /usr/local; do \
59 ln -sfv share/{man,doc,info} $$dir; \
61 -mkdir -v /var/{lock,log,mail,run,spool}
62 -mkdir -pv /var/{opt,cache,lib/{misc,locate},local}
64 # Creating an empty mtab
67 # This trick is necessary in order to create two devices in the target /dev
68 # rather than in the host /dev
70 mount --move /dev /dev1
72 # Make /dev/null and /dev/console
73 cd /dev && rm -f null console
74 cd /dev && mknod -m 0666 null c 1 3
75 cd /dev && mknod -m 0600 console c 5 1
77 # Now move the target /dev to point back to the host /dev
78 mount --move /dev1 /dev
82 for i in $$(find $(DIR_SRC)/config/etc/ -type f); do \
85 for i in $$(find $(DIR_CONFIG)/root/ -type f); do \
88 -mkdir -pv /etc/modprobe.d
89 cp -av $(DIR_CONF)/modprobe.d/* /etc/modprobe.d/
92 # Enable serial on console 7
93 sed -e "s/^#7/7/" -i /etc/inittab
96 echo "$(NAME) v$(VERSION) for $(MACHINE) - $(SLOGAN) (\l)" > /etc/issue
97 echo "===============================" >> /etc/issue
98 echo "\n running on \s \r \m" >> /etc/issue
100 echo "$(NAME) Release $(VERSION) ($(SLOGAN))" > /etc/$(SNAME)-release
101 ln -svf $(SNAME)-release /etc/system-release
103 touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
104 #chgrp -v utmp /var/run/utmp /var/log/lastlog
105 chmod -v 664 /var/run/utmp /var/log/lastlog
108 install --directory --mode=0755 --owner=root --group=root /etc/profile.d
109 for i in $(DIR_SRC)/config/profile.d/*; do \
110 [ -f $$i ] && cp $$i /etc/profile.d; \
114 -mkdir -p /home/nobody
115 chown -R nobody:nobody /home/nobody