summaryrefslogtreecommitdiffstats
path: root/mkinitcpio
diff options
context:
space:
mode:
Diffstat (limited to 'mkinitcpio')
-rwxr-xr-xmkinitcpio8
1 files changed, 6 insertions, 2 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 1b40867..fad9499 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -113,6 +113,8 @@ while getopts ':c:k:s:b:g:a:p:m:vH:LMhS:' arg; do
done
shift $((${OPTIND} - 1))
+. "${FUNCTIONS}"
+
# use preset $PRESET
if [ -n "${PRESET}" ]; then
if [ -f "${PRESETDIR}/${PRESET}.preset" ]; then
@@ -130,6 +132,10 @@ if [ -n "${PRESET}" ]; then
# Build all images
echo "==> Using ${PRESETDIR}/${PRESET}.preset"
+ if grep -q "PRESETS=(" ${PRESETDIR}/${PRESET}.preset; then
+ die "Invalid definition of PRESETS."
+ fi
+
. ${PRESETDIR}/${PRESET}.preset
for p in ${PRESETS}; do
@@ -224,8 +230,6 @@ fi
BASEDIR=$(echo ${BASEDIR} | tr -s /)
MODULEDIR=$(echo ${MODULEDIR} | tr -s /)
-. "${FUNCTIONS}"
-
if [ "${SHOW_AUTOMODS}" = "y" ]; then
echo "Modules autodetected:"
. "${INSTDIR}/autodetect"