From 0b59f25c65d9e22c8b6df41d474f780e86ea4613 Mon Sep 17 00:00:00 2001 From: ms Date: Thu, 25 Jan 2007 15:36:43 +0000 Subject: [PATCH] Installer fuer ein read-only-Dateisystem angepasst. mingetty entfernt, da wir agetty verwenden. issue veraendert git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@396 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- config/grub/grub.conf | 12 ++-- config/grub/scsigrub.conf | 12 ++-- config/install/fstab | 3 +- config/install/rc | 3 - config/rootfiles/common/mingetty | 2 - lfs/initrd | 2 +- lfs/mingetty | 78 ------------------------ lfs/stage2 | 5 +- make.sh | 13 ++-- src/install+setup/install/main.c | 6 +- src/install+setup/install/mountsource.sh | 4 +- tools/make-functions | 16 ++--- 12 files changed, 36 insertions(+), 120 deletions(-) delete mode 100644 config/rootfiles/common/mingetty delete mode 100644 lfs/mingetty diff --git a/config/grub/grub.conf b/config/grub/grub.conf index 6fb997fc5b..9cfd63d2aa 100644 --- a/config/grub/grub.conf +++ b/config/grub/grub.conf @@ -8,9 +8,9 @@ title IPFire (1024x768) kernel /vmlinuz root=ROOT panic=10 vga=791 splash=silent ro initrd /initrd.splash savedefault 0 -title IPFire (640x480) +title IPFire (VESA) root (hd0,0) - kernel /vmlinuz root=ROOT panic=10 vga=785 splash=silent ro + kernel /vmlinuz root=ROOT panic=10 ro initrd /initrd.splash savedefault 1 title IPFire SMP (1024x768) @@ -18,9 +18,9 @@ title IPFire SMP (1024x768) 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 SMP (VESA) root (hd0,0) - kernel /vmlinuz-smp root=ROOT panic=10 acpi=off vga=785 splash=silent ro + kernel /vmlinuz-smp root=ROOT panic=10 acpi=off ro initrd /initrd.splash savedefault 3 title IPFire SMP-HT (Intel Pentium 4) (1024x768) @@ -28,8 +28,8 @@ title IPFire SMP-HT (Intel Pentium 4) (1024x768) kernel /vmlinuz-smp root=ROOT panic=10 acpi=ht vga=791 splash=silent ro initrd /initrd.splash savedefault 4 -title IPFire SMP-HT (Intel Pentium 4) (640x480) +title IPFire SMP-HT (Intel Pentium 4) (VESA) root (hd0,0) - kernel /vmlinuz-smp root=ROOT panic=10 acpi=ht vga=785 splash=silent ro + kernel /vmlinuz-smp root=ROOT panic=10 acpi=ht ro initrd /initrd.splash savedefault 5 diff --git a/config/grub/scsigrub.conf b/config/grub/scsigrub.conf index 91d9f6da1d..dd5fb88e7e 100644 --- a/config/grub/scsigrub.conf +++ b/config/grub/scsigrub.conf @@ -8,9 +8,9 @@ title IPFire (1024x768) kernel /vmlinuz root=ROOT panic=10 init=/linuxrc vga=791 splash=silent rw initrd /ipfirerd.img savedefault 0 -title IPFire (640x480) +title IPFire (VESA) root (hd0,0) - kernel /vmlinuz root=ROOT panic=10 init=/linuxrc vga=785 splash=silent rw + kernel /vmlinuz root=ROOT panic=10 init=/linuxrc rw initrd /ipfirerd.img savedefault 1 title IPFire SMP (1024x768) @@ -18,9 +18,9 @@ title IPFire SMP (1024x768) kernel /vmlinuz-smp root=ROOT panic=10 init=/linuxrc acpi=off vga=791 splash=silent rw initrd /ipfirerd-smp.img savedefault 2 -title IPFire SMP (640x480) +title IPFire SMP (VESA) root (hd0,0) - kernel /vmlinuz-smp root=ROOT panic=10 init=/linuxrc acpi=off vga=785 splash=silent rw + kernel /vmlinuz-smp root=ROOT panic=10 init=/linuxrc acpi=off rw initrd /ipfirerd-smp.img savedefault 3 title IPFire SMP (Intel Pentium 4) (1024x768) @@ -28,8 +28,8 @@ title IPFire SMP (Intel Pentium 4) (1024x768) kernel /vmlinuz-smp root=ROOT panic=10 init=/linuxrc acpi=ht vga=791 splash=silent rw initrd /ipfirerd-smp.img savedefault 4 -title IPFire SMP (Intel Pentium 4) (640x480) +title IPFire SMP (Intel Pentium 4) (VESA) root (hd0,0) - kernel /vmlinuz-smp root=ROOT panic=10 init=/linuxrc acpi=ht vga=785 splash=silent rw + kernel /vmlinuz-smp root=ROOT panic=10 init=/linuxrc acpi=ht rw initrd /ipfirerd-smp.img savedefault 5 diff --git a/config/install/fstab b/config/install/fstab index ea05c008c2..58297c2b15 100644 --- a/config/install/fstab +++ b/config/install/fstab @@ -1,5 +1,4 @@ -/dev/ram0 / ext2 -/dev/fd0 / ext2 +/dev/ram0 / squashfs /proc /proc proc none /sys sysfs none /tmp tmpfs diff --git a/config/install/rc b/config/install/rc index 2e21d89807..ae0a00b0e8 100644 --- a/config/install/rc +++ b/config/install/rc @@ -37,6 +37,3 @@ syslogd -O /dev/tty4 echo "Starting udev" /sbin/udevstart - -# Clearing screen -/sbin/splash master diff --git a/config/rootfiles/common/mingetty b/config/rootfiles/common/mingetty deleted file mode 100644 index 723b5f7974..0000000000 --- a/config/rootfiles/common/mingetty +++ /dev/null @@ -1,2 +0,0 @@ -sbin/mingetty -#usr/share/man/man8/mingetty.8 diff --git a/lfs/initrd b/lfs/initrd index 855e0d95ee..5b63a28977 100644 --- a/lfs/initrd +++ b/lfs/initrd @@ -50,7 +50,7 @@ md5 : $(TARGET) : @$(PREBUILD) - rm -f /install/images/{cdinitrd,cdinitrd.gz,fdinitrd,fdinitrd.gz} + rm -f /install/images/initrd # Finish up initrd directory -mkdir -p /install/initrd/{dev,etc,mnt,root,lib/modules/$(KVER)/kernel/drivers,cdrom,dev,harddisk,proc,tmp,usr/share/terminfo/l,var/run,sys} && \ diff --git a/lfs/mingetty b/lfs/mingetty deleted file mode 100644 index d46d673fae..0000000000 --- a/lfs/mingetty +++ /dev/null @@ -1,78 +0,0 @@ -############################################################################### -# 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 # -# # -############################################################################### - -############################################################################### -# Definitions -############################################################################### - -include Config - -VER = 1.07 - -THISAPP = mingetty_$(VER) -DL_FILE = $(THISAPP).tar.gz -DL_FROM = $(URL_IPFIRE) -DIR_APP = $(DIR_SRC)/mingetty-$(VER).orig -TARGET = $(DIR_INFO)/$(THISAPP) - -############################################################################### -# Top-level Rules -############################################################################### - -objects = $(DL_FILE) - -$(DL_FILE) = $(DL_FROM)/$(DL_FILE) - -$(DL_FILE)_MD5 = 491dedf1ceff0e0f5f7bb9f55bf5213e - -install : $(TARGET) - -check : $(patsubst %,$(DIR_CHK)/%,$(objects)) - -download :$(patsubst %,$(DIR_DL)/%,$(objects)) - -md5 : $(subst %,%_MD5,$(objects)) - -############################################################################### -# Downloading, checking, md5sum -############################################################################### - -$(patsubst %,$(DIR_CHK)/%,$(objects)) : - @$(CHECK) - -$(patsubst %,$(DIR_DL)/%,$(objects)) : - @$(LOAD) - -$(subst %,%_MD5,$(objects)) : - @$(MD5) - -############################################################################### -# Installation Details -############################################################################### - -$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) - @$(PREBUILD) - @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) - cd $(DIR_APP) && make $(MAKETUNING) - cd $(DIR_APP) && make install - @rm -rf $(DIR_APP) - @$(POSTBUILD) diff --git a/lfs/stage2 b/lfs/stage2 index 76a12aead4..623467c73b 100644 --- a/lfs/stage2 +++ b/lfs/stage2 @@ -75,7 +75,10 @@ $(TARGET) : [ -f $$i ] && cp $$i /etc; \ done touch /etc/mtab - echo "$(NAME) v$(VERSION) - $(SLOGAN)" > /etc/issue + echo "$(NAME) v$(VERSION) - $(SLOGAN)" > /etc/issue + echo "===============================" >> /etc/issue + echo "\n running on \s \r \m" >> /etc/issue + # Scripts for i in `find $(DIR_SRC)/src/scripts -maxdepth 1 -type f`; do \ diff --git a/make.sh b/make.sh index 0cb28131a8..4119f6e248 100644 --- a/make.sh +++ b/make.sh @@ -401,7 +401,6 @@ buildipfire() { ipfiremake kudzu ipfiremake logrotate ipfiremake logwatch - ipfiremake mingetty ipfiremake misc-progs ipfiremake mtools ipfiremake nano @@ -676,13 +675,11 @@ build) fi beautify build_start - beautify build_stage_start "Building base" + beautify build_stage "Building LFS" buildbase - beautify build_stage_end - beautify build_stage_start "Building IPFire" + beautify build_stage "Building IPFire" buildipfire - beautify build_stage_end # Setzen des IPFire Builds if [ "$FIREBUILD" ]; then @@ -691,13 +688,11 @@ build) echo "_(OvO)_" > $BASEDIR/build/var/ipfire/firebuild fi - beautify build_stage_start "Building installer" + beautify build_stage "Building installer" buildinstaller - beautify build_stage_end - beautify build_stage_start "Building packages" + beautify build_stage "Building packages" buildpackages - beautify build_stage_end beautify build_end ;; shell) diff --git a/src/install+setup/install/main.c b/src/install+setup/install/main.c index 44ce1f06ba..cf6ee7c018 100644 --- a/src/install+setup/install/main.c +++ b/src/install+setup/install/main.c @@ -335,7 +335,7 @@ int main(int argc, char *argv[]) } /* read source drive letter */ - if ((handle = fopen("/source_device", "r")) == NULL) { + if ((handle = fopen("/tmp/source_device", "r")) == NULL) { errorbox(ctr[TR_ERROR_PROBING_CDROM]); goto EXIT; } @@ -457,11 +457,11 @@ int main(int argc, char *argv[]) * the disk. */ /* Don't use mysystem here so we can redirect output */ - sprintf(commandstring, "/bin/sfdisk -s /dev/%s > /disksize 2> /dev/null", harddrive); + sprintf(commandstring, "/bin/sfdisk -s /dev/%s > /tmp/disksize 2> /dev/null", harddrive); system(commandstring); /* Calculate amount of disk space */ - if ((handle = fopen("/disksize", "r"))) + if ((handle = fopen("/tmp/disksize", "r"))) { fgets(line, STRING_SIZE-1, handle); if (sscanf (line, "%s", string)) { diff --git a/src/install+setup/install/mountsource.sh b/src/install+setup/install/mountsource.sh index 6706cca26a..3d25255d1b 100644 --- a/src/install+setup/install/mountsource.sh +++ b/src/install+setup/install/mountsource.sh @@ -11,7 +11,7 @@ echo "Scanning source media" for DEVICE in $(kudzu -qps -t 30 -c CDROM | grep device: | cut -d ' ' -f 2 | sort | uniq); do mount /dev/${DEVICE} /cdrom 2> /dev/null if [ -e /cdrom/boot ]; then - echo -n ${DEVICE} > /source_device + echo -n ${DEVICE} > /tmp/source_device exit 0 fi umount /cdrom 2> /dev/null @@ -21,7 +21,7 @@ done for DEVICE in $(kudzu -qps -t 30 -c HD | grep device: | cut -d ' ' -f 2 | sort | uniq); do mount /dev/${DEVICE}1 /cdrom 2> /dev/null if [ -e /cdrom/boot ]; then - echo -n ${DEVICE}1 > /source_device + echo -n ${DEVICE}1 > /tmp/source_device exit 1 fi umount /cdrom 2> /dev/null diff --git a/tools/make-functions b/tools/make-functions index 0ef97e5e6c..c288f71c93 100644 --- a/tools/make-functions +++ b/tools/make-functions @@ -106,15 +106,17 @@ beautify() ;; esac ;; - build_stage_start) + build_stage) MESSAGE=$2 + if [ "$STAGE_TIME_START" ]; then + LAST_STAGE_TIME=$[ `date +%s` - $STAGE_TIME_START ] + fi STAGE_TIME_START=`date +%s` - echo -ne "${BOLD}*** ${MESSAGE}${SET_VER_COL} version${SET_OPT_COL} options" - echo -ne "${SET_TIME_COL} time (sec)${SET_RESULT_COL} status${NORMAL}\n" - ;; - build_stage_end) - STAGE_TIME_END=`date +%s` - echo -ne "${BOLD}***This stage took:\t\t $[ $STAGE_TIME_END - $STAGE_TIME_START ] (secs)${NORMAL}\n" + echo -ne "${BOLD}*** ${MESSAGE}${NORMAL}" + if [ "$LAST_STAGE_TIME" ]; then + echo -ne "${DONE} (Last stage took $LAST_STAGE_TIME secs)${NORMAL}" + fi + echo -ne "${BOLD}${SET_VER_COL} version${SET_OPT_COL} options${SET_TIME_COL} time (sec)${SET_RESULT_COL} status${NORMAL}\n" ;; build_start) BUILD_TIME_START=`date +%s` -- 2.39.2