@@ -80,6 +80,20 @@ function finalize_disk_repart {
8080 " $( get_partition_node_name " ${disk} " " ${kiwi_RootPart} " ) "
8181}
8282
83+ function get_target_rootpart_size {
84+ declare kiwi_oemrootMB=${kiwi_oemrootMB}
85+ local oemrootMB
86+ oemrootMB=$( getarg rd.kiwi.install.install.systemsize=)
87+ if [ -n " ${oemrootMB} " ]; then
88+ if [ " ${oemrootMB} " = " all" ]; then
89+ kiwi_oemrootMB=" "
90+ else
91+ kiwi_oemrootMB=" ${oemrootMB} "
92+ fi
93+ fi
94+ echo " ${kiwi_oemrootMB} "
95+ }
96+
8397function repart_standard_disk {
8498 # """
8599 # repartition disk with read/write root filesystem
@@ -89,8 +103,9 @@ function repart_standard_disk {
89103 # pX+1: ( root ) [+luks +raid]
90104 # -------------------------------------
91105 # """
92- declare kiwi_oemrootMB=${kiwi_oemrootMB}
93106 declare kiwi_RootPart=${kiwi_RootPart}
107+ local kiwi_oemrootMB
108+ kiwi_oemrootMB=$( get_target_rootpart_size)
94109 if [ -z " ${kiwi_oemrootMB} " ]; then
95110 local disk_have_root_system_mbytes=$((
96111 disk_root_mbytes + disk_free_mbytes
@@ -150,8 +165,9 @@ function repart_lvm_disk {
150165 # pX+1: ( LVM ) [+luks +raid]
151166 # -------------------------------------
152167 # """
153- declare kiwi_oemrootMB=${kiwi_oemrootMB}
154168 declare kiwi_RootPart=${kiwi_RootPart}
169+ local kiwi_oemrootMB
170+ kiwi_oemrootMB=$( get_target_rootpart_size)
155171 if [ -z " ${kiwi_oemrootMB} " ]; then
156172 local disk_have_root_system_mbytes=$((
157173 disk_root_mbytes + disk_free_mbytes
@@ -198,10 +214,11 @@ function repart_lvm_disk {
198214}
199215
200216function check_repart_possible {
201- declare kiwi_oemrootMB=${kiwi_oemrootMB}
202217 local disk_root_mbytes=$1
203218 local disk_free_mbytes=$2
204219 local min_additional_mbytes=$3
220+ local kiwi_oemrootMB
221+ kiwi_oemrootMB=$( get_target_rootpart_size)
205222 if [ -n " ${kiwi_oemrootMB} " ]; then
206223 if [ " ${kiwi_oemrootMB} " -lt " ${disk_root_mbytes} " ]; then
207224 # specified oem-systemsize is smaller than root partition
0 commit comments