mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Installer
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@349 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -3,32 +3,32 @@ default saved
|
||||
foreground = 16064e
|
||||
background = ffffff
|
||||
gfxmenu /grub/message
|
||||
title IPFire (1024x768)
|
||||
title IPFire KVERSION (1024x768)
|
||||
root (hd0,0)
|
||||
kernel /vmlinuz root=ROOT panic=10 vga=791 splash=silent ro
|
||||
initrd /initrd.splash
|
||||
savedefault 0
|
||||
title IPFire (640x480)
|
||||
title IPFire KVERSION (640x480)
|
||||
root (hd0,0)
|
||||
kernel /vmlinuz root=ROOT panic=10 vga=785 splash=silent ro
|
||||
initrd /initrd.splash
|
||||
savedefault 1
|
||||
title IPFire SMP (1024x768)
|
||||
title IPFire KVERSION SMP (1024x768)
|
||||
root (hd0,0)
|
||||
kernel /vmlinuz-smp root=ROOT panic=10 acpi=off vga=791 splash=silent ro
|
||||
initrd /initrd.splash
|
||||
savedefault 2
|
||||
title IPFire SMP (640x480)
|
||||
title IPFire KVERSION SMP (640x480)
|
||||
root (hd0,0)
|
||||
kernel /vmlinuz-smp root=ROOT panic=10 acpi=off vga=785 splash=silent ro
|
||||
initrd /initrd.splash
|
||||
savedefault 3
|
||||
title IPFire SMP (Intel Pentium 4) (1024x768)
|
||||
title IPFire KVERSION SMP-HT (Intel Pentium 4) (1024x768)
|
||||
root (hd0,0)
|
||||
kernel /vmlinuz-smp root=ROOT panic=10 acpi=ht vga=791 splash=silent ro
|
||||
initrd /initrd.splash
|
||||
savedefault 4
|
||||
title IPFire SMP (Intel Pentium 4) (640x480)
|
||||
title IPFire KVERSION SMP-HT (Intel Pentium 4) (640x480)
|
||||
root (hd0,0)
|
||||
kernel /vmlinuz-smp root=ROOT panic=10 acpi=ht vga=785 splash=silent ro
|
||||
initrd /initrd.splash
|
||||
|
||||
@@ -588,7 +588,7 @@ usr/lib/perl5/5.8.8/i586-linux/Unicode/Normalize.pm
|
||||
#usr/lib/perl5/5.8.8/i586-linux/XS
|
||||
#usr/lib/perl5/5.8.8/i586-linux/XS/APItest.pm
|
||||
#usr/lib/perl5/5.8.8/i586-linux/XS/Typemap.pm
|
||||
#usr/lib/perl5/5.8.8/i586-linux/XSLoader.pm
|
||||
usr/lib/perl5/5.8.8/i586-linux/XSLoader.pm
|
||||
#usr/lib/perl5/5.8.8/i586-linux/attrs.pm
|
||||
#usr/lib/perl5/5.8.8/i586-linux/auto
|
||||
#usr/lib/perl5/5.8.8/i586-linux/auto/B
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#bin/pwd
|
||||
#bin/stty
|
||||
#boot
|
||||
dev/null
|
||||
dev/console
|
||||
etc/certparams
|
||||
etc/fstab
|
||||
etc/group
|
||||
@@ -36,6 +38,7 @@ mnt
|
||||
root
|
||||
sbin
|
||||
#srv
|
||||
tmp
|
||||
#usr/bin/perl
|
||||
#usr/include
|
||||
#usr/lib
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
* java-1.5.0_06-for-ipfire
|
||||
* jpegsrc.v6b
|
||||
* kbd-1.12
|
||||
* kudzu-1.1.95.15
|
||||
* kudzu-1.2.60
|
||||
* l7-protocols-2006-09-10
|
||||
* lame-3.96.1
|
||||
|
||||
@@ -181,6 +181,8 @@ char *de_tr[] = {
|
||||
"Installation abgebrochen.",
|
||||
/* TR_INSTALLING_FILES */
|
||||
"Installiere Dateien...",
|
||||
/* TR_INSTALLING_LANG_CACHE */
|
||||
"Installiere Sprachunterstützung...",
|
||||
/* TR_INSTALLING_GRUB */
|
||||
"Installiere GRUB...",
|
||||
/* TR_INTERFACE */
|
||||
@@ -423,6 +425,8 @@ char *de_tr[] = {
|
||||
"Kann ISDN nicht initialisieren.",
|
||||
/* TR_UNABLE_TO_INSTALL_FILES */
|
||||
"Kann die Dateien nicht installieren.",
|
||||
/* TR_UNABLE_TO_INSTALL_LANG_CACHE */
|
||||
"Kann Sprachunterstützung nicht installieren.",
|
||||
/* TR_UNABLE_TO_INSTALL_GRUB */
|
||||
"Kann GRUB nicht installieren.",
|
||||
/* TR_UNABLE_TO_LOAD_DRIVER_MODULE */
|
||||
|
||||
@@ -179,6 +179,8 @@ char *en_tr[] = {
|
||||
"Installing files...",
|
||||
/* TR_INSTALLING_GRUB */
|
||||
"Installing GRUB...",
|
||||
/* TR_INSTALLING_LANG_CACHE */
|
||||
"Installing language files...",
|
||||
/* TR_INTERFACE */
|
||||
"%s interface",
|
||||
/* TR_INTERFACE_FAILED_TO_COME_UP */
|
||||
@@ -419,6 +421,8 @@ char *en_tr[] = {
|
||||
"Unable to initialise ISDN.",
|
||||
/* TR_UNABLE_TO_INSTALL_FILES */
|
||||
"Unable to install files.",
|
||||
/* TR_UNABLE_TO_INSTALL_LANG_CACHE */
|
||||
"Unable to install language files.",
|
||||
/* TR_UNABLE_TO_INSTALL_GRUB */
|
||||
"Unable to install GRUB.",
|
||||
/* TR_UNABLE_TO_LOAD_DRIVER_MODULE */
|
||||
|
||||
10
lfs/cdrom
10
lfs/cdrom
@@ -38,19 +38,13 @@ TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
###############################################################################
|
||||
|
||||
objects = $(DL_FILE) \
|
||||
rawwritewin-0.7.zip \
|
||||
install-en-1.4.0.pdf.zip \
|
||||
quickstart-en.pdf.zip
|
||||
rawwritewin-0.7.zip
|
||||
|
||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
rawwritewin-0.7.zip = http://uranus.it.swin.edu.au/~jn/linux/rawwritewin-0.7.zip
|
||||
install-en-1.4.0.pdf.zip = $(URL_SFNET)/ipcop/install-en-1.4.0.pdf.zip
|
||||
quickstart-en.pdf.zip = http://www.ipcop.org/1.4.0/en/quickstart/quickstart-en.pdf.zip
|
||||
|
||||
$(DL_FILE)_MD5 = 7dac6ea496014d32dbce6c50feb254ca
|
||||
rawwritewin-0.7.zip_MD5 = 0130b497c8c3bc7d136a4236b0d9fbf6
|
||||
install-en-1.4.0.pdf.zip_MD5 = 07e0b5131f1434010d8a00571f9acd81
|
||||
quickstart-en.pdf.zip_MD5 = ca77ef5f1efca6bc519cc42acfd69aa4
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
@@ -97,8 +91,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
sed 's/VERSION/$(VERSION)/' $(DIR_SRC)/config/cdrom/README.txt > /install/cdrom/README.txt
|
||||
cp $(DIR_SRC)/doc/COPYING /install/cdrom/
|
||||
cp /install/images/*.img /install/cdrom/images
|
||||
unzip $(DIR_DL)/install-en-1.4.0.pdf.zip -d /install/cdrom/doc
|
||||
unzip $(DIR_DL)/quickstart-en.pdf.zip -d /install/cdrom/doc
|
||||
cp $(DIR_SRC)/doc/{ChangeLog,packages-list.txt} /install/cdrom/doc
|
||||
cp $(DIR_DL)/rawrite.exe /install/cdrom/dosutils
|
||||
unzip -j -L $(DIR_DL)/rawwritewin*.zip -x "*.txt" -d /install/cdrom/dosutils
|
||||
|
||||
72
lfs/strip
Normal file
72
lfs/strip
Normal file
@@ -0,0 +1,72 @@
|
||||
###############################################################################
|
||||
# This file is part of the IPCop Firewall. #
|
||||
# #
|
||||
# IPCop 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 #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPCop 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 <rod@sunsetsystems.com> #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Definitions
|
||||
###############################################################################
|
||||
|
||||
include Config
|
||||
|
||||
VER = ipfire
|
||||
|
||||
THISAPP = strip
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
check :
|
||||
|
||||
download :
|
||||
|
||||
md5 :
|
||||
|
||||
###############################################################################
|
||||
# Installation Details
|
||||
###############################################################################
|
||||
|
||||
$(TARGET) :
|
||||
|
||||
ifeq "$(LFS_PASS)" "toolchain"
|
||||
-find $(TOOLS_DIR)/lib -type f -exec $(TOOLS_DIR)/bin/strip --strip-debug '{}' ';'
|
||||
-find $(TOOLS_DIR)/{bin,sbin,libexec} -type f -exec $(TOOLS_DIR)/bin/strip --strip-all '{}' ';'
|
||||
rm -rf $(TOOLS_DIR)/{,share/}{doc,info,man}
|
||||
endif
|
||||
|
||||
ifeq "$(LFS_PASS)" "install"
|
||||
# Add -ls before -exec if you want to verify what files are in the path to be stripped
|
||||
# A running binary can't be stripped, so use the version from /tools
|
||||
# It may fail (signal 11) under circonstance not identified by me (Gilles),
|
||||
# to strip libc again so ignore the error now. Probably need a static strip for libc
|
||||
# Don't use --strip-all on libraries, or they'll be destroyed. Don't use --strip-unneeded, either.
|
||||
-/tools/bin/find /lib /usr/lib /usr/share/rrdtool-* /install/initrd/lib \
|
||||
-type f \( -name '*.so' -o -name '*.so[\.0-9]*' \) \
|
||||
-exec $(TOOLS_DIR)/bin/strip --strip-debug {} \; #2>/dev/null
|
||||
|
||||
-/tools/bin/strip --strip-all /{,usr/}{,local/}{bin,sbin}/* /install/{initrd,misc}/bin/*
|
||||
-/tools/bin/strip --strip-all /usr/lib/awk/{grcat,pwcat}
|
||||
-/tools/bin/strip --strip-all /usr/lib/gcc/*-linux-gnu/4.0.3/{cc1*,collect2}
|
||||
endif
|
||||
|
||||
26
make.sh
26
make.sh
@@ -578,32 +578,8 @@ buildpackages() {
|
||||
LOGFILE="$BASEDIR/log/_build.packages.log"
|
||||
export LOGFILE
|
||||
echo "... see detailed log in _build.*.log files" >> $LOGFILE
|
||||
# Strip files
|
||||
echo -n "Stripping files" | tee -a $LOGFILE
|
||||
find $LFS/lib $LFS/usr/lib $LFS/usr/share/rrdtool-* $LFS/install ! -type l \( -name '*.so' -o -name '*.so[\.0-9]*' \) \
|
||||
! -name 'libc.so' ! -name 'libpthread.so' ! -name 'libcrypto.so.0.9.7.sha1' \
|
||||
-exec $LFS/tools/bin/strip --strip-all {} \; >> $LOGFILE 2>&1
|
||||
# add -ls before -exec if you want to verify what files are stripped
|
||||
|
||||
find $LFS/{,s}bin $LFS/usr/{,s}bin $LFS/usr/local/{,s}bin ! -type l \
|
||||
-exec file {} \; | grep " ELF " | cut -f1 -d ':' | xargs $LFS/tools/bin/strip --strip-all >> $LOGFILE 2>&1
|
||||
# there add -v to strip to verify
|
||||
beautify message DONE
|
||||
|
||||
# Create fcdsl packages
|
||||
# echo "`date -u '+%b %e %T'`: Building fcdsl tgz" | tee -a $LOGFILE
|
||||
# cp $LFS/install/images/fcdsl/license.txt $LFS >> $LOGFILE 2>&1
|
||||
# touch $LFS/var/run/{need-depmod-$KVER,need-depmod-$KVER-smp}
|
||||
# cd $LFS && tar cvfz $LFS/install/images/$SNAME-fcdsl-$VERSION.$MACHINE.tgz \
|
||||
# lib/modules/$KVER/misc/fcdsl*.o.gz \
|
||||
# lib/modules/$KVER-smp/misc/fcdsl*.o.gz \
|
||||
# usr/lib/isdn/{fds?base.bin,fd?ubase.frm} \
|
||||
# etc/fcdsl/fcdsl*.conf \
|
||||
# etc/drdsl/{drdsl,drdsl.ini} \
|
||||
# license.txt \
|
||||
# var/run/{need-depmod-$KVER,need-depmod-$KVER-smp} >> $LOGFILE 2>&1
|
||||
# rm -f $LFS/license.txt >> $LOGFILE 2>&1
|
||||
# cd $BASEDIR
|
||||
installmake strip
|
||||
|
||||
# Generating list of packages used
|
||||
echo -n "Generating packages list from logs" | tee -a $LOGFILE
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
/bin/cp -f /usr/share/grub/i386-pc/* /boot/grub
|
||||
/usr/sbin/grub --no-floppy --batch <<EOT > /dev/null 2> /dev/null
|
||||
/bin/cp -f /usr/lib/grub/i386-pc/* /boot/grub
|
||||
/usr/sbin/grub --no-floppy --batch <<EOT > /tmp/grub-install 2>&1
|
||||
device (hd0) DEVICE
|
||||
root (hd0,0)
|
||||
setup (hd0,0)
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
if [ -e /harddisk/boot/ipfirerd.img ]; then
|
||||
/sbin/chroot /harddisk /sbin/splash -s -f /boot/splash/config/bootsplash-1024x768.cfg >> /harddisk/boot/ipfirerd.img
|
||||
/sbin/chroot /harddisk /sbin/splash -s -f /boot/splash/config/bootsplash-1024x768.cfg >> /harddisk/boot/ipfirerd-smp.img
|
||||
/sbin/chroot /harddisk /sbin/splash -s -f \
|
||||
/boot/splash/config/bootsplash-1024x768.cfg >> /harddisk/boot/ipfirerd.img
|
||||
/sbin/chroot /harddisk /sbin/splash -s -f \
|
||||
/boot/splash/config/bootsplash-1024x768.cfg >> /harddisk/boot/ipfirerd-smp.img
|
||||
else
|
||||
/sbin/chroot /harddisk /sbin/splash -s -f /boot/splash/config/bootsplash-1024x768.cfg > /harddisk/boot/initrd.splash
|
||||
/sbin/chroot /harddisk /sbin/splash -s -f \
|
||||
/boot/splash/config/bootsplash-1024x768.cfg > /harddisk/boot/initrd.splash
|
||||
fi
|
||||
|
||||
@@ -180,7 +180,7 @@ int unattended_setup(struct keyvalue *unattendedkv) {
|
||||
if (!(file = fopen("/harddisk/etc/hosts.allow", "w")))
|
||||
{
|
||||
errorbox("unattended: ERROR writing hosts.allow");
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
fprintf(file, "sshd : ALL\n");
|
||||
fprintf(file, "ALL : localhost\n");
|
||||
@@ -681,20 +681,11 @@ int main(int argc, char *argv[])
|
||||
errorbox(ctr[TR_UNABLE_TO_MOUNT_LOG_FILESYSTEM]);
|
||||
goto EXIT;
|
||||
} */
|
||||
|
||||
snprintf(commandstring, STRING_SIZE, "/bin/mount -o ro %s /cdrom", insertdevnode);
|
||||
|
||||
snprintf(commandstring, STRING_SIZE, "/bin/tar -C /harddisk -xvjf /cdrom/" SNAME "-" VERSION ".tbz2");
|
||||
|
||||
/* if (runcommandwithprogress(60, 4, title, commandstring, 4600,
|
||||
* ctr[TR_INSTALLING_FILES]))
|
||||
* {
|
||||
* errorbox(ctr[TR_UNABLE_TO_INSTALL_FILES]);
|
||||
* goto EXIT;
|
||||
* }
|
||||
*/
|
||||
|
||||
if (runcommandwithstatus(commandstring, ctr[TR_INSTALLING_FILES]))
|
||||
if (runcommandwithprogress(60, 4, title, commandstring, INST_FILECOUNT,
|
||||
ctr[TR_INSTALLING_FILES]))
|
||||
{
|
||||
errorbox(ctr[TR_UNABLE_TO_INSTALL_FILES]);
|
||||
goto EXIT;
|
||||
@@ -746,12 +737,40 @@ int main(int argc, char *argv[])
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
/*
|
||||
Allow the user to restore their configuration from a floppy.
|
||||
It uses tar. If the tar fails for any reason, show user an
|
||||
error and go back to the restore/skip question. This gives
|
||||
the user the chance to have another go. */
|
||||
|
||||
/* Build cache lang file */
|
||||
snprintf(commandstring, STRING_SIZE, "/bin/chroot /harddisk /usr/bin/perl -e \"require '" CONFIG_ROOT "/lang.pl'; &Lang::BuildCacheLang\"");
|
||||
if (runcommandwithstatus(commandstring, ctr[TR_INSTALLING_LANG_CACHE]))
|
||||
{
|
||||
errorbox(ctr[TR_UNABLE_TO_INSTALL_LANG_CACHE]);
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
if (raid_disk)
|
||||
sprintf(string, "root=%sp3", hdparams.devnode);
|
||||
else
|
||||
sprintf(string, "root=%s3", hdparams.devnode);
|
||||
replace( "/harddisk/boot/grub/grub.conf", "root=ROOT", string);
|
||||
mysystem( "sed -i \"s|KVERSION|$(/bin/uname -r)|\" /harddisk/boot/grub/grub.conf" );
|
||||
|
||||
replace( "/harddisk/boot/grub/grubbatch", "DEVICE", hdparams.devnode);
|
||||
/* restore permissions */
|
||||
chmod("/harddisk/boot/grub/grubbatch", S_IXUSR | S_IRUSR | S_IXGRP | S_IRGRP | S_IXOTH | S_IROTH);
|
||||
|
||||
/* mount proc filesystem */
|
||||
mysystem("mkdir /harddisk/proc");
|
||||
mysystem("/bin/mount -t proc none /harddisk/proc");
|
||||
mysystem("/bin/mount --bind /dev /harddisk/dev");
|
||||
|
||||
snprintf(commandstring, STRING_SIZE,
|
||||
"/bin/chroot /harddisk /boot/grub/grubbatch");
|
||||
if (runcommandwithstatus(commandstring, ctr[TR_INSTALLING_GRUB])) {
|
||||
errorbox(ctr[TR_UNABLE_TO_INSTALL_GRUB]);
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
mysystem("umount /harddisk/proc/");
|
||||
mysystem("umount /harddisk/dev/");
|
||||
|
||||
EXIT:
|
||||
fprintf(flog, "Install program ended.\n");
|
||||
fflush(flog);
|
||||
|
||||
Reference in New Issue
Block a user