Add various checks
This commit is contained in:
parent
108989085b
commit
3d6b10723e
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user