-Better error handling by using trap function.
EASYTAG="easytag-2.1"
ED="ed-1.4"
EGGDBUS="eggdbus-0.6"
-EGLIBC="eglibc-2.10.1-20100304-r9381"
-EGLIBC_PORTS="eglibc-ports-2.10.1-20100304-r9381"
+EGLIBC="eglibc-2.10.1-20100305-r9381"
+EGLIBC_PORTS="eglibc-ports-2.10.1-20100305-r9381"
UCLIBC="uClibc-0.9.30.1"
EMACS="emacs-23.1"
ESOUND="esound-0.2.37"
KBD="kbd-1.15"
KERBEROS5="krb5-1.4.1"
-KERNEL="linux-2.6.32.9"
+KERNEL="linux-2.6.34"
KVM="kvm-84"
LAME="lame-398-2"
#!/bin/bash
-set -o errexit
LFS_STAGE=stage0
+# Let shell functions inherit ERR trap. Same as `set -E'.
+set -o errtrace
+
+# Setting ERR trap does implicit `set -o errexit'.
+trap myerr ERR
+
+function myerr()
+{
+ echo
+ echo "*** An error occured during ${LFS_STAGE}"
+ exit 1
+}
+
# Reading system configuration informations, functions and package versions.
source ../sysinfos
source ../functions
# directory of the user.
su - lfs -c "cd ${PWD}; ./install-1"
-if [ $? -ne 0 ]; then
- echo "*** An error occured during ${LFS_STAGE}"
- exit 1
-fi
-
echo "Total build time: $(get_total_build_time ${LFS_LOG_FILE})h"
exit 0
-#!/bin/sh
+#!/bin/bash
# checkfs
-#!/bin/sh
+#!/bin/bash
# cleanfs
# Clean file system
-#!/bin/sh
+#!/bin/bash
# General shell functions
-#!/bin/sh
+#!/bin/bash
# halt
-#!/bin/sh
+#!/bin/bash
#
# description: Set hostname at boot time.
# Even if network connection is not desired,
-#!/bin/sh
+#!/bin/bash
# initlog
-#!/bin/sh
+#!/bin/bash
# modules
# Module auto-loading script
-#!/bin/sh
+#!/bin/bash
# mountfs
-#!/bin/sh
+#!/bin/bash
# mountkernfs
-#!/bin/sh
+#!/bin/bash
# rc
-#!/bin/sh
+#!/bin/bash
# reboot
-#!/bin/sh
+#!/bin/bash
# sendsignals
-#!/bin/sh
+#!/bin/bash
# setclock
-#!/bin/sh
+#!/bin/bash
# swap
-#!/bin/sh
+#!/bin/bash
# udev
# Udev cold-plugging script
-#!/bin/sh
+#!/bin/bash
set -o errexit
# First argument of this script is the package name.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# First argument of this script is the package name.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# Reading system configuration informations, functions and package versions.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# Reading system configuration informations, functions and package versions.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# Reading system configuration informations, functions and package versions.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# First argument of this script is the package name.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# First argument of this script is the package name.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# First argument of this script is the package name.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# First argument of this script is the package name.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# First argument of this script is the package name.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# First argument of this script is the package name.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# Reading system configuration informations, functions and package versions.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# First argument of this script is the package name.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# First argument of this script is the package name.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# First argument of this script is the package name.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# Reading system configuration informations, functions and package versions.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# Reading system configuration informations, functions and package versions.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# First argument of this script is the package name.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# First argument of this script is the package name.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# First argument of this script is the package name.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# First argument of this script is the package name.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# First argument of this script is the package name.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# First argument of this script is the package name
-#!/bin/sh
+#!/bin/bash
set -o errexit
# Reading system configuration informations, functions and package versions.
echo "Creating basic /etc/profile and /etc/profile.d"
install -v -m755 -d ${LFS}/etc/profile.d
cat > ${LFS}/etc/profile << "EOF"
-#!/bin/sh
+#!/bin/bash
# /etc/profile
# System-wide environment and startup programs.
echo "Creating /etc/bashrc"
cat > ${LFS}/etc/bashrc << "EOF"
-#!/bin/sh
+#!/bin/bash
# /etc/bashrc
-#!/bin/sh
+#!/bin/bash
set -o errexit
# Reading system configuration informations, functions and package versions.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# Reading system configuration informations, functions and package versions.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# Reading system configuration informations, functions and package versions.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# Reading system configuration informations, functions and package versions.
-#!/bin/sh
+#!/bin/bash
set -o errexit
# Reading system configuration informations, functions and package versions.
-#!/bin/sh
+#!/bin/bash
+set -o errexit
source ~/.bashrc
--with-ppl=/tools"
ipkg_cust ${ZLIB} cis-zlib
ipkg_cust ${BINUTILS} cis-binutils
-ipkg_cust ${GCC_CORE} cis-gcc
+ipkg_cust ${GCC} cis-gcc
ipkg_ac ${NCURSES} "--with-shared --without-debug --without-ada --enable-overwrite --with-build-cc=gcc"
ipkg_cust ${BASH} cis-bash
ipkg_ac ${BISON}
-#!/bin/sh
+#!/bin/bash
set -o errexit
# Reading system configuration informations, functions and package versions.
VERSION=$(get_pkg_ver ${PACKAGE})
SCRIPT=${LFS}/usr/src/compile-kernel-minimal
-echo "#!/bin/sh" > ${SCRIPT}
+echo "#!/bin/bash" > ${SCRIPT}
echo "KERNEL_VERSION=${VERSION}" >> ${SCRIPT}
echo "KERNEL_NAME=clfs-\${KERNEL_VERSION}" >> ${SCRIPT}
echo "DEST=${LFS}/boot" >> ${SCRIPT}
-#!/bin/sh
+#!/bin/bash
LFS_STAGE="stage1"
USE_CLFS_PATCHES=1
-#!/bin/sh
+#!/bin/bash
LFS_STAGE=stage1
+# Let shell functions inherit ERR trap. Same as `set -E'.
+set -o errtrace
+
+# Setting ERR trap does implicit `set -o errexit'.
+trap myerr ERR
+
+function myerr()
+{
+ echo
+ echo "*** An error occured during ${LFS_STAGE}"
+ exit 1
+}
+
# Reading system configuration informations, functions and package versions.
source ../sysinfos
source ../functions
# Logging-in as 'lfs' user, and executing the install-1 script. The
# 'su -' command starts with a clean environment and enters the home
# directory of the user.
-su - lfs -c "cd ${PWD}; ./install-1" &&
+su - lfs -c "cd ${PWD}; ./install-1"
rscr mult "Performing post-install" cis-post-install
-if [ $? -ne 0 ]; then
- echo "*** An error occured during ${LFS_STAGE}"
- exit 1
-fi
-
echo "Total build time: $(get_total_build_time ${LFS_LOG_FILE})h"
exit 0
MAKEJOBS=1
# Installation type: server, ltsp-server or workstation.
-INST_TYPE="ltsp-server"
+INST_TYPE="workstation"
# New user to create
REGUSER="hugo"
-# Destination path where to install new Linux-HV system
-LFS=""
+# Destination path where to install new Linux-HV system. This is usually where
+# you have mounted your new LFS partition, but it can also be any directory.
+# After stage 1, this must be set to "".
+LFS="/mnt/hvlinux-x86_64"
# Destination partition where to install new Linux-HV system
LFS_PARTITION="/dev/sda8"
# Removable media drives
CDROM="/dev/hdc"
-DVD="/dev/hdc"
# Set to yes to have SANE support
SANE_SUPPORT="yes"
TIMEZONE="America/Montreal"
# General network settings
-INTERFACES="eth0 eth1 eth2"
+INTERFACES="eth0"
# GATEWAY is not required if using DHCP
GATEWAY="192.168.1.1"
-MACHINE_NAME="server64"
-DOMAIN="hugovil.com"
-LAN_NETWORK_MASK="192.168.0.0/24" # Utilise par sane in stage3
+MACHINE_NAME="chambers64"
+DOMAIN="mongol.com"
+LAN_NETWORK_MASK="192.168.1.0/24" # Utilise par sane in stage3
# Define to yes if you have a dynamic address and you use a dynamic dns
# service.
USE_DYNAMIC_DNS="no"
# Network interface card eth0 settings (ROUTEUR/INTERNET)
BOOTPROTO[0]="static"
-IP_ADDRESS[0]="192.168.1.2"
+IP_ADDRESS[0]="192.168.1.102"
PREFIX_LENGTH[0]=24
-# Network interface card eth1 settings (LAN)
-BOOTPROTO[1]="static"
-IP_ADDRESS[1]="192.168.0.1"
-PREFIX_LENGTH[1]=24
-
-# Network interface card eth2 settings (MVPMC)
-BOOTPROTO[2]="static"
-IP_ADDRESS[2]="192.168.99.1"
-PREFIX_LENGTH[2]=24
-
# DNS servers addresses (not required if using DHCP)
NAMESERVER[0]="192.168.1.1"