Complété merge x86_64 -> trunk, reste à tester
authorroot <root@364a67c3-989e-7be9-548d-dae8560ea662>
Mon, 8 Feb 2010 06:08:10 +0000 (06:08 +0000)
committerroot <root@364a67c3-989e-7be9-548d-dae8560ea662>
Mon, 8 Feb 2010 06:08:10 +0000 (06:08 +0000)
14 files changed:
INSTALL
TODO
stage1/cis-binutils-pass1 [deleted file]
stage1/cis-binutils-pass2 [deleted file]
stage1/cis-gcc-pass1 [deleted file]
stage1/cis-gcc-pass2 [deleted file]
stage1/cis-glibc [deleted file]
stage1/cis-linux-api-headers [deleted file]
stage2/bootscripts/cleanfs [deleted file]
stage2/bootscripts/functions [deleted file]
stage2/bootscripts/initlog [deleted file]
stage2/hv-utilities/rotatelogs
stage2/install-1 [deleted file]
stage2/stage2-additions

diff --git a/INSTALL b/INSTALL
index 7ab2e23..1f5c3f2 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -16,7 +16,9 @@ The installation is done in 3 steps:
 
 This is the directory structure you must have to begin with:
 
 
 This is the directory structure you must have to begin with:
 
-sources/packages
+sources/
+|--packages
+\--scripts
 
 The "packages" directory must contain all the source code packages, with
 the ".tar.bz2" extensions, as well as all the patches.
 
 The "packages" directory must contain all the source code packages, with
 the ".tar.bz2" extensions, as well as all the patches.
@@ -26,7 +28,7 @@ You can create the directory structure by using these commands:
      mkdir -p sources/packages
      mv hvlinux sources/scripts
 
      mkdir -p sources/packages
      mv hvlinux sources/scripts
 
-To begin the installation, enter the "sources" directory. You
+To begin the installation, enter the "sources/scripts" directory. You
 must first create a file called 'sysinfos' in this directory,
 containing informations about your hardware, network  settings and
 installation type among other things.
 must first create a file called 'sysinfos' in this directory,
 containing informations about your hardware, network  settings and
 installation type among other things.
diff --git a/TODO b/TODO
index c1d6e56..b729b1e 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,12 +1,11 @@
 
                       TODO
 
 
                       TODO
 
-Because dependencies are only computed as a side-effect of the compilation, no dependency information exists the first time a package is built. This is OK because all the files need to be built anyway: make does not have to decide which files need to be rebuilt. In fact, dependency tracking is completely useless for one-time builds and there is a configure option to disable this:
+-tar -tf $tarball | head -n1 --> pour extraire le nom du répertoire root
+ du package automatiquement...
 
 
---disable-dependency-tracking
-    Speed up one-time builds. 
+basename $(tar -tf mozilla-3.0.1.tar.bz2 | head -n1)
 
 
--Transférer /mnt/hvrepos directement dans /srv/www/htdocs/hugovil...
 
 -Dans le fichier packages-list, utiliser un array pour
  définir le nom du module et l'hyperlien pour le télécharger:
 
 -Dans le fichier packages-list, utiliser un array pour
  définir le nom du module et l'hyperlien pour le télécharger:
@@ -23,9 +22,12 @@ Because dependencies are only computed as a side-effect of the compilation, no d
 
 -webalizer: needs gd-2.0.33
 
 
 -webalizer: needs gd-2.0.33
 
--install guitartex automatiquement
+-install guitartex et lilypond automatiquement:
 
 
--installer fonts Deja Vu
+-lilypond:
+  -fontforge
+  -mftrace -> t1utils
+           -> autotrace
 
 -installer modes emacs: php, html, css, etc.
 
 
 -installer modes emacs: php, html, css, etc.
 
diff --git a/stage1/cis-binutils-pass1 b/stage1/cis-binutils-pass1
deleted file mode 100755 (executable)
index 2dbb729..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Saves CFLAGS and CXXFLAGS, and clears them.
-save_flags_no_optimizations
-
-# Applying patches (if any)
-apply_patches ${1} &&
-
-# CC="gcc -B/usr/bin/": This forces gcc to prefer the linker from the host in /usr/bin.
-#                       This is necessary on some hosts where the new ld built here is
-#                       not compatible with the host's gcc.
-# --disable-nls: This disables internationalization as i18n is not needed
-#                for the temporary tools.
-cd ${LFS_TMP}/${1}-build &&
-CC="gcc -B/usr/bin/" ../${1}/configure \
-    --prefix=/tools \
-    --disable-nls \
-    --disable-werror &&
-make -j ${MAKEJOBS} &&
-make install &&
-# Removing all compiled files in ld subdirectory.
-make -j ${MAKEJOBS} -C ld clean &&
-make -j ${MAKEJOBS} -C ld LIB_PATH=/tools/lib &&
-cp -v ld/ld-new /tools/bin &&
-
-# Restore original CFLAGS and CXXFLAGS values.
-restore_flags
-
-# Return last error
-exit $?
diff --git a/stage1/cis-binutils-pass2 b/stage1/cis-binutils-pass2
deleted file mode 100755 (executable)
index 5331d9c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Saves CFLAGS and CXXFLAGS, and clears them.
-save_flags_no_optimizations
-
-# Applying patches (if any)
-apply_patches ${1} &&
-
-cd ${LFS_TMP}/${1}-build &&
-../${1}/configure \
-    --prefix=/tools \
-    --disable-nls \
-    --with-lib-path=/tools/lib &&
-make -j ${MAKEJOBS} &&
-make install &&
-make -j ${MAKEJOBS} -C ld clean &&
-make -j ${MAKEJOBS} -C ld LIB_PATH=/usr/lib:/lib &&
-cp -v ld/ld-new /tools/bin &&
-
-# Restore original CFLAGS and CXXFLAGS values.
-restore_flags
-
-# Return last error
-exit $?
diff --git a/stage1/cis-gcc-pass1 b/stage1/cis-gcc-pass1
deleted file mode 100755 (executable)
index dd3696d..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Saves CFLAGS and CXXFLAGS, and clears them.
-save_flags_no_optimizations
-
-# CC="gcc -B/usr/bin/": This forces gcc to prefer the linker from the host in /usr/bin.
-#                       This is necessary on some hosts where the new ld built here is
-#                       not compatible with the host's gcc.
-# --disable-nls: This disables internationalization as i18n is not needed
-#                for the temporary tools.
-cd ${LFS_TMP}/${1}-build &&
-CC="gcc -B/usr/bin/" ../${1}/configure \
-    --prefix=/tools \
-    --with-local-prefix=/tools \
-    --disable-nls \
-    --enable-shared \
-    --enable-languages=c &&
-make -j ${MAKEJOBS} &&
-make install &&
-ln -v -sf gcc /tools/bin/cc &&
-
-# Restore original CFLAGS and CXXFLAGS values.
-restore_flags
-
-# Return last error
-exit $?
diff --git a/stage1/cis-gcc-pass2 b/stage1/cis-gcc-pass2
deleted file mode 100755 (executable)
index 2116dac..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Saves CFLAGS and CXXFLAGS, and clears them.
-save_flags_no_optimizations &&
-
-# Applying patches (if any)
-apply_patches ${1} &&
-
-cd ${LFS_TMP}/${1} &&
-# Suppressing the running of the fixincludes script. */
-cp -v gcc/Makefile.in{,.orig} &&
-sed 's@\./fixinc\.sh@-c true@' gcc/Makefile.in.orig > gcc/Makefile.in &&
-
-# The bootstrap build performed in pass1 built GCC with the -fomit-frame-pointer
-# compiler flag. Non-bootstrap builds omit this flag by default, so the following sed
-# command is used in order to ensure consistent compiler builds.
-cp -v gcc/Makefile.in{,.tmp} &&
-sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in.tmp > gcc/Makefile.in &&
-
-# The following command will change the location of GCC's default dynamic
-# linker to use the one we installed in /tools. It also removes
-# /usr/include from GCC's include search path
-for file in $(find gcc/config -name linux64.h -o -name linux.h); do
-    cp -uv $file{,.orig}
-    sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \
-        -e 's@/usr@/tools@g' $file.orig > $file
-    echo "" >> $file
-    echo "#undef STANDARD_INCLUDE_DIR" >> $file
-    echo "#define STANDARD_INCLUDE_DIR 0" >> $file
-    touch $file.orig
-done
-
-cd ${LFS_TMP}/${1}-build &&
-../${1}/configure \
-    --prefix=/tools \
-    --with-local-prefix=/tools \
-    --enable-clocale=gnu \
-    --enable-shared \
-    --enable-threads=posix \
-    --enable-__cxa_atexit \
-    --enable-languages=c,c++ \
-    --disable-libstdcxx-pch \
-    --disable-bootstrap &&
-make -j ${MAKEJOBS} &&
-make install &&
-
-gcc_toolchain_test_stage1 &&
-
-# Restore original CFLAGS and CXXFLAGS values.
-restore_flags
-
-# Return last error
-exit $?
diff --git a/stage1/cis-glibc b/stage1/cis-glibc
deleted file mode 100755 (executable)
index 16eecd9..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/sh
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1} &&
-
-# Configure options:
-# --disable-profile
-#     Builds the libraries without profiling information.
-# --enable-add-ons
-#     Use all the add-ons it finds.
-#     crypt and localdata are now part of glibc.
-# --enable-kernel=2.x.x
-#     Compile the library for support of linux 2.6.x kernels.
-#     The kernel version specified must not be newer than the
-#     version of the kernel running on the build machine.
-# --with-headers=/tools/include
-#       Forces glibc to use the linux-libc-headers installed
-#       in /tools/include, rather than those on the host, which
-#       may be too old to support needed functionality.
-# --with-binutils=/tools/bin
-#     Strictly speaking this switch is not required. But it
-#     does ensure nothing can go wrong with regard to what
-#     Binutils programs get used during the Glibc build.
-# --without-gd
-#     Prevents the build of the memusagestat program, which
-#     strangely enough insists on linking against the host's
-#     libraries (libgd, libpng, libz, and so forth).
-# --without-selinux
-#       When building from hosts that include SELinux functionality
-#       (e.g., Fedora Core 3), Glibc will build with support for
-#       SELinux. As the LFS tools environment does not contain support
-#       for SELinux, a Glibc compiled with such support will fail to
-#       operate correctly.
-
-cd ${LFS_TMP}/${1}-build &&
-../${1}/configure \
-    --prefix=/tools \
-    --disable-profile \
-    --enable-add-ons \
-    --enable-kernel=${GLIBC_KERNEL_VERSION} \
-    --with-headers=/tools/include \
-    --with-binutils=/tools/bin \
-    --without-gd  \
-    --without-selinux &&
-make -j ${MAKEJOBS} &&
-mkdir -p /tools/etc &&
-touch /tools/etc/ld.so.conf &&
-make install
-
-# Return last error
-exit $?
diff --git a/stage1/cis-linux-api-headers b/stage1/cis-linux-api-headers
deleted file mode 100755 (executable)
index d9c8ba3..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1} &&
-
-cd ${LFS_TMP}/${1} &&
-make -j ${MAKEJOBS} mrproper &&
-make -j ${MAKEJOBS} headers_check &&
-make INSTALL_HDR_PATH=dest headers_install &&
-cp -r -v dest/include/* /tools/include
-
-# Return last error
-exit $?
diff --git a/stage2/bootscripts/cleanfs b/stage2/bootscripts/cleanfs
deleted file mode 100644 (file)
index 0453ef3..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-
-# cleanfs
-# Clean file system
-
-# Source functions library
-source /etc/rc.d/init.d/functions
-
-log_script_name "$0 $*"
-
-clean_files()
-{
-    failed=0
-
-    cd /tmp &&
-    find . -xdev -mindepth 1 ! -name lost+found ! -name trash ! -name log-init ! -name init.log -delete || failed=1
-
-    cd /var/lock &&
-    find . -type f ! -newer /proc -exec rm -f {} \; || failed=1
-
-    cd /var/run &&
-    find . ! -type d ! -name utmp ! -newer /proc -exec rm -f {} \; || failed=1
-    > /var/run/utmp
-    if grep -q '^utmp:' /etc/group ; then
-       chmod 664 /var/run/utmp
-       chgrp utmp /var/run/utmp
-    fi
-
-    return ${failed}
-}
-
-
-case "${1}" in
-    start)
-       cmd_run_log_box "Cleaning file systems" clean_files
-        ;;
-    *)
-        echo "Usage: $0 {start}"
-        exit ${EXIT_CODE_FAILURE}
-       ;;
-esac
-
-exit $?
diff --git a/stage2/bootscripts/functions b/stage2/bootscripts/functions
deleted file mode 100644 (file)
index 4824721..0000000
+++ /dev/null
@@ -1,509 +0,0 @@
-#!/bin/sh
-
-# General shell functions
-
-# Return codes definitions
-EXIT_CODE_SUCCESS=0
-EXIT_CODE_FAILURE=1
-EXIT_CODE_WARNING=2
-
-# Setup default values for environment
-umask 022
-export PATH="/bin:/usr/bin:/sbin:/usr/sbin"
-
-## Screen Dimensions
-# Find current screen size
-if [ -z "${COLUMNS}" ]; then
-    COLUMNS=$(stty size)
-    COLUMNS=${COLUMNS##* }
-fi
-
-# When using remote connections, such as a serial port, stty size returns 0
-if [ "${COLUMNS}" = "0" ]; then 
-    COLUMNS=80
-fi
-
-# The starting position for displaying the "X" sign inside the check box [ ]
-CHECK_POSITION=2
-SET_CHECK_POSITION="echo -en \\033[${CHECK_POSITION}G"
-
-# NORMAL prints text in normal color
-NORMAL="echo -en \\033[0;39m"
-# SUCCESS prints text in a green colour
-SUCCESS="echo -en \\033[1;32m"
-# WARNING prints text in a yellow colour
-WARNING="echo -en \\033[1;33m"
-# FAILURE prints text in a red colour
-FAILURE="echo -en \\033[1;31m"
-
-# Set the console_loglevel to display only error messages (0,1,2 and 3)
-#   KERN_EMERG   "<0>" /* system is unusable                   */
-#   KERN_ALERT   "<1>" /* action must be taken immediately     */
-#   KERN_CRIT    "<2>" /* critical conditions                  */
-#   KERN_ERR     "<3>" /* error conditions                     */
-#   KERN_WARNING "<4>" /* warning conditions                   */
-#   KERN_NOTICE  "<5>" /* normal but significant condition     */
-#   KERN_INFO    "<6>" /* informational                        */
-#   KERN_DEBUG   "<7>" /* debug-level messages                 */
-# Examples:
-#   LOGLEVEL="1" --> Prevents all messages, expect panic messages, from
-#                    appearing on the console.
-#   LOGLEVEL="8" --> Allow all messages to appear on the console.
-LOGLEVEL="4"
-
-# Timezone
-export TZ="America/Montreal"
-
-INIT_LOG_PATH="/var/log/log-init"
-INIT_LOG_FILE="$INIT_LOG_PATH/init.log"
-
-# The print_status prints a coloured "X" letter inside the checkbox to the left
-# of the screen (the checkbox is displayed with the cmd_run_log_box function).
-print_status()
-{
-    if [ ${#} = 0 ]; then
-        # If no parameters are given, print usage information.
-       echo "Usage: print_status {success|warning|failure}"
-       return ${EXIT_CODE_FAILURE}
-    fi
-    
-    case "$1" in
-       success)
-           ${SUCCESS}
-           ;;
-       warning)
-           ${WARNING}
-           ;;
-       failure)
-           ${FAILURE}
-           ;;
-       *)
-           echo "Usage: print_status {success|warning|failure}"
-           return ${EXIT_CODE_FAILURE}
-           ;;
-    esac
-    echo -n "X"
-    ${NORMAL} 
-}
-
-# Argument #1: message d'erreur
-boot_failure()
-{
-    $FAILURE
-    echo
-    echo $1
-    echo
-    echo "sulogin will now be started. When you logout, the system"
-    echo "will reboot."
-    echo
-    $NORMAL
-    /sbin/sulogin
-    /sbin/reboot -f
-}
-
-# Write a message to the log file.
-msg_log()
-{
-    echo "<$*>" >> ${INIT_LOG_FILE}
-    return ${EXIT_CODE_SUCCESS}
-}
-
-# Display a message with an orange warning box [X]
-msg_box_nolog()
-{
-    STRING=$1
-    echo -n "[ ] $STRING"
-    ${SET_CHECK_POSITION}
-    print_status warning
-    echo
-}
-
-# Write the command and it's arguments to the log file, without running the command.
-log_script_name()
-{
-    echo ">>> Script: $* <<<" >> ${INIT_LOG_FILE}
-    return ${EXIT_CODE_SUCCESS}
-}
-
-# Write the command and it's arguments to the log file, and run the command.
-cmd_run_log()
-{
-    echo "[$*]" >> ${INIT_LOG_FILE}
-    ${*} 1>> ${INIT_LOG_FILE} 2>&1
-    return ${?}
-}
-
-# Display the action name, run a command, log its output and display it's
-# status
-# First argument: action name (string)
-# Remaining arguments: command name with it's options
-cmd_run_log_box()
-{
-    STRING=$1
-    echo -n "[ ] $STRING"
-    shift
-    ${SET_CHECK_POSITION}
-    $* 1>> ${INIT_LOG_FILE} 2>&1
-    ERROR_CODE=${?}
-    if [ $ERROR_CODE = 0 ]; then
-       print_status success
-    else
-       print_status failure
-    fi
-    echo
-    return $ERROR_CODE
-}
-
-# Display the action name, run a command, log its output and display it's
-# status
-# First argument: action name (string)
-# Remaining arguments: command name with it's options
-#    Error codes returned by the command:
-#       0 = success
-#       1 = warning
-#       2 = failure
-cmd_run_log_box_warn()
-{
-    STRING=$1
-    echo -n "[ ] $STRING"
-    shift
-    ${SET_CHECK_POSITION}
-    $* 1>> ${INIT_LOG_FILE} 2>&1
-    ERROR_CODE=${?}
-    if [ $ERROR_CODE = ${EXIT_CODE_SUCCESS} ]; then
-       print_status success
-    elif [ $ERROR_CODE = ${EXIT_CODE_WARNING} ]; then
-       print_status warning
-    else
-       print_status failure
-    fi
-    echo
-    return $ERROR_CODE
-}
-
-
-# Display the action name, run a command, log its output and display it's
-# status
-# If something went wrong during the checks of one of the partitions,
-# fsck will exit with a return value greater than 1
-# First argument: action name (string)
-# Remaining arguments: command name with it's options
-#    Error codes returned by the command:
-#       0  = success
-#       1  = warning
-#       >1 = failure
-cmd_run_log_box_warn_checkfs()
-{
-    STRING=$1
-    echo -n "[ ] $STRING"
-    shift
-    ${SET_CHECK_POSITION}
-    $* 1>> ${INIT_LOG_FILE} 2>&1
-    ERROR_CODE=${?}
-    if [ $ERROR_CODE = ${EXIT_CODE_SUCCESS} ]; then
-       print_status success
-    elif [ $ERROR_CODE = 1 ]; then
-       print_status warning
-        ERROR_CODE=${EXIT_CODE_WARNING}
-    else
-       print_status failure
-        ERROR_CODE=${EXIT_CODE_FAILURE}
-    fi
-    echo
-    return $ERROR_CODE
-}
-
-
-# Display the action name, run a command and display it's status (no log).
-# First argument: action name (string)
-# Remaining arguments: command name with it's options
-cmd_run_nolog_box()
-{
-    STRING=$1
-    echo -n "[ ] $STRING"
-    shift
-    ${SET_CHECK_POSITION}
-    $* 1>> /dev/null 2>&1
-    ERROR_CODE=${?}
-    if [ $ERROR_CODE = 0 ]; then
-       print_status success
-    else
-       print_status failure
-    fi
-    echo
-    return $ERROR_CODE
-}
-
-# loadproc() starts a process (often a daemon) with proper error checking
-loadproc()
-{
-    # If no parameters are given, print usage information.
-    if [ ${#} = 0 ]; then
-       msg_log "Usage: loadproc {program}"
-       return ${EXIT_CODE_FAILURE}
-    fi
-
-    # Find the basename of the first parameter (the daemon's name without the
-    # path that was provided so /usr/sbin/syslogd becomes plain 'syslogd' after
-    # basename ran).
-    base=$(basename ${1})
-
-    # the pidlist variable will contain the output of the pidof command. pidof
-    # will try to find the PID's that belong to a certain string; $base in
-    # this case.
-    pidlist=$(pidof -o $$ -o $PPID -o %PPID -x ${base})
-    pid=""
-    for apid in ${pidlist}; do
-       if [ -d /proc/${apid} ]; then
-           pid="${pid} ${apid}"
-       fi
-    done
-    
-    # If the $pid variable contains anything (from the previous for loop) it
-    # means the daemon is already running.
-    if [ ! -n "${pid}" ]; then
-       # Empty $pid variable means it's not running, so we run "$@" (all
-        # parameters given to this function from the script) and then check
-       # the return value.
-       "$@"
-
-       if [ ${?} -ne 0 ]; then
-           return ${EXIT_CODE_FAILURE}
-       else
-           return ${EXIT_CODE_SUCCESS}
-       fi
-    else
-       # The variable $pid was not empty, meaning it was already running.
-       msg_log "Already running"
-       return ${EXIT_CODE_WARNING}
-    fi
-}
-
-# killproc() kills a process with proper error checking
-# Arg. #1: Name of process to kill
-# Arg. #2: Optional signal to kill the process with (like -HUP, -TERM, -KILL, etc)
-killproc()
-{
-    # If no parameters are given, print usage information.
-    if [ $# -lt 1 ]; then
-       msg_log "Usage: killproc {program} [signal]"
-       return ${EXIT_CODE_FAILURE}
-    fi
-
-    killproc_path ${1} /var/run ${2}
-    
-    return ${?}
-}
-
-# killproc_path() kills a process with proper error checking
-# Arg. #1: Name of process to kill
-# Arg. #2: Base directory containing PID file
-# Arg. #3: Optional signal to kill the process with (like -HUP, -TERM, -KILL, etc)
-killproc_path()
-{
-    # If no parameters are given, print usage information.
-    if [ $# -lt 2 ]; then
-       msg_log "Usage: killproc_path {program} {pid-directory} [signal]"
-       return ${EXIT_CODE_FAILURE}
-    fi
-    
-    # Find the basename of the first parameter (the daemon's name without the
-    # path).
-    base=$(basename ${1})
-
-    piddir=${2}
-
-    # Check if we gave a signal to kill the process with (like -HUP, -TERM,
-    # -KILL, etc) to this function (the third parameter).
-    if [ "${3}" != "" ]; then
-       killlevel=-${3}
-    else
-       nolevel=1
-    fi
-    
-    # The pidlist variable will contains the output of the pidof command. pidof
-    # will try to find the PID's that belong to a certain string; $base in this
-    # case.
-    pidlist=$(pidof -o $$ -o $PPID -o %PPID -x ${base})
-    pid=""
-    for apid in ${pidlist}
-      do
-      if [ -d /proc/${apid} ]; then
-         pid="${pid} ${apid}"
-      fi
-    done
-    
-    # If $pid contains something from the previous for loop it means one or
-    # more PID's were found that belongs to the processes to be killed.
-    if [ -n "${pid}" ]; then
-       # If no kill level was specified we'll try -TERM first and then sleep
-        # for 2 seconds to allow the kill to be completed.
-       if [ "${nolevel}" = 1 ]; then
-           cmd_run_log kill -TERM ${pid}
-
-           # If after -TERM the PID still exists we'll wait 2 seconds before
-           # trying to kill it with -KILL. If the PID still exist after that,
-           # wait two more seconds. If the PIDs still exist by then it's safe
-           # to assume that we cannot kill these PIDs.
-           if /bin/ps h ${pid} >/dev/null 2>&1; then
-               cmd_run_log sleep 2
-               if /bin/ps h ${pid} > /dev/null 2>&1; then
-                   cmd_run_log kill -KILL ${pid}
-                   if /bin/ps h ${pid} > /dev/null 2>&1; then
-                       cmd_run_log sleep 2
-                   fi
-               fi
-           fi
-           /bin/ps h ${pid} >/dev/null 2>&1
-           if [ ${?} = 0 ]; then
-               # If after the -KILL it still exists it can't be killed for
-               # some reason.
-               return ${EXIT_CODE_FAILURE}
-           else
-               # It was killed, remove possible stale PID file in ${piddir}.
-               /bin/rm -f ${piddir}/${base}.pid
-               return ${EXIT_CODE_SUCCESS}
-           fi
-       else
-           # A kill level was provided. Kill with the provided kill level and
-           # wait for 2 seconds to allow the kill to be completed.
-           /bin/kill ${killlevel} ${pid}
-           if /bin/ps h ${pid} > /dev/null 2>&1; then
-               cmd_run_log sleep 2
-           fi
-           /bin/ps h ${pid} >/dev/null 2>&1
-           if [ ${?} = 0 ]; then
-               # If ps' return value is 0 it means it ran ok which indicates
-               # that the PID still exists. This means the process wasn't
-               # killed properly with the signal provided.
-               return ${EXIT_CODE_FAILURE}
-           else
-               # If the return value was 1 or higher it means the PID didn't
-               # exist anymore which means it was killed successfully. Remove
-               # possible stale PID file.
-               /bin/rm -f ${piddir}/${base}.pid
-               return ${EXIT_CODE_SUCCESS}
-           fi
-       fi
-    else
-       # The PID didn't exist so we can't attempt to kill it.
-       msg_log "Not running"
-        return ${EXIT_CODE_WARNING}
-    fi
-}
-
-# reloadproc() sends a signal to a daemon telling it to reload it's
-# configuration file. This is almost identical to the killproc function with
-# the exception that it won't try to kill it with a -KILL signal (aka -9).
-# Arg. #1: Name of process to reload
-# Arg. #2: Optional signal to reload the process with (like -HUP)
-reloadproc()
-{
-    # If no parameters are given, print usage information.
-    if [ ${#} = 0 ]; then
-       msg_log "Usage: reloadproc {program} [signal]"
-       return ${EXIT_CODE_FAILURE}
-    fi
-    
-    # Find the basename of the first parameter (the daemon's name without
-    # the path that was provided so /usr/sbin/syslogd becomes plain 'syslogd'
-    # after basename ran).
-    base=$(basename ${1})
-
-    # Check if we gave a signal to send to the process (like -HUP) to this
-    # function (the second parameter). If no second parameter was provided set
-    # the nolevel variable. Else set the killlevel variable to the value of $2
-    # (the second parameter).
-    if [ -n "${2}" ]; then
-       killlevel="-${2}"
-    else
-       killlevel="-SIGHUP"
-    fi
-    
-    # The pidlist variable will contains the output of the pidof command. pidof
-    # will try to find the PID's that belong to a certain string; $base in this
-    # case.
-    pidlist=$(pidof -o $$ -o $PPID -o %PPID -x ${base})
-    pid=""
-    for apid in ${pidlist}
-      do
-      if [ -d /proc/${apid} ]; then
-         pid="${pid} ${apid}"
-      fi
-    done
-    
-    # If $pid contains something from the previous for loop it means one or
-    # more PID's were found that belongs to the processes to be reloaded.
-    if [ -n "${pid}" ]; then
-       /bin/kill ${killlevel} ${pid}
-
-       if [ ${?} -ne 0 ]; then
-           sleep 2
-           if statusproc ${base} | grep "not running" 1> /dev/null 2>&1; then
-               return ${EXIT_CODE_FAILURE}
-           fi
-       fi
-    else
-       # If $pid is empty no PID's have been found that belong to the process.
-       msg_log "Not running"
-        return ${EXIT_CODE_WARNING}
-    fi
-    
-    return ${EXIT_CODE_SUCCESS}
-}
-
-
-# statusproc_path() will try to find out if a process is running or not.
-# Arg. #1: Name of process to check
-statusproc()
-{
-    # If no parameters are given, print usage information.
-    if [ $# -lt 1 ]; then
-       msg_log "Usage: statusproc {program}"
-       return ${EXIT_CODE_FAILURE}
-    fi
-
-    statusproc_path ${1} /var/run
-    
-    return ${?}
-}
-
-
-# statusproc_path() will try to find out if a process is running or not.
-# Arg. #1: Name of process to check
-# Arg. #2: Base directory containing PID file
-statusproc_path()
-{
-    # If no parameters are given, print usage information.
-    if [ $# -lt 2 ]; then
-       msg_log "Usage: status {program} {pid-directory}"
-       return ${EXIT_CODE_FAILURE}
-    fi
-    
-    # Find the basename of the first parameter (the daemon's name without the
-    # path).
-    base=$(basename ${1})
-
-    piddir=${2}
-
-    # $pid will contain a list of PID's that belong to a process.
-    pid=$(pidof -o $$ -o $PPID -o %PPID -x ${base})
-    if [ -n "${pid}" ]; then
-       # If $pid contains something, the process is running, print the content
-       # of the $pid variable.
-       echo "${base} running with Process ID ${pid}"
-       return ${EXIT_CODE_SUCCESS}
-    fi
-
-    # If $pid doesn't contain it check if a PID file exists and inform the
-    # user about this stale file.
-    if [ -f ${piddir}/${base}.pid ]; then
-       pid=$(head -1 ${piddir}/${base}.pid)
-       if [ -n "${pid}" ]; then
-           echo "${base} not running but ${piddir}/${base}.pid exists"
-           return ${EXIT_CODE_FAILURE}
-       fi
-    else
-       echo "${base} is not running"
-    fi
-}
diff --git a/stage2/bootscripts/initlog b/stage2/bootscripts/initlog
deleted file mode 100755 (executable)
index 9d73f86..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-# initlog
-
-# Source functions library
-source /etc/rc.d/init.d/functions
-
-case "$1" in
-    start)
-       # Initialization of the log file for the INIT process
-       if [ ! -d ${INIT_LOG_PATH} ]; then
-           boot_failure "Missing ${INIT_LOG_PATH} directory."
-       fi
-       
-       mount -n -t tmpfs -o size=256k,nr_inodes=10,mode=0755 tmpfs ${INIT_LOG_PATH} &&
-        touch ${INIT_LOG_FILE}
-       ;;
-    
-    stop)
-        umount ${INIT_LOG_PATH}
-       ;;
-    
-    restart)
-       $0 stop
-       sleep 1
-       $0 start
-       ;;
-    
-    *)
-       echo "Usage: $0 {start|stop|restart}"
-        exit ${EXIT_CODE_FAILURE}
-       ;;
-esac
-
-exit $?
index 3ddddbd..2a02fae 100755 (executable)
@@ -9,7 +9,7 @@ LOGDIR_GLOBAL=/var/log
 LOGFILES_GLOBAL="auth.log clamd.log freshclam.log cron.log daemon.log kern.log mail.log procmail.log scrollkeeper.log sys.log user.log xdm.log XFree86.0.log"
 
 LOGDIR_APACHE=/var/log/apache
 LOGFILES_GLOBAL="auth.log clamd.log freshclam.log cron.log daemon.log kern.log mail.log procmail.log scrollkeeper.log sys.log user.log xdm.log XFree86.0.log"
 
 LOGDIR_APACHE=/var/log/apache
-LOGFILES_APACHE="access_log error_log ssl_request_log access_log_hugovil access_log_quebecjazz access_log_atelierdestourelles"
+LOGFILES_APACHE="access_log error_log ssl_request_log"
 
 LOGDIR_CUPS=/var/log/cups
 LOGFILES_CUPS="access_log error_log"
 
 LOGDIR_CUPS=/var/log/cups
 LOGFILES_CUPS="access_log error_log"
diff --git a/stage2/install-1 b/stage2/install-1
deleted file mode 100755 (executable)
index e345268..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-export LFS_PKG_DIR="$(dirname $(pwd))/packages/stage2"
-export LFS_LOG_DIR=/var/log/hvlinux-install/stage2
-export LFS_LOG_FILE=${LFS_LOG_DIR}/install.log
-export LFS_TMP="/tmp"
-
-init_log_file
-
-export CFLAGS="-pipe -march=${MACHINE_ARCHITECTURE} -O2"
-export CXXFLAGS=${CFLAGS}
-
-ipkg           ${KERNEL} cis-kernel
-ipkg           ${MANPAGES} cis-man-pages
-ipkg           ${GLIBC} cis-glibc
-run_script_log "toolchain-adjust-stage2" cis-toolchain-adjust
-ipkg           ${BINUTILS} cis-binutils
-ipkg           ${GCC_CORE} cis-gcc
-ipkg           ${DB4} cis-db4
-ipkg_ac        ${SED} "--bindir=/bin --enable-html"
-ipkg           ${E2FSPROGS} cis-e2fsprogs
-ipkg           ${COREUTILS} cis-coreutils
-ipkg           ${IANA} cis-iana
-ipkg_ac        ${MFOUR}
-ipkg           ${BISON} cis-bison
-ipkg           ${NCURSES} cis-ncurses
-ipkg           ${PROCPS} cis-procps
-ipkg_ac        ${LIBTOOL}
-ipkg           ${PERL} cis-perl
-ipkg           ${READLINE} cis-readline
-ipkg           ${ZLIB} cis-zlib
-ipkg_ac        ${AUTOCONF}
-ipkg_ac        ${AUTOMAKE}
-ipkg_ac        ${BASH} "--bindir=/bin --without-bash-malloc --with-installed-readline"
-
-/bin/bash +h -c ./install-2
-
-exit $?
index bb73b06..2ba83f7 100755 (executable)
@@ -1,27 +1,27 @@
 #!/bin/sh
 
 #!/bin/sh
 
-# System configuration informations (entered by the user)
-source ../sysinfos
+LFS_STAGE=stage2
 
 
-export LFS_PKG_DIR="$(dirname $(pwd))/packages/stage2"
-export LFS_LOG_DIR=/var/log/hvlinux-install/stage2
+export LFS_PKG_DIR="$(dirname $(pwd))/packages/${LFS_STAGE}"
+export LFS_LOG_DIR=/var/log/hvlinux-install/${LFS_STAGE}
 export LFS_LOG_FILE=${LFS_LOG_DIR}/install.log
 export LFS_LOG_FILE=${LFS_LOG_DIR}/install.log
-export LFS_TMP="/tmp"
+export LFS_TMP=/tmp
 
 
+# Reading system configuration informations, functions and package versions.
+source ../sysinfos
 source ../functions
 source ../functions
-
-# Name and version of all packages to install
 source ../packages-list
 source ../packages-list
+source /etc/profile
 
 
-# Init log file
-mkdir -p ${LFS_LOG_DIR} &&
-if [ ! -f ${LFS_LOG_FILE} ]; then
-    touch ${LFS_LOG_FILE} || exit 1
+if [ "x${USER}" != "xroot" ]; then
+    echo "You must be the superuser to install hvlinux."
+    exit 1
 fi
 
 fi
 
+init_log_file
+
 ipkg_ac        ${LIBTOOL}
 ipkg_ac        ${LIBTOOL}
-ipkg           ${UDEV} cis-udev
-ipkg           ${UDEV_CONFIG} cis-udev-config
+ipkg_cust      ${UDEV} cis-udev
+ipkg_cust      ${UDEV_CONFIG} cis-udev-config
 
 
-# Return last error
 exit $?
 exit $?