#!/bin/sh
-export LFS_PKG_DIR="$(dirname $(dirname $(pwd)))/packages/stage4"
-export LFS_LOG_DIR=/var/log/hvlinux-install/stage4
+LFS_STAGE=stage4
+
+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
# Reading system configuration informations, functions and package versions.
source ../sysinfos
source ../packages-list
source /etc/profile
-# Init log file
-mkdir -p ${LFS_LOG_DIR} || exit 1
-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
-ipkg ${GDB} cis-gdb
+init_log_file
+
+# Scripts directory
+export SCRDIR=$(pwd)
exit $?