projects
/
hvlinux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ámélioré détection link up/down script ifup
[hvlinux.git]
/
functions
/
main
diff --git
a/functions/main
b/functions/main
index
6916952
..
76aa3a0
100644
(file)
--- a/
functions/main
+++ b/
functions/main
@@
-49,6
+49,8
@@
source ./stage.def
# Load functions
source ../functions/fpkg
# Load functions
source ../functions/fpkg
+source ../functions/lpkg
+source ../functions/version
# Constants for return codes
EXIT_SUCCESS=0
# Constants for return codes
EXIT_SUCCESS=0
@@
-118,7
+120,7
@@
if [ -z "${LFS_STAGE}" ]; then
return ${EXIT_FAILURE}
fi
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
LFS=""
fi
@@
-940,11
+942,16
@@
rscr()
exit ${EXIT_FAILURE}
fi
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
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
PACKAGE_LOG=${LFS_LOG_DIR}/${HVLABEL}.log
@@
-1120,7
+1127,8
@@
print_status()
if [ $# -ne 1 ]; then
# If no parameters are given to the print_status function, print usage
# information.
if [ $# -ne 1 ]; then
# If no parameters are given to the print_status function, print usage
# information.
- echo "Usage: ${FUNCNAME}() {success|warning|failure} [STRING] [TIME]"
+ echo "Usage: ${FUNCNAME}() {success|warning|failure}"
+ echo " got: \"${*}\""
return ${EXIT_FAILURE}
fi
return ${EXIT_FAILURE}
fi