Check that the mount directory exists
This commit is contained in:
parent
3eecbca7a3
commit
fbe83becc4
|
@ -46,7 +46,7 @@ DOWNLOAD_LINK2="http://ynezz.ibawizard.net/beagleboard/jessie/$DEBIAN_FILE_NAME.
|
|||
|
||||
function show_help {
|
||||
echo ''
|
||||
echo 'freedombone-prep -d [microSD device] --ip [BBB LAN IP address] --iprouter [Router LAN IP address]'
|
||||
echo 'freedombone-prep -d [microSD device] --ip [BBB LAN IP address] --iprouter [Router LAN IP address] --mount [mount directory]'
|
||||
echo ''
|
||||
echo 'See the manpage for more details'
|
||||
echo ''
|
||||
|
@ -58,6 +58,12 @@ if [[ $NO_OF_ARGS == 0 ]]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
if [ ! -d $MICROSD_MOUNT_POINT ]; then
|
||||
echo "The mount directory $MICROSD_MOUNT_POINT does not exist."
|
||||
echo 'Use the --mount option to specify where the microSD gets mounted to.'
|
||||
exit 67563
|
||||
fi
|
||||
|
||||
while [[ $# > 1 ]]
|
||||
do
|
||||
key="$1"
|
||||
|
@ -154,6 +160,16 @@ if [ ! -b ${MICROSD_DRIVE}1 ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ ! -d $MICROSD_MOUNT_POINT/BOOT ]; then
|
||||
echo "The boot partition $MICROSD_MOUNT_POINT/BOOT was not found."
|
||||
exit 67857
|
||||
fi
|
||||
|
||||
if [ ! -d $MICROSD_MOUNT_POINT/rootfs ]; then
|
||||
echo "The rootfs partition $MICROSD_MOUNT_POINT/rootfs was not found."
|
||||
exit 65688
|
||||
fi
|
||||
|
||||
$SUDO cp $MICROSD_MOUNT_POINT/BOOT/bbb-uEnv.txt $MICROSD_MOUNT_POINT/BOOT/uEnv.txt
|
||||
|
||||
$SUDO sed -i 's/iface eth0 inet dhcp/iface eth0 inet static/g' $MICROSD_MOUNT_POINT/rootfs/etc/network/interfaces
|
||||
|
|
Loading…
Reference in New Issue