aboutsummaryrefslogtreecommitdiffstats
path: root/create_arm_img_urpmi.sh
diff options
context:
space:
mode:
authorDaniel Tartavel <contact@librepc.com>2018-07-18 00:48:15 +0200
committerDaniel Tartavel <contact@librepc.com>2018-07-18 00:48:15 +0200
commit079d0cc6cb762e54c5d7c1a3923f78930a30e000 (patch)
tree98b11acd5232e3d4f76794a0e71e6f7954f15735 /create_arm_img_urpmi.sh
parente053cb083759d6d3ffa4febac92b4d172e7a7162 (diff)
downloadmageia4arm-079d0cc6cb762e54c5d7c1a3923f78930a30e000.tar
mageia4arm-079d0cc6cb762e54c5d7c1a3923f78930a30e000.tar.gz
mageia4arm-079d0cc6cb762e54c5d7c1a3923f78930a30e000.tar.bz2
mageia4arm-079d0cc6cb762e54c5d7c1a3923f78930a30e000.tar.xz
mageia4arm-079d0cc6cb762e54c5d7c1a3923f78930a30e000.zip
- added suppression of loop devices in clean option
- corrected a bug in option all
Diffstat (limited to 'create_arm_img_urpmi.sh')
-rwxr-xr-xcreate_arm_img_urpmi.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/create_arm_img_urpmi.sh b/create_arm_img_urpmi.sh
index 59b3fb0..2e08527 100755
--- a/create_arm_img_urpmi.sh
+++ b/create_arm_img_urpmi.sh
@@ -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