- added suppression of loop devices in clean option
- corrected a bug in option all
This commit is contained in:
parent
e053cb0837
commit
079d0cc6cb
@ -114,7 +114,14 @@ function clean()
|
||||
else
|
||||
warning "$IMAGE does not exists"
|
||||
fi
|
||||
|
||||
for LOOP in ` ls /dev/loop*[0-9]p1`
|
||||
do
|
||||
X=${LOOP:0:10}
|
||||
if [ -e $X ];then
|
||||
info "removing $X"
|
||||
partx -d $X
|
||||
fi
|
||||
done
|
||||
if [ -d "$BOOT" ];then
|
||||
info "Removing $BOOT"
|
||||
/bin/rmdir $BOOT
|
||||
@ -135,6 +142,7 @@ function clean()
|
||||
|
||||
function createchroot()
|
||||
{
|
||||
title "Making chroot"
|
||||
if ! [ -f /bin/qemu-arm-static ]; then
|
||||
title "Qemu package not present : installing qemu packages"
|
||||
/sbin/urpmi --auto --no-recommends qemu-user-static
|
||||
@ -303,7 +311,7 @@ EOF" >>"$BUILD_PATH/second_stage_install.sh"
|
||||
|
||||
function verify_disk_space()
|
||||
{
|
||||
info "Verifying if there is enough space on disk to make the image"
|
||||
title "Verifying if there is enough space on disk to make the image"
|
||||
DISK_SPACE=`/usr/bin/df -BG --output=avail $INSTALL_PATH | sed '1d;s/[^0-9]//g'`
|
||||
info "Free disk space: ${DISK_SPACE}G"
|
||||
if [ $DISK_SPACE -lt $IMAGE_SIZE ];then
|
||||
@ -405,7 +413,6 @@ EOF
|
||||
BOOT_UUID=`blkid -o value uuid $BOOTP | head -n 1`
|
||||
ROOTP=${DEVICE}p2
|
||||
ROOT_UUID=`blkid -o value uuid $ROOTP | head -n 1`
|
||||
|
||||
}
|
||||
|
||||
formatpartitions()
|
||||
@ -710,7 +717,6 @@ fi
|
||||
|
||||
info "Image size is: $IMAGE_SIZE Go"
|
||||
|
||||
|
||||
case $OPT in
|
||||
clean)
|
||||
clean
|
||||
@ -729,7 +735,7 @@ case $OPT in
|
||||
updatemirror
|
||||
installbasesystem
|
||||
jumpchroot
|
||||
createimage
|
||||
$CREATEIMG
|
||||
;;
|
||||
createchroot)
|
||||
createchroot
|
||||
|
Reference in New Issue
Block a user