# 4. The 'default' entry name does not have wildcards ("*")
# 5. Kernels binaries are placed in the root of ESP
#
-# May be there are few more implicit assumption. This all can be improved and
-# made to be more flexible if needed.
+# May be there are few more implicit assumption.
+#
+#This script requires a number of environment variables to be defined. Namely:
+#
+# 1. INSTALLERFW_MOUNT_PREFIX - where the target partitions are mounted (the
+# "root" directory of the file-system we install gummiboot to)
PROG="setup-gummiboot-conf"
exit 1
}
-# Right now we assume that ESP is always in "/boot", but later we can add a
-# command line option for this.
-esp="/home/dedekind/tmp/boot"
+# Make sure the installer framework variables are defined
+[ "${INSTALLERFW_MOUNT_PREFIX:+x}" == "x" ] ||
+ fatal "installer framework environment variables not found"
+
+# Get the ESP location
+esp="$INSTALLERFW_MOUNT_PREFIX/boot"
+
+# The gummiboot configuration file
conf_file="$esp/loader/loader.conf"
+# The gummiboot kernel entries directory
entries_dir="$esp/loader/entries"
# Make sure the gummiboot configuration file exists