Fixup for commit
9453222c0, where we introduced usage of
$fixed_squashfs_name. This variable was set up only *after*
adjust_boot_files function got invoked for the isolinux configuration
files. As a result the isolinux configuration files ended up with their
template placeholder settings included ("toram=%SQUASHFS_NAME%").
Fix ordering, but also warn in adjust_boot_files() if the the
$fixed_squashfs_name + $fixed_release_info variables are unset.
Thanks: Chris Hofstaedtler for the bug report
Closes: https://github.com/grml/grml/issues/179
sed -i "s/%GRML_NAME%/$GRML_NAME/g" "${file}"
if [ -n "${fixed_squashfs_name}" ] ; then
sed -i "s/%SQUASHFS_NAME%/${fixed_squashfs_name}/g" "${file}"
sed -i "s/%GRML_NAME%/$GRML_NAME/g" "${file}"
if [ -n "${fixed_squashfs_name}" ] ; then
sed -i "s/%SQUASHFS_NAME%/${fixed_squashfs_name}/g" "${file}"
+ else
+ ewarn "Variable fixed_squashfs_name is unset, can't adjust %SQUASHFS_NAME% in templates." ; eend 1
fi
if [ -n "${fixed_release_info}" ] ; then
sed -i "s/%RELEASE_INFO%/${fixed_release_info}/g" "${file}"
fi
if [ -n "${fixed_release_info}" ] ; then
sed -i "s/%RELEASE_INFO%/${fixed_release_info}/g" "${file}"
+ else
+ ewarn "Variable fixed_release_info is unset, can't adjust %RELEASE_INFO% in templates." ; eend 1
fi
sed -i "s/%SHORT_NAME%/$SHORT_NAME/g" "${file}"
sed -i "s/%VERSION%/$VERSION/g" "${file}"
fi
sed -i "s/%SHORT_NAME%/$SHORT_NAME/g" "${file}"
sed -i "s/%VERSION%/$VERSION/g" "${file}"
# make sure the squashfs filename is set accordingly:
SQUASHFS_NAME="$GRML_NAME.squashfs"
# make sure the squashfs filename is set accordingly:
SQUASHFS_NAME="$GRML_NAME.squashfs"
+ # adjust bootsplash accordingly but make sure the string has the according length
+ fixed_squashfs_name="$(cut_string 20 "$SQUASHFS_NAME")"
+ fixed_squashfs_name="$(extend_string_end 20 "$fixed_squashfs_name")"
+ for file in f4 f5 ; do
+ if [ -r "${BUILD_OUTPUT}/boot/isolinux/${file}" ] ; then
+ sed -i "s/%SQUASHFS_NAME%/${fixed_squashfs_name}/" "${BUILD_OUTPUT}/boot/isolinux/${file}"
+ sed -i "s/%SQUASHFS_NAME%/${fixed_squashfs_name}/" "${BUILD_OUTPUT}/boot/isolinux/${file}"
+ fi
+ done
# adjust all variables in the templates with the according distribution information
adjust_boot_files "${BUILD_OUTPUT}"/boot/isolinux/*.cfg \
# adjust all variables in the templates with the according distribution information
adjust_boot_files "${BUILD_OUTPUT}"/boot/isolinux/*.cfg \
- # adjust bootsplash accordingly but make sure the string has the according length
- fixed_squashfs_name="$(cut_string 20 "$SQUASHFS_NAME")"
- fixed_squashfs_name="$(extend_string_end 20 "$fixed_squashfs_name")"
- for file in f4 f5 ; do
- if [ -r "${BUILD_OUTPUT}/boot/isolinux/${file}" ] ; then
- sed -i "s/%SQUASHFS_NAME%/${fixed_squashfs_name}/" "${BUILD_OUTPUT}/boot/isolinux/${file}"
- sed -i "s/%SQUASHFS_NAME%/${fixed_squashfs_name}/" "${BUILD_OUTPUT}/boot/isolinux/${file}"
- fi
- done
-
# generate addon list
rm -f "${BUILD_OUTPUT}/${ADDONS_LIST_FILE}"
for name in "${BUILD_OUTPUT}"/boot/isolinux/addon_*.cfg ; do
# generate addon list
rm -f "${BUILD_OUTPUT}/${ADDONS_LIST_FILE}"
for name in "${BUILD_OUTPUT}"/boot/isolinux/addon_*.cfg ; do