index : mkinitcpio-archiso32 | |
Archlinux32 initcpio scripts used by archiso | gitolite user |
summaryrefslogtreecommitdiff |
author | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2013-01-08 20:20:03 -0300 |
---|---|---|
committer | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2013-01-08 20:20:03 -0300 |
commit | 662249c2c974297208a94c557da9461f1ed4238c (patch) | |
tree | fb3761a9a734cf2a3029e0ce7e9d3a67a1be9b99 | |
parent | c82f68c1b4c4f0e9f2b13ca8f9148ae31d02f2b0 (diff) |
-rw-r--r-- | hooks/archiso | 7 |
diff --git a/hooks/archiso b/hooks/archiso index 491ed2f..66a6273 100644 --- a/hooks/archiso +++ b/hooks/archiso @@ -11,7 +11,12 @@ _mnt_fs() { ro_dev=$(losetup --find --show --read-only "${img}") echo ${ro_dev} >> /run/archiso/used_block_devices ro_dev_size=$(blockdev --getsz ${ro_dev}) - rw_dev_size=$((ro_dev_size*cowfile_size/100)) + if [[ "${cowfile_size}" == "100" ]]; then + rw_dev_size=${ro_dev_size} + else + # size calculation done in this way to avoid integer overflow when ro_dev_size is > 10.2G + rw_dev_size=$((ro_dev_size/100*cowfile_size)) + fi if [[ "${cow_persistent}" == "P" ]]; then if [[ -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" ]]; then |