card script: check for software, before trying to figure out what version we have

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
pull/8/head
Robert Nelson 13 years ago
parent 52a912a9e3
commit 844ff73918

@ -117,25 +117,6 @@ if [[ $UID -ne 0 ]]; then
fi
}
function find_issue {
check_root
#Software Qwerks
#Check for gnu-fdisk
#FIXME: GNU Fdisk seems to halt at "Using /dev/xx" when trying to script it..
if fdisk -v | grep "GNU Fdisk" >/dev/null ; then
echo "Sorry, this script currently doesn't work with GNU Fdisk"
exit
fi
unset PARTED_ALIGN
if parted -v | grep parted | grep 2.[1-3] >/dev/null ; then
PARTED_ALIGN="--align cylinder"
fi
}
function check_for_command {
if ! which "$1" > /dev/null ; then
echo -n "You're missing command $1"
@ -166,6 +147,18 @@ function detect_software {
echo ""
exit
fi
#Check for gnu-fdisk
#FIXME: GNU Fdisk seems to halt at "Using /dev/xx" when trying to script it..
if fdisk -v | grep "GNU Fdisk" >/dev/null ; then
echo "Sorry, this script currently doesn't work with GNU Fdisk"
exit
fi
unset PARTED_ALIGN
if parted -v | grep parted | grep 2.[1-3] >/dev/null ; then
PARTED_ALIGN="--align cylinder"
fi
}
function rcn-ee_down_use_mirror {
@ -1730,7 +1723,7 @@ while [ ! -z "$1" ]; do
then
PARTITION_PREFIX="p"
fi
find_issue
check_root
check_mmc
;;
--uboot)
@ -1802,7 +1795,7 @@ fi
echo "Script Version git: ${GIT_VERSION}"
echo "-----------------------------"
find_issue
check_root
detect_software
dl_bootloader
dl_kernel_image

Loading…
Cancel
Save