summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initrdscripts/files/init-install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/initrdscripts/files/init-install.sh')
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index aa9476660b..28e8f09d19 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -7,8 +7,19 @@
7 7
8PATH=/sbin:/bin:/usr/sbin:/usr/bin 8PATH=/sbin:/bin:/usr/sbin:/usr/bin
9 9
10# We need 20 Mb for the boot partition 10# figure out how big of a boot partition we need
11boot_size=20 11boot_size=$(du -ms /run/media/$1/ | awk '{print $1}')
12# remove rootfs.img ($2) from the size if it exists, as its not installed to /boot
13if [ -e /run/media/$1/$2 ]; then
14 boot_size=$(( boot_size - $( du -ms /run/media/$1/$2 | awk '{print $1}') ))
15fi
16# remove initrd from size since its not currently installed
17if [ -e /run/media/$1/initrd ]; then
18 boot_size=$(( boot_size - $( du -ms /run/media/$1/initrd | awk '{print $1}') ))
19fi
20# add 10M to provide some extra space for users and account
21# for rounding in the above subtractions
22boot_size=$(( boot_size + 10 ))
12 23
13# 5% for the swap 24# 5% for the swap
14swap_ratio=5 25swap_ratio=5