Add various checks

This commit is contained in:
Filippo Bedendo Bordon 2012-02-18 17:56:33 +01:00
parent 108989085b
commit 3d6b10723e

View File

@ -176,6 +176,7 @@ fi
#=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
#--------------------------------(INSTALLATION)--------------------------------------
#=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
export LOGFILE=/var/log/usbinstall.log
set_status "Smonto la chiavetta"
DEVICEISMOUNTED=`dbus_properties_get_bool org.freedesktop.UDisks /org/freedesktop/UDisks/devices/${SELECT_USB/*\/}1 \
@ -190,15 +191,23 @@ set_pbar 2
set_status "Formattazione della chiavetta in corso..."
sudo fdisk $SELECT_USB < ./fdisk_template
echo "Format..."
sudo fdisk $SELECT_USB < /usr/share/openmamba/usbinstall/fdisk_template &>$LOGFILE
if [ "$?" != "0" ]; then
errorAndExit "Error: fdisk exit with error"
errorAndExit "Error: \"fdisk\" exit with error (see $LOGFILE)"
fi
set_pbar 5
sudo mkfs.ext3 ${SELECT_USB}1 -L openmamba_live
sleep 1
echo "Make Fs (ext3)..."
sudo mkfs.ext3 ${SELECT_USB}1 -L openmamba_live &>>$LOGFILE
if [ "$?" != "0" ]; then
errorAndExit "Error: \"mkfs.ext3\" exit with error (see $LOGFILE)"
fi
LANG=C udisks --mount ${SELECT_USB}1
if [ "$?" != "0" ]; then
errorAndExit "Error: \"udisks --mount\" exit with error (see $LOGFILE)"
fi
set_pbar 30