diff options
author | Darren Hart <dvhart@linux.intel.com> | 2012-07-03 13:02:50 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-09 16:58:17 +0100 |
commit | 2678ce668499af0e90994b9da8c518e85de56651 (patch) | |
tree | 8858719cc3d6b8397d43da4b3e6312e553ebb324 | |
parent | 56fafe083fdb63f156a081344fb1d836e3182bf0 (diff) | |
download | openembedded-core-2678ce668499af0e90994b9da8c518e85de56651.tar.gz openembedded-core-2678ce668499af0e90994b9da8c518e85de56651.tar.bz2 openembedded-core-2678ce668499af0e90994b9da8c518e85de56651.zip |
init-install: Use swap_ratio in the calulation of swap_size
swap_size currently uses a hard coded percentage and ignores the
swap_ratio variable. Fortunately they are the same value currently. Make
the calculation use the variable to avoid problems in the future.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh index 01ff82926a..3005f2045c 100644 --- a/meta/recipes-core/initrdscripts/files/init-install.sh +++ b/meta/recipes-core/initrdscripts/files/init-install.sh @@ -81,7 +81,7 @@ cat /proc/mounts > /etc/mtab disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") -swap_size=$((disk_size*5/100)) +swap_size=$((disk_size*swap_ratio/100)) rootfs_size=$((disk_size-boot_size-swap_size)) rootfs_start=$((boot_size + 1)) |