- 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
|
else
|
||||||
warning "$IMAGE does not exists"
|
warning "$IMAGE does not exists"
|
||||||
fi
|
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
|
if [ -d "$BOOT" ];then
|
||||||
info "Removing $BOOT"
|
info "Removing $BOOT"
|
||||||
/bin/rmdir $BOOT
|
/bin/rmdir $BOOT
|
||||||
@ -135,6 +142,7 @@ function clean()
|
|||||||
|
|
||||||
function createchroot()
|
function createchroot()
|
||||||
{
|
{
|
||||||
|
title "Making chroot"
|
||||||
if ! [ -f /bin/qemu-arm-static ]; then
|
if ! [ -f /bin/qemu-arm-static ]; then
|
||||||
title "Qemu package not present : installing qemu packages"
|
title "Qemu package not present : installing qemu packages"
|
||||||
/sbin/urpmi --auto --no-recommends qemu-user-static
|
/sbin/urpmi --auto --no-recommends qemu-user-static
|
||||||
@ -303,7 +311,7 @@ EOF" >>"$BUILD_PATH/second_stage_install.sh"
|
|||||||
|
|
||||||
function verify_disk_space()
|
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'`
|
DISK_SPACE=`/usr/bin/df -BG --output=avail $INSTALL_PATH | sed '1d;s/[^0-9]//g'`
|
||||||
info "Free disk space: ${DISK_SPACE}G"
|
info "Free disk space: ${DISK_SPACE}G"
|
||||||
if [ $DISK_SPACE -lt $IMAGE_SIZE ];then
|
if [ $DISK_SPACE -lt $IMAGE_SIZE ];then
|
||||||
@ -405,7 +413,6 @@ EOF
|
|||||||
BOOT_UUID=`blkid -o value uuid $BOOTP | head -n 1`
|
BOOT_UUID=`blkid -o value uuid $BOOTP | head -n 1`
|
||||||
ROOTP=${DEVICE}p2
|
ROOTP=${DEVICE}p2
|
||||||
ROOT_UUID=`blkid -o value uuid $ROOTP | head -n 1`
|
ROOT_UUID=`blkid -o value uuid $ROOTP | head -n 1`
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
formatpartitions()
|
formatpartitions()
|
||||||
@ -710,7 +717,6 @@ fi
|
|||||||
|
|
||||||
info "Image size is: $IMAGE_SIZE Go"
|
info "Image size is: $IMAGE_SIZE Go"
|
||||||
|
|
||||||
|
|
||||||
case $OPT in
|
case $OPT in
|
||||||
clean)
|
clean)
|
||||||
clean
|
clean
|
||||||
@ -729,7 +735,7 @@ case $OPT in
|
|||||||
updatemirror
|
updatemirror
|
||||||
installbasesystem
|
installbasesystem
|
||||||
jumpchroot
|
jumpchroot
|
||||||
createimage
|
$CREATEIMG
|
||||||
;;
|
;;
|
||||||
createchroot)
|
createchroot)
|
||||||
createchroot
|
createchroot
|
||||||
|
Reference in New Issue
Block a user