mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
PXE Boot integriert.
Installerarbeit fortgesetzt. git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@351 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.16
|
||||
# Wed Nov 15 11:02:15 2006
|
||||
# Wed Nov 15 12:49:42 2006
|
||||
#
|
||||
CONFIG_X86_32=y
|
||||
CONFIG_SEMAPHORE_SLEEPERS=y
|
||||
@@ -1493,7 +1493,7 @@ CONFIG_SENSORS_HDAPS=m
|
||||
#
|
||||
# Graphics support
|
||||
#
|
||||
CONFIG_FB=m
|
||||
CONFIG_FB=y
|
||||
# CONFIG_FB_CFB_FILLRECT is not set
|
||||
# CONFIG_FB_CFB_COPYAREA is not set
|
||||
# CONFIG_FB_CFB_IMAGEBLIT is not set
|
||||
@@ -1504,7 +1504,10 @@ CONFIG_FB=m
|
||||
# CONFIG_FB_PM2 is not set
|
||||
# CONFIG_FB_CYBER2000 is not set
|
||||
# CONFIG_FB_ARC is not set
|
||||
# CONFIG_FB_ASILIANT is not set
|
||||
# CONFIG_FB_IMSTT is not set
|
||||
# CONFIG_FB_VGA16 is not set
|
||||
# CONFIG_FB_VESA is not set
|
||||
CONFIG_VIDEO_SELECT=y
|
||||
# CONFIG_FB_HGA is not set
|
||||
# CONFIG_FB_S1D13XXX is not set
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.16
|
||||
# Wed Nov 15 11:45:07 2006
|
||||
# Wed Nov 15 12:49:54 2006
|
||||
#
|
||||
CONFIG_X86_32=y
|
||||
CONFIG_SEMAPHORE_SLEEPERS=y
|
||||
@@ -1488,7 +1488,7 @@ CONFIG_SENSORS_HDAPS=m
|
||||
#
|
||||
# Graphics support
|
||||
#
|
||||
CONFIG_FB=m
|
||||
CONFIG_FB=y
|
||||
# CONFIG_FB_CFB_FILLRECT is not set
|
||||
# CONFIG_FB_CFB_COPYAREA is not set
|
||||
# CONFIG_FB_CFB_IMAGEBLIT is not set
|
||||
@@ -1499,7 +1499,10 @@ CONFIG_FB=m
|
||||
# CONFIG_FB_PM2 is not set
|
||||
# CONFIG_FB_CYBER2000 is not set
|
||||
# CONFIG_FB_ARC is not set
|
||||
# CONFIG_FB_ASILIANT is not set
|
||||
# CONFIG_FB_IMSTT is not set
|
||||
# CONFIG_FB_VGA16 is not set
|
||||
# CONFIG_FB_VESA is not set
|
||||
CONFIG_VIDEO_SELECT=y
|
||||
# CONFIG_FB_HGA is not set
|
||||
# CONFIG_FB_S1D13XXX is not set
|
||||
|
||||
@@ -145,7 +145,7 @@ CONFIG_FEATURE_FANCY_ECHO=y
|
||||
# CONFIG_EXPR_MATH_SUPPORT_64 is not set
|
||||
# CONFIG_FALSE is not set
|
||||
# CONFIG_FOLD is not set
|
||||
# CONFIG_HEAD is not set
|
||||
CONFIG_HEAD=y
|
||||
# CONFIG_FEATURE_FANCY_HEAD is not set
|
||||
# CONFIG_HOSTID is not set
|
||||
# CONFIG_ID is not set
|
||||
@@ -168,8 +168,8 @@ CONFIG_MKDIR=y
|
||||
# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
|
||||
CONFIG_MKFIFO=y
|
||||
CONFIG_MKNOD=y
|
||||
# CONFIG_MV is not set
|
||||
# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
|
||||
CONFIG_MV=y
|
||||
CONFIG_FEATURE_MV_LONG_OPTIONS=y
|
||||
CONFIG_NICE=y
|
||||
# CONFIG_NOHUP is not set
|
||||
# CONFIG_OD is not set
|
||||
@@ -177,9 +177,9 @@ CONFIG_NICE=y
|
||||
# CONFIG_PRINTF is not set
|
||||
# CONFIG_PWD is not set
|
||||
# CONFIG_REALPATH is not set
|
||||
# CONFIG_RM is not set
|
||||
CONFIG_RM=y
|
||||
# CONFIG_RMDIR is not set
|
||||
# CONFIG_SEQ is not set
|
||||
CONFIG_SEQ=y
|
||||
# CONFIG_SHA1SUM is not set
|
||||
CONFIG_SLEEP=y
|
||||
# CONFIG_FEATURE_FANCY_SLEEP is not set
|
||||
@@ -197,10 +197,10 @@ CONFIG_TEE=y
|
||||
CONFIG_TEST=y
|
||||
# CONFIG_FEATURE_TEST_64 is not set
|
||||
CONFIG_TOUCH=y
|
||||
# CONFIG_TR is not set
|
||||
# CONFIG_FEATURE_TR_CLASSES is not set
|
||||
# CONFIG_FEATURE_TR_EQUIV is not set
|
||||
# CONFIG_TRUE is not set
|
||||
CONFIG_TR=y
|
||||
CONFIG_FEATURE_TR_CLASSES=y
|
||||
CONFIG_FEATURE_TR_EQUIV=y
|
||||
CONFIG_TRUE=y
|
||||
# CONFIG_TTY is not set
|
||||
CONFIG_UNAME=y
|
||||
CONFIG_UNIQ=y
|
||||
@@ -208,10 +208,10 @@ CONFIG_UNIQ=y
|
||||
# CONFIG_UUDECODE is not set
|
||||
# CONFIG_UUENCODE is not set
|
||||
# CONFIG_WATCH is not set
|
||||
# CONFIG_WC is not set
|
||||
CONFIG_WC=y
|
||||
# CONFIG_WHO is not set
|
||||
# CONFIG_WHOAMI is not set
|
||||
# CONFIG_YES is not set
|
||||
CONFIG_YES=y
|
||||
|
||||
#
|
||||
# Common options for cp and mv
|
||||
@@ -271,17 +271,17 @@ CONFIG_FEATURE_HUMAN_READABLE=y
|
||||
# CONFIG_ED is not set
|
||||
# CONFIG_PATCH is not set
|
||||
CONFIG_SED=y
|
||||
# CONFIG_VI is not set
|
||||
# CONFIG_FEATURE_VI_COLON is not set
|
||||
# CONFIG_FEATURE_VI_YANKMARK is not set
|
||||
# CONFIG_FEATURE_VI_SEARCH is not set
|
||||
# CONFIG_FEATURE_VI_USE_SIGNALS is not set
|
||||
# CONFIG_FEATURE_VI_DOT_CMD is not set
|
||||
# CONFIG_FEATURE_VI_READONLY is not set
|
||||
# CONFIG_FEATURE_VI_SETOPTS is not set
|
||||
# CONFIG_FEATURE_VI_SET is not set
|
||||
# CONFIG_FEATURE_VI_WIN_RESIZE is not set
|
||||
# CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is not set
|
||||
CONFIG_VI=y
|
||||
CONFIG_FEATURE_VI_COLON=y
|
||||
CONFIG_FEATURE_VI_YANKMARK=y
|
||||
CONFIG_FEATURE_VI_SEARCH=y
|
||||
CONFIG_FEATURE_VI_USE_SIGNALS=y
|
||||
CONFIG_FEATURE_VI_DOT_CMD=y
|
||||
CONFIG_FEATURE_VI_READONLY=y
|
||||
CONFIG_FEATURE_VI_SETOPTS=y
|
||||
CONFIG_FEATURE_VI_SET=y
|
||||
CONFIG_FEATURE_VI_WIN_RESIZE=y
|
||||
CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
|
||||
|
||||
#
|
||||
# Finding Utilities
|
||||
|
||||
@@ -327,6 +327,8 @@ char *de_tr[] = {
|
||||
"Automatische Erkennung fehlgeschlagen.",
|
||||
/* TR_PROBING_HARDWARE */
|
||||
"Hardwareerkennung läuft...",
|
||||
/* TR_PROBING_FOR_NICS */
|
||||
"Netzwerkkartenerkennung läuft...",
|
||||
/* TR_PROBLEM_SETTING_ADMIN_PASSWORD */
|
||||
"Problem beim Setzen des %s Administrator-Passworts.",
|
||||
/* TR_PROBLEM_SETTING_ROOT_PASSWORD */
|
||||
|
||||
@@ -323,6 +323,8 @@ char *en_tr[] = {
|
||||
"Auto detecting failed.",
|
||||
/* TR_PROBING_HARDWARE */
|
||||
"Probing hardware...",
|
||||
/* TR_PROBING_FOR_NICS */
|
||||
"Probing for NICs...",
|
||||
/* TR_PROBLEM_SETTING_ADMIN_PASSWORD */
|
||||
"Problem setting %s 'admin' user password.",
|
||||
/* TR_PROBLEM_SETTING_ROOT_PASSWORD */
|
||||
|
||||
@@ -61,6 +61,7 @@ $(TARGET) :
|
||||
cd $(DIR_APP)/install && make CFLAGS="-Os -fomit-frame-pointer -Wall \
|
||||
-DNAME='\"$(NAME)\"' -DSNAME='\"$(SNAME)\"' -DVERSION='\"$(VERSION)\"' \
|
||||
-DSLOGAN='\"$(SLOGAN)\"' -DCONFIG_ROOT='\"$(CONFIG_ROOT)\"' -DKERNEL_VERSION='\"$(KVER)\"'"
|
||||
cd $(DIR_APP)/install && install -v -m 0755 install probehw.sh installbootsplash.sh mountsource.sh /install/initrd/bin
|
||||
cd $(DIR_APP)/install && install -v -m 0755 install probenic.sh \
|
||||
probecntrl.sh probehw.sh installbootsplash.sh mountsource.sh /install/initrd/bin
|
||||
@rm -rf $(DIR_APP)
|
||||
@$(POSTBUILD)
|
||||
|
||||
64
lfs/pxe
Normal file
64
lfs/pxe
Normal file
@@ -0,0 +1,64 @@
|
||||
###############################################################################
|
||||
# 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 = pxe
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
check :
|
||||
|
||||
download :
|
||||
|
||||
md5 :
|
||||
|
||||
###############################################################################
|
||||
# Installation Details
|
||||
###############################################################################
|
||||
|
||||
$(TARGET) :
|
||||
# Create install pxe package as an alternate way to boot during install
|
||||
rm -rf /tmp/*
|
||||
mkdir -p /tmp/$(VERSION) /tmp/pxelinux.cfg
|
||||
cp /usr/lib/syslinux/pxelinux.0 /tmp
|
||||
cp /install/cdrom/boot/isolinux/{instroot.gz,message,vmlinuz} /tmp/$(VERSION)
|
||||
sed -e "s|message|$(VERSION)/message|" \
|
||||
-e "s|vmlinuz|$(VERSION)/vmlinuz|" \
|
||||
-e "s|instroot|$(VERSION)/instroot|" \
|
||||
/install/cdrom/boot/isolinux/isolinux.cfg \
|
||||
> /tmp/pxelinux.cfg/$(SNAME)-pxe-$(VERSION).model
|
||||
chmod 444 /tmp/$(VERSION)/instroot.gz
|
||||
cd /tmp && tar cvzf \
|
||||
/install/images/$(SNAME)-$(VERSION)-pxe-$(MACHINE).tgz *
|
||||
rm -rf /tmp/*
|
||||
4
make.sh
4
make.sh
@@ -596,9 +596,9 @@ buildpackages() {
|
||||
# packages-list.txt is ready to be displayed for wiki page
|
||||
beautify message DONE
|
||||
|
||||
# Create ISO for CDROM
|
||||
# Create images for install
|
||||
ipfiremake pxe
|
||||
ipfiremake cdrom
|
||||
rm -f $LFS/install/images/*usb*
|
||||
cp $LFS/install/images/{*.iso,*.tgz} $BASEDIR >> $LOGFILE 2>&1
|
||||
|
||||
# ipfirepackages
|
||||
|
||||
@@ -37,7 +37,7 @@ int ejectcdrom(char *dev);
|
||||
int networkmenu(struct keyvalue *ethernetkv);
|
||||
|
||||
/* net.c */
|
||||
int checktarball(char *);
|
||||
int checktarball(char *, char *message);
|
||||
|
||||
/* config.c */
|
||||
int write_disk_configs(struct devparams *dp);
|
||||
@@ -47,12 +47,6 @@ int write_ethernet_configs(struct keyvalue *ethernetkv);
|
||||
/* pcmcia.c */
|
||||
char * initialize_pcmcia (void);
|
||||
|
||||
/* upgrade_v12_v13.c */
|
||||
int upgrade_v12_v13();
|
||||
|
||||
/* upgrade_v130_v131.c */
|
||||
int upgrade_v130_v140();
|
||||
|
||||
/* usb.c */
|
||||
int initialize_usb();
|
||||
int write_usb_modules_conf();
|
||||
|
||||
@@ -394,31 +394,48 @@ int main(int argc, char *argv[])
|
||||
// Starting hardware detection
|
||||
runcommandwithstatus("/bin/probehw.sh", ctr[TR_PROBING_HARDWARE]);
|
||||
|
||||
switch (mysystem("/bin/mountsource.sh")) {
|
||||
case 0:
|
||||
installtype = CDROM_INSTALL;
|
||||
cdmounted = 1;
|
||||
break;
|
||||
case 1:
|
||||
installtype = DISK_INSTALL;
|
||||
break;
|
||||
case 10:
|
||||
errorbox(ctr[TR_NO_CDROM]);
|
||||
goto EXIT;
|
||||
/* CDROM INSTALL */
|
||||
if (installtype == CDROM_INSTALL) {
|
||||
|
||||
switch (mysystem("/bin/mountsource.sh")) {
|
||||
case 0:
|
||||
installtype = CDROM_INSTALL;
|
||||
cdmounted = 1;
|
||||
break;
|
||||
case 1:
|
||||
installtype = DISK_INSTALL;
|
||||
break;
|
||||
case 10:
|
||||
errorbox(ctr[TR_NO_CDROM]);
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
/* read source drive letter */
|
||||
if ((handle = fopen("/source_device", "r")) == NULL) {
|
||||
errorbox("ERROR reading source_device");
|
||||
}
|
||||
fgets(sourcedrive, 5, handle);
|
||||
fprintf(flog, "Source drive: %s\n", sourcedrive);
|
||||
fclose(handle);
|
||||
|
||||
snprintf(cdromparams.devnode, STRING_SIZE, "/dev/%s", sourcedrive);
|
||||
cdromparams.module = 0;
|
||||
fprintf(flog, "Source device: %s\n", cdromparams.devnode);
|
||||
}
|
||||
|
||||
/* read source drive letter */
|
||||
if ((handle = fopen("/source_device", "r")) == NULL) {
|
||||
errorbox("ERROR reading source_device");
|
||||
}
|
||||
fgets(sourcedrive, 5, handle);
|
||||
fprintf(flog, "Source drive: %s\n", sourcedrive);
|
||||
fclose(handle);
|
||||
|
||||
if (installtype == CDROM_INSTALL) {
|
||||
snprintf(cdromparams.devnode, STRING_SIZE, "/dev/%s", sourcedrive);
|
||||
cdromparams.module = 0;
|
||||
fprintf(flog, "Source device: %s\n", cdromparams.devnode);
|
||||
/* Configure the network now! */
|
||||
if (installtype == URL_INSTALL) {
|
||||
/* Network driver and params. */
|
||||
if (!(networkmenu(ethernetkv))) {
|
||||
errorbox(ctr[TR_NETWORK_SETUP_FAILED]);
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
/* Check for ipcop-<VERSION>.tbz2 */
|
||||
if (checktarball(SNAME "-" VERSION ".tbz2", ctr[TR_ENTER_URL])) {
|
||||
errorbox(ctr[TR_NO_IPCOP_TARBALL_FOUND]);
|
||||
goto EXIT;
|
||||
}
|
||||
}
|
||||
|
||||
/* Get device for the HD. This has to succeed. */
|
||||
@@ -467,6 +484,7 @@ int main(int argc, char *argv[])
|
||||
} else
|
||||
sprintf(harddrive, "hd%c", hdletter);
|
||||
|
||||
fprintf(flog, "Destination drive: %s\n", harddrive);
|
||||
|
||||
/* load unattended configuration */
|
||||
if (unattended) {
|
||||
@@ -571,13 +589,12 @@ int main(int argc, char *argv[])
|
||||
|
||||
handle = fopen("/tmp/partitiontable", "w");
|
||||
|
||||
|
||||
/* Make swapfile */
|
||||
if (swap_file) {
|
||||
fprintf(handle, ",%ld,L,*\n,%ld,S,\n,%ld,L,\n",
|
||||
fprintf(handle, ",%ld,L,*\n,%ld,S,\n,%ld,L,\n,,L,\n",
|
||||
boot_partition, swap_file, root_partition);
|
||||
} else {
|
||||
fprintf(handle, ",%ld,L,*\n,0,0,\n,%ld,L,\n",
|
||||
fprintf(handle, ",%ld,L,*\n,0,0,\n,%ld,L,\n,,L,\n",
|
||||
boot_partition, root_partition);
|
||||
}
|
||||
|
||||
@@ -625,7 +642,7 @@ int main(int argc, char *argv[])
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
/* if (raid_disk)
|
||||
if (raid_disk)
|
||||
snprintf(commandstring, STRING_SIZE, "/bin/mkreiserfs -f %sp4", hdparams.devnode);
|
||||
else
|
||||
snprintf(commandstring, STRING_SIZE, "/bin/mkreiserfs -f %s4", hdparams.devnode);
|
||||
@@ -634,7 +651,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
errorbox(ctr[TR_UNABLE_TO_MAKE_ROOT_FILESYSTEM]);
|
||||
goto EXIT;
|
||||
} */
|
||||
}
|
||||
|
||||
/* Mount harddisk. */
|
||||
if (raid_disk)
|
||||
@@ -672,7 +689,7 @@ int main(int argc, char *argv[])
|
||||
goto EXIT;
|
||||
}
|
||||
}
|
||||
/* if (raid_disk)
|
||||
if (raid_disk)
|
||||
snprintf(commandstring, STRING_SIZE, "/sbin/mount %sp4 /harddisk/var", hdparams.devnode);
|
||||
else
|
||||
snprintf(commandstring, STRING_SIZE, "/sbin/mount %s4 /harddisk/var", hdparams.devnode);
|
||||
@@ -680,7 +697,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
errorbox(ctr[TR_UNABLE_TO_MOUNT_LOG_FILESYSTEM]);
|
||||
goto EXIT;
|
||||
} */
|
||||
}
|
||||
|
||||
snprintf(commandstring, STRING_SIZE, "/bin/tar -C /harddisk -xvjf /cdrom/" SNAME "-" VERSION ".tbz2");
|
||||
|
||||
@@ -737,8 +754,14 @@ int main(int argc, char *argv[])
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
/* mount proc filesystem */
|
||||
mysystem("mkdir /harddisk/proc");
|
||||
mysystem("/bin/mount -t proc none /harddisk/proc");
|
||||
mysystem("/bin/mount --bind /dev /harddisk/dev");
|
||||
|
||||
/* if we detected SCSI then fixup */
|
||||
if ((handle = fopen("/scsidriver", "r")))
|
||||
mysystem("/bin/probecntrl.sh");
|
||||
if ((handle = fopen("/cntrldriver", "r")))
|
||||
{
|
||||
char *driver;
|
||||
fgets(line, STRING_SIZE-1, handle);
|
||||
@@ -750,22 +773,21 @@ int main(int argc, char *argv[])
|
||||
fprintf(flog, "Fixing up ipfirerd.img\n");
|
||||
mysystem("/bin/chroot /harddisk /sbin/modprobe loop");
|
||||
mkdir("/harddisk/initrd", S_IRWXU|S_IRWXG|S_IRWXO);
|
||||
snprintf(commandstring, STRING_SIZE, "/bin/chroot /harddisk /sbin/mkinitrd --with=scsi_mod --with=%s --with=sd_mod --with=sr_mod --with=libata --with=ataraid /boot/ipfirerd.img %s", driver, KERNEL_VERSION);
|
||||
snprintf(commandstring, STRING_SIZE, "/bin/chroot /harddisk /sbin/mkinitrd --with=scsi_mod --with=%s --with=sd_mod --with=sr_mod --with=libata /boot/ipfirerd.img %s", driver, KERNEL_VERSION);
|
||||
runcommandwithstatus(commandstring, ctr[TR_BUILDING_INITRD]);
|
||||
snprintf(commandstring, STRING_SIZE, "/bin/chroot /harddisk /sbin/mkinitrd --with=scsi_mod --with=%s --with=sd_mod --with=sr_mod --with=libata --with=ataraid /boot/ipfirerd-smp.img %s-smp", driver, KERNEL_VERSION);
|
||||
snprintf(commandstring, STRING_SIZE, "/bin/chroot /harddisk /sbin/mkinitrd --with=scsi_mod --with=%s --with=sd_mod --with=sr_mod --with=libata /boot/ipfirerd-smp.img %s-smp", driver, KERNEL_VERSION);
|
||||
runcommandwithstatus(commandstring, ctr[TR_BUILDING_INITRD]);
|
||||
mysystem("/bin/chroot /harddisk /bin/mv /boot/grub/scsigrub.conf /boot/grub/grub.conf");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 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;
|
||||
}
|
||||
/* 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);
|
||||
@@ -778,11 +800,6 @@ int main(int argc, char *argv[])
|
||||
/* 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])) {
|
||||
@@ -833,7 +850,7 @@ EXIT:
|
||||
fcloseall();
|
||||
|
||||
system("/bin/swapoff /harddisk/swapfile");
|
||||
system("/sbin/umount /harddisk/var/log");
|
||||
system("/sbin/umount /harddisk/var");
|
||||
system("/sbin/umount /harddisk/boot");
|
||||
system("/sbin/umount /harddisk");
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
* (c) Lawrence Manning, 2001
|
||||
* Stuff for downloading the smoothwall tarball using wget.
|
||||
*
|
||||
* $Id: net.c,v 1.8.2.2 2004/04/14 22:05:40 gespinasse Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
#include "install.h"
|
||||
@@ -19,11 +17,11 @@ extern char **ctr;
|
||||
|
||||
static int got_url = 0;
|
||||
|
||||
char url[STRING_SIZE];
|
||||
char url[STRING_SIZE] = "http://";;
|
||||
|
||||
static int gettarballurl();
|
||||
static int gettarballurl(char *url, char *message);
|
||||
|
||||
int checktarball(char *file)
|
||||
int checktarball(char *file, char *message)
|
||||
{
|
||||
int done;
|
||||
int tries = 0;
|
||||
@@ -32,7 +30,7 @@ int checktarball(char *file)
|
||||
done = 0;
|
||||
while (!done)
|
||||
{
|
||||
if (!got_url && gettarballurl() != 1)
|
||||
if (!got_url && gettarballurl(url, message) != 1)
|
||||
return 0;
|
||||
|
||||
/* remove any successive /'s */
|
||||
@@ -49,24 +47,22 @@ int checktarball(char *file)
|
||||
errorbox(ctr[TR_FAILED_TO_FIND]);
|
||||
got_url = 0;
|
||||
if (tries == 3)
|
||||
return 0;
|
||||
return 1; /* failure */
|
||||
}
|
||||
tries++;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gettarballurl()
|
||||
static int gettarballurl(char *url, char *message)
|
||||
{
|
||||
char *values[] = { NULL, NULL }; /* pointers for the values. */
|
||||
char *values[] = { url, NULL }; /* pointers for the values. */
|
||||
struct newtWinEntry entries[] =
|
||||
{ { "", &values[0], 0,}, { NULL, NULL, 0 } };
|
||||
char title[STRING_SIZE];
|
||||
char message[1000];
|
||||
int rc;
|
||||
|
||||
sprintf(message, ctr[TR_ENTER_URL]);
|
||||
sprintf (title, "%s v%s - %s", NAME, VERSION, SLOGAN);
|
||||
rc = newtWinEntries(title, message,
|
||||
60, 5, 5, 50, entries, ctr[TR_OK], ctr[TR_CANCEL], NULL);
|
||||
|
||||
13
src/install+setup/install/probecntrl.sh
Normal file
13
src/install+setup/install/probecntrl.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Probing for SCSI controllers"
|
||||
MODULE=`/bin/kudzu -qps -t 30 -c SCSI | grep driver | cut -d ' ' -f 2 | sort | uniq`
|
||||
|
||||
if [ "$?" == "0" ]; then
|
||||
echo $MODULE > /cntrldriver;
|
||||
echo "Your controller is: $MODULE"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "No SCSI controller found"
|
||||
exit 1
|
||||
12
src/install+setup/install/probenic.sh
Normal file
12
src/install+setup/install/probenic.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
NUMBER=$1
|
||||
MODULES=`/bin/kudzu -qps -t 30 -c NETWORK | grep driver | cut -d ' ' -f 2 | sort | uniq`
|
||||
|
||||
if [ "$NUMBER" ]; then
|
||||
NICS=`echo $MODULES | head -$NUMBER`
|
||||
else
|
||||
NICS=$MODULES
|
||||
fi
|
||||
|
||||
echo "$NICS" > /nicdriver
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user