|
|
|
@ -111,29 +111,10 @@ function is_valid_addon {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function check_root {
|
|
|
|
|
if [[ $UID -ne 0 ]]; then
|
|
|
|
|
echo "$0 must be run as sudo user or root"
|
|
|
|
|
exit
|
|
|
|
|
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
|
|
|
|
|
if [[ $UID -ne 0 ]]; then
|
|
|
|
|
echo "$0 must be run as sudo user or root"
|
|
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function check_for_command {
|
|
|
|
@ -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
|
|
|
|
|