]> Untitled Git - hvlinux.git/commitdiff
-Replaced /bin/sh by /bin/bash to be able to use the source built-in keyword.
authorgobo72 <gobo72@364a67c3-989e-7be9-548d-dae8560ea662>
Sat, 3 Jul 2010 23:48:54 +0000 (23:48 +0000)
committergobo72 <gobo72@364a67c3-989e-7be9-548d-dae8560ea662>
Sat, 3 Jul 2010 23:48:54 +0000 (23:48 +0000)
-Better error handling by using trap function.

51 files changed:
packages-list
stage0/stage0-install
stage1/bootscripts/checkfs
stage1/bootscripts/cleanfs
stage1/bootscripts/functions
stage1/bootscripts/halt
stage1/bootscripts/hostname
stage1/bootscripts/initlog
stage1/bootscripts/modules
stage1/bootscripts/mountfs
stage1/bootscripts/mountkernfs
stage1/bootscripts/rc
stage1/bootscripts/reboot
stage1/bootscripts/sendsignals
stage1/bootscripts/setclock
stage1/bootscripts/swap
stage1/bootscripts/udev
stage1/cis-ac
stage1/cis-bash
stage1/cis-binutils
stage1/cis-bootscripts
stage1/cis-bzip2
stage1/cis-common
stage1/cis-common2
stage1/cis-coreutils
stage1/cis-e2fsprogs
stage1/cis-findutils
stage1/cis-flex
stage1/cis-gcc
stage1/cis-gettext
stage1/cis-m4
stage1/cis-module-init-tools
stage1/cis-post-install
stage1/cis-pre-install
stage1/cis-sysvinit
stage1/cis-tar
stage1/cis-texinfo
stage1/cis-udev
stage1/cis-util-linux-ng
stage1/cis-zlib
stage1/create-config-files
stage1/create-directories
stage1/create-groups
stage1/create-logfiles
stage1/create-symlinks
stage1/create-users
stage1/install-1
stage1/install-linux-minimal
stage1/packages-update
stage1/stage1-install
sysinfos

index 43fa46b0b054b45d528f9f71bdec00f4900d3512..cc0f91e631eab1aede69122de48a019ede683294 100644 (file)
@@ -69,8 +69,8 @@ E2FSPROGS="e2fsprogs-1.41.9"
 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"
@@ -232,7 +232,7 @@ JAVA="jre-1.6.0_05"
 
 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"
index c358247d5573dd1cf0d59481b0215ece4e6eddd1..fe9b2f741d831268d2a9517bdf5732edf63671ab 100755 (executable)
@@ -1,8 +1,20 @@
 #!/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
@@ -21,11 +33,6 @@ echo "Performing pre-install"
 # 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
index e5eaeb7e38d363795e02174fa4b82659fb0c5d20..334980648d2fe6c30ead3b4343ce66f85bf2f5f0 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # checkfs
 
index 33168dae9e802bf0130e75bc5f129f42fa094415..153f24141d0a82477752802f35a2fcc4a19dd62a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # cleanfs
 # Clean file system
index f0eef13667944c9eb6ced131d5cb27c95f8c7886..3d8ffb5f085712a95e7348c06d60e9ffd54ff2d2 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # General shell functions
 
index 575d648319e141dd631093cc9b3627ecb56d6590..03de43c9a73b0ad7858c6910ff5951ae6619d3a5 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # halt
 
index 84b1d34665f58b9a66f8921193cd9c4d6a8302cc..bb32abaa0b7f14d4a8fc5477021bb194fd5b04b0 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # description: Set hostname at boot time.
 #              Even if network connection is not desired,
index d9ba2b130daac43c0d025276d050706fea794b3e..71bc0dafde16e4532f0f3d088e054d958ff6d4e7 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # initlog
 
index df5f1959577946368bd8947017c421ac835f2ae5..8c870a9f21b9c78c819e13e04b85afc99c6250d2 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # modules
 # Module auto-loading script
index 15cde9347fae4c9ce197de37020d725d42ab711a..c7fd27e7c377a947511048241a833ce731326a2f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # mountfs
 
index 9c3fed53996da9ebb598639cf9c5cc3a0e5bb75c..6c377a6341267c3ddc28bfa1e1b1f089f2ff7d92 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # mountkernfs
 
index 9e4087d7648195c8906e553a7ddca32d1b4c89a5..1d0a721e062d969e74446baa772b21d5616fe658 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # rc
 
index 2f6c3e551044effdad219b834966d5531e3ed94e..21efce57ad9efcb545c60b6151eedb803cbf9173 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # reboot
 
index 6bde3e31dea4ee50d8e8298efd1e12db230377c5..c546fe51613a7a36c77331f0ed8a2d3a4e55dfb9 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # sendsignals
 
index 2a00c66c057cf8a914d75e35906e085a22244614..cce76cdadbe4d771feea3d3c1bd31e71dafeff88 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # setclock
 
index 083b980a06d30299c9e7f20c240570b4b0c2801f..9e47649b0b24b281ae6e30d584f82074b07aef3f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # swap
 
index c29fbd05a6c7118d12fbbb9a87610daca96d5aad..705b1603daa6acc98b30277a4fbf69e977325dee 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # udev
 # Udev cold-plugging script
index bf6a8693f552fe63b08951bf0a54de85af458c8d..a0adcada7660b939f3b7707e72b18a13ace67d01 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # First argument of this script is the package name.
index 4aa5816f46981946d8246f38c4449e81bef1af20..cac852b8df87ddcd493c3336bd1ce7c30c5b5826 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # First argument of this script is the package name.
index 904dcb0825cc14b40a598f2bfb6276ca2bf855d4..a7306ae25e8589f09d825b35f05022e384f479ac 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # Reading system configuration informations, functions and package versions.
index ac17b287c92311e37b8a61136a071ccf18df9422..5c0def225f991f17132d96f74b92fa9a967213aa 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # Reading system configuration informations, functions and package versions.
index 5b36c8d7a42b56409e54f90006b57c3c82bcbb0c..619a73935a20beab13c40d11660dc53029894c49 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # Reading system configuration informations, functions and package versions.
index be4e6ec508677919b23ffe50dbee522d5b41de5d..394d28d3da36658dadfb2e1d7e6a961aea391d01 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # First argument of this script is the package name.
index 98b876ff7a2da6a9c0eac70e3c427fb7fb15ca00..de32d7a54baffc11dc99c3d237d4d5e0727c2cbf 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # First argument of this script is the package name.
index 67fc413ab4acfb0cfd7150065c3f6a33b48fbb43..f7a0a275a4cf38645c226628fa0e6cf36099aaf5 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # First argument of this script is the package name.
index 71985faaf43d549f9acc34747ee09e279d28c6a7..0532f02b4d1bbb0a2758d3b6f43317d4b0c42f46 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # First argument of this script is the package name.
index c3f887dd38ac71982bddd384689598c7067d522f..403df4e8f795ce491626df661b36194f8b92c888 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # First argument of this script is the package name.
index f5be27f562c87dfeda229c57c21658af52a0b7f6..40886e1464838ce4ded395e7f99856b284aaac27 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # First argument of this script is the package name.
index 49c7e4e4f2d8404d3c1e6691e7873c86adefe53f..445bc890ac038fe9176988f49a40b8ea29e417f9 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # Reading system configuration informations, functions and package versions.
index f7ddee3b67aaae6c040c0ab0e10d845bdd9e13e6..c6e0149ecc1db4e289d3ea2bdca0a85176d34ff1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # First argument of this script is the package name.
index 6e364e7871e78bd5b5046300e5eb24d90aca0bbf..92338db258191e604ecfa1126a24eb8e689b8f69 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # First argument of this script is the package name.
index b84c5fdc99e7942ee89eb4b1a269cba81a891d37..c79add6dbcd6928abef2995e9806d8cff5192d04 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # First argument of this script is the package name.
index b5bb52d589ce43124ecd54f2c97b685bd0b12c89..6f3fb4dada925485918d003a3d329ec1807d860d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # Reading system configuration informations, functions and package versions.
index 21d7ebd5d917dbd1961b516422b3a39bcd581ae1..13815b4ea64d96310aa3a782bd6ec43c5ddb640e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # Reading system configuration informations, functions and package versions.
index 6ca42b981e4b823c0f4143ab91f7590d97e7c88b..319e885d04bd22ce90d1fba5111d5a6772a8eb1f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # First argument of this script is the package name.
index 7cf18790237a7c3a06888664a4089b4088b7723d..4feb5c460f9b7cc1aa9d87cdff5842012dba7ddd 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # First argument of this script is the package name.
index 1e6fa9069ca455ef0b9f69c270e5b2a7f691586f..ca8792654a4721fdd294786ddd09c5e33e098953 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # First argument of this script is the package name.
index d05e1b1f7eab55fd6b2ded98f1883da6c9c6ac7c..ff0c1b8458e97b10a774b8667a86cfd994231509 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # First argument of this script is the package name.
index 8d16906e1fd595d9fe6ddbe0bc816c7999e1355c..f86916c6d871dcee9567d9aedecebd5efb02f9fe 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # First argument of this script is the package name.
index f01fc25d8d4881702962687c8f6640082080f424..b3bbb71e91fba98cd9e0ed28006fb9ce60b3a6f7 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # First argument of this script is the package name
index 1dad392319a02611c6d988a9a0899efde0657860..0bc590c3d3e5135560902d3f07a419a999682cf1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # Reading system configuration informations, functions and package versions.
@@ -32,7 +32,7 @@ EOF
 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.
@@ -88,7 +88,7 @@ sed -i -e "s!_DEFAULT_EDITOR_!${DEFAULT_EDITOR}!g" ${LFS}/etc/profile
 
 echo "Creating /etc/bashrc"
 cat > ${LFS}/etc/bashrc << "EOF"
-#!/bin/sh
+#!/bin/bash
 
 # /etc/bashrc
 
index 43dcb78df8089d3c727ec3e54d5381a33ea0c7ee..f73edad4d98d1ce8ccfe74391c371bcbb77b5149 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # Reading system configuration informations, functions and package versions.
index e610968441e197f95dd2a028361d0da95fc23f88..981daefa6dd4538bf561e14ee4cd71a85bbf3379 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # Reading system configuration informations, functions and package versions.
index 4ab97e017e7bd348423a69ee355f6b2377f954f6..c0fb885f30080053dbbab8c1d78a6a3ead671e73 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # Reading system configuration informations, functions and package versions.
index cc91b573551530b52e725202b2706c43631a9e3c..bd44b95a190f4b85dbb11febf8f7ed1b285e9851 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # Reading system configuration informations, functions and package versions.
index c02da2dcc17212a883fcd4aec54041b70b083ec5..f4055749c73288ff14f610d36f2a970f89f65572 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # Reading system configuration informations, functions and package versions.
index 169d678f4b704a39cc5a3c17340a93dabfeef27e..479496f8ab9d874422557fb1faad0c16378fe4d0 100755 (executable)
@@ -1,4 +1,5 @@
-#!/bin/sh
+#!/bin/bash
+set -o errexit
 
 source ~/.bashrc
 
@@ -42,7 +43,7 @@ ipkg_ac   ${CLOOG_PPL} "\
     --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}
index 9aa5f820fe3a6b0498d6212b72ddc7808504c5ab..f1d918f81d609ca2327f71ae8cf55b971628ff24 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 set -o errexit
 
 # Reading system configuration informations, functions and package versions.
@@ -19,7 +19,7 @@ ${HVMAKE} mrproper
 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}
index a4c47d84f3a835136ed3ce4239ae26e21a84a351..9702fcf2ddf488c9a5016b271ab91b7ed02a64a1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 LFS_STAGE="stage1"
 USE_CLFS_PATCHES=1
index 6efcf2eb5accbeeb560702c070e813db0617b4a6..8e7d8d93db031958b5eedc5d8aba357fa4ce2d39 100755 (executable)
@@ -1,7 +1,20 @@
-#!/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
@@ -19,15 +32,10 @@ rscr mult "Performing pre-install" cis-pre-install
 # 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
index 87a09d27086c49a473b08e3a5abcf0025efac93d..0d752cdd70cb858a25b9e97303bd9b7ab3936211 100644 (file)
--- a/sysinfos
+++ b/sysinfos
@@ -9,13 +9,15 @@
 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"
@@ -46,7 +48,6 @@ SOUND_CARD="yes"
 
 # Removable media drives
 CDROM="/dev/hdc"
-DVD="/dev/hdc"
 
 # Set to yes to have SANE support
 SANE_SUPPORT="yes"
@@ -60,31 +61,21 @@ SANE_SERVER=""
 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"