]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - lfs/stage2
Bashpromt erweitert und FTP Upload wieder funktionierend gemacht...
[people/pmueller/ipfire-2.x.git] / lfs / stage2
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 = stage2
32TARGET = $(DIR_INFO)/$(THISAPP)
33
34###############################################################################
35# Top-level Rules
36###############################################################################
37
38install : $(TARGET)
39
40check :
41
42download :
43
44md5 :
45
46###############################################################################
47# Installation Details
48###############################################################################
49
50$(TARGET) :
51 @$(PREBUILD)
52
53 # Create directories
c3db995c 54 -mkdir -pv /{bin,boot,etc/opt,etc/modprobe.d,home,lib,mnt,opt}
9b0ff0a0
MT
55 -mkdir -pv /{media/{floppy,cdrom},sbin,srv,var}
56 -install -dv -m 0750 /root
57 -install -dv -m 1777 /tmp /var/tmp
58 -mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}
59 -mkdir -pv /usr/{,local/}share/{doc,info,locale,man}
60 -mkdir -v /usr/{,local/}share/{misc,terminfo,zoneinfo}
61 -mkdir -pv /usr/{,local/}share/man/man{1..8}
90d372c4
MT
62 #-for dir in /usr /usr/local; do \
63 # ln -sv share/{man,doc,info} $$dir; \
64 #done
cd1a2927
MT
65
66 # Symlinks
67 # for this reason, stage2 rebuild will broke the iso:perl, grubbatch
9b0ff0a0
MT
68 -ln -sv /tools/bin/{bash,cat,grep,pwd,stty} /bin
69 -ln -sv /tools/bin/perl /usr/bin
70 -ln -sv /tools/lib/libgcc_s.so{,.1} /usr/lib
71 -ln -sv bash /bin/sh
cd1a2927
MT
72
73 # Config files
74 for i in $(DIR_SRC)/config/etc/*; do \
75 [ -f $$i ] && cp $$i /etc; \
76 done
9b0ff0a0 77 touch /etc/mtab
0b59f25c
MT
78 echo "$(NAME) v$(VERSION) - $(SLOGAN)" > /etc/issue
79 echo "===============================" >> /etc/issue
80 echo "\n running on \s \r \m" >> /etc/issue
81
71e32384
MT
82 # Bash startup files
83 install --directory --mode=0755 --owner=root --group=root /etc/profile.d
84 for i in $(DIR_SRC)/config/profile.d/*; do \
85 [ -f $$i ] && cp $$i /etc/profile.d; \
86 done
cd1a2927
MT
87
88 # Scripts
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`; \
92 done
93
94 # Nobody user
95 -mkdir -p /home/nobody
96 chown -R nobody:nobody /home/nobody
97
9b0ff0a0
MT
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 touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
102 chgrp -v utmp /var/run/utmp /var/log/lastlog
103 chmod -v 664 /var/run/utmp /var/log/lastlog
6d4147d2 104
90d372c4
MT
105 # Permissions
106 chmod 0711 /var/empty
107
cd1a2927 108 @$(POSTBUILD)