#!/static/sh
#
# Metadistros boot up script - configuration file
#
# Copyright 2003 Metadistros [ http://metadistros.hispalinux.es/ ]
# Distributed under the GPL
##
# Read boot command line
#
CMDLINE="`cat /proc/cmdline`"
##
# This variables can be set in comand line
#
##
# variable=value
#
LANGUAGE="`echo ${lang}`"
[ -n "${LANGUAGE}" ] || LANGUAGE="es" #<- Set language here
RAMSIZE="`echo ${ramsize}`"
[ -n "${RAMSIZE}" ] || RAMSIZE="1000000" # Default maximum size of dynamic
# ramdisk in kilobytes
KEYMAP="`echo ${keymap}`"
[ -n "${KEYMAP}" ] || KEYMAP="es"
##
# Network configuration
#
IP="`echo ${ip}`"
[ -n "${IP}" ] || IP=""
BROADCAST="`echo ${broadcast}`"
[ -n "${BROADCAST}" ] || BROADCAST=""
NETMASK="`echo ${netmask}`"
[ -n "${NETMASK}" ] || NETMASK=""
GATEWAY="`echo ${gateway}`"
[ -n "${GATEWAY}" ] || GATEWAY=""
##
# value
#
##
# Default value
#
##
# What information display?
#
VERBOSE="no" # Show information in boot up?
DEBUG="no" # Show debug information in boot up?
INTERACTIVE="no" # By default run in quiet mode
##
# Run the installation program?
#
INSTALL="no"
##
# Hardware for check
#
SCSI="yes" # Scan for scsi devices
FIREWIRE="no" # Modprobes firewire modules in initrd (for firewire cdroms,etc)
ATARAID="no" # Loads ide raid modules from initrd
PCMCIA="no" # Starts pcmcia service
USB="yes" # Disables usb module load from initrd, disables hotplug
CDCACHE="no" # Cache the entire runtime portion of cd in RAM. This
# uses a lot of RAM (depend on ), but allows you to umount /mnt/cdrom
# and mount another cdrom.
##
# Check and set above variables
#
for x in ${CMDLINE}
do
case "${x}" in
*verbose*)
VERBOSE="yes";
exec >/dev/console </dev/console 2>&1; # Clean input/output
echo "${CLEAR}"; # Clear and reset Screen
;;
*showdebug*)
DEBUG="yes";
VERBOSE="yes";
exec >/dev/console </dev/console 2>&1; # Clean input/output
echo "${CLEAR}"; # Clear and reset Screen
echo "6" > /proc/sys/kernel/printk # Enable kernel messages to console
;;
*interactive*)
INTERACTIVE="yes";
VERBOSE="yes"; # Set verbose mode
exec >/dev/console </dev/console 2>&1; # Clean input/output
echo "${CLEAR}"; # Clear and reset Screen
;;
*install*)
INSTALL="yes";
;;
*noscsi*)
SCSI="no";
;;
*dofirewire*)
FIREWIRE="yes";
;;
*nousb*)
USB="no";
;;
*doataraid*)
ATARAID="yes";
;;
*dopcmcia*)
PCMCIA="yes";
;;
*cdcache*)
CDCACHE="yes";
;;
esac
done
##
# Misc variables
#
# Name of metadistro
DISTRO="SBM"
# User for metadistro
USERNAME="metadistros"
# Hostname of metadistro
HOSTNAME="metadistros"
# Default value (don't touch)
FOUND_SCSI="no"
# Default value (don't touch)
FOUND_META="no"
##
# 'Screen' variables
#
# Reset fb color mode
RESET="^[]R"
# ANSI COLORS
# Erase to end of line
CRE="^M^[[K"
# Clear and reset Screen
CLEAR="^[c"
# Normal color
NORMAL="^[[0;39m"
# RED: Failure or error message
RED="^[[1;31m"
# GREEN: Success message
GREEN="^[[1;32m"
# YELLOW: Descriptions
YELLOW="^[[1;33m"
# BLUE: System messages
BLUE="^[[1;34m"
# MAGENTA: Found devices or drivers
MAGENTA="^[[1;35m"
# CYAN: Questions
CYAN="^[[1;36m"
# BOLD WHITE: Hint
WHITE="^[[1;37m"
##
# "Safe" SCSI modules in the right order for autoprobe
# Warning: The sym53c8xx.o and g_NCR* cause a kernel Oops if no such adapter
# is present.
#
# NB: It looks like that ncr53c8xx.o is more stable than 53c7,8xx.o for
# a ncr53c810 controller (at least on my installation box it's more
# immune to SCSI timeouts)
# Removed 53c7,8xx -> crashes if no device attached.
# Removed AM53C974 -> crashes tmscsim if adapter found
# Added initio.o on request (untested)
#
# (don't modify if you don't know what are you doing)
#
SCSI_MODULES="aic7xxx.o BusLogic.o \
ncr53c8xx.o NCR53c406a.o \
initio.o \
advansys.o aha1740.o aha1542.o aha152x.o \
atp870u.o dtc.o eata.o fdomain.o gdth.o \
megaraid.o pas16.o pci2220i.o pci2000.o psi240i.o \
qlogicfas.o qlogicfc.o qlogicisp.o \
seagate.o t128.o tmscsim.o u14-34f.o ultrastor.o wd7000.o \
a100u2w.o 3w-xxxx.o"
##
# Other modules
#
FIREWIRE_MODULES="ieee1394.o ohci1394.o eth1394.o sbp2.o"
ATARAID_MODULES="ataraid.o pdcraid.o hptraid.o"
PCMCIA_MODULES="pcmcia_core.o i82365.o ds.o ide-cs.o"
USB_MODULES="usbcore.o ehci-hcd.o uhci.o usb-ohci.o hid.o usb-storage.o" |