X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Fstage2-additions;h=296857da8d7733c521f2c79e5802eec67370473e;hb=d9a5344c1aa683d051d1a1d5e87f0bba317e299a;hp=bb73b06104945bf46df7f3402fc0d61b6cda1e79;hpb=12b39d0455ce4e04ae2c7719ea91dfeca9bfe4a6;p=hvlinux.git diff --git a/stage2/stage2-additions b/stage2/stage2-additions index bb73b06..296857d 100755 --- a/stage2/stage2-additions +++ b/stage2/stage2-additions @@ -1,27 +1,27 @@ -#!/bin/sh +#!/bin/bash -# 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_TMP="/tmp" +export LFS_TMP=/tmp +# Reading system configuration informations, functions and package versions. +source ../sysinfos source ../functions - -# Name and version of all packages to install 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 +init_log_file + 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 $?