X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=functions%2Fmain;h=76aa3a057cf8d78ab20b16f2820b3e9466c26dfb;hb=4764a3fcf7c824f580140f1226b6d0718f7cef9c;hp=c0ab98ee05d9e56d600c6395d6e68ebb35f21e36;hpb=16f1a75d215e027ad746fc60dd10cd456f07f8d6;p=hvlinux.git diff --git a/functions/main b/functions/main index c0ab98e..76aa3a0 100644 --- a/functions/main +++ b/functions/main @@ -50,6 +50,7 @@ source ./stage.def # Load functions source ../functions/fpkg source ../functions/lpkg +source ../functions/version # Constants for return codes EXIT_SUCCESS=0 @@ -119,7 +120,7 @@ if [ -z "${LFS_STAGE}" ]; then return ${EXIT_FAILURE} fi -if [ "x${LFS_STAGE}" != "xstage0" -a "x${LFS_STAGE}" != "xstage1" ] ;then +if [ "x${LFS_STAGE}" != "xstage0" -a "x${LFS_STAGE}" != "xstage1" ]; then LFS="" fi @@ -941,11 +942,16 @@ rscr() exit ${EXIT_FAILURE} fi - # Checking if script is valid and executable - if [ ! -x ${SCRDIR}/${SCRIPT} ]; then + # Checking if script file is found + if [ ! -f ${SCRDIR}/${SCRIPT} ]; then echo "${FUNCNAME}(): script not found: ${SCRIPT}" exit ${EXIT_FAILURE} fi + # ... and make sure it is executable + if [ ! -x ${SCRDIR}/${SCRIPT} ]; then + echo "${FUNCNAME}(): execute bit not set: ${SCRIPT}" + exit ${EXIT_FAILURE} + fi PACKAGE_LOG=${LFS_LOG_DIR}/${HVLABEL}.log