cleanup: refactor populate_boot

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
pull/22/head
Robert Nelson 12 years ago
parent f999becb74
commit 22e9f61089

@ -1208,14 +1208,21 @@ populate_boot () {
echo "Populating Boot Partition" echo "Populating Boot Partition"
echo "-----------------------------" echo "-----------------------------"
partprobe ${media}
if [ ! -d ${TEMPDIR}/disk ] ; then if [ ! -d ${TEMPDIR}/disk ] ; then
mkdir -p ${TEMPDIR}/disk mkdir -p ${TEMPDIR}/disk
fi fi
if mount -t ${mount_partition_format} ${media_prefix}1 ${TEMPDIR}/disk; then partprobe ${media}
mkdir -p ${TEMPDIR}/disk/backup if ! mount -t ${mount_partition_format} ${media_prefix}1 ${TEMPDIR}/disk; then
mkdir -p ${TEMPDIR}/disk/dtbs echo "-----------------------------"
echo "Unable to mount ${media_prefix}1 at ${TEMPDIR}/disk to complete populating Boot Partition"
echo "Please retry running the script, sometimes rebooting your system helps."
echo "-----------------------------"
exit
fi
mkdir -p ${TEMPDIR}/disk/backup || true
mkdir -p ${TEMPDIR}/disk/dtbs || true
if [ ! "${bootloader_installed}" ] ; then if [ ! "${bootloader_installed}" ] ; then
if [ "${spl_name}" ] ; then if [ "${spl_name}" ] ; then
@ -1350,13 +1357,7 @@ populate_boot () {
echo "Finished populating Boot Partition" echo "Finished populating Boot Partition"
echo "-----------------------------" echo "-----------------------------"
else
echo "-----------------------------"
echo "Unable to mount ${media_prefix}1 at ${TEMPDIR}/disk to complete populating Boot Partition"
echo "Please retry running the script, sometimes rebooting your system helps."
echo "-----------------------------"
exit
fi
echo "mk_mmc.sh script complete" echo "mk_mmc.sh script complete"
echo "Script Version git: ${GIT_VERSION}" echo "Script Version git: ${GIT_VERSION}"
echo "-----------------------------" echo "-----------------------------"

Loading…
Cancel
Save