Skip to content

Commit 1c7639d

Browse files
committed
Drop unused recreate_last_partition
1 parent b46fe77 commit 1c7639d

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

dracut/modules.d/59kiwi-lib/kiwi-partitions-lib.sh

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -227,28 +227,6 @@ function get_partition_name {
227227
echo "${part_name}"
228228
}
229229

230-
function recreate_last_partition {
231-
local image_target=$1
232-
local table_type
233-
table_type=$(get_partition_table_type "${image_target}")
234-
if [ "${table_type}" = "gpt" ];then
235-
relocate_gpt_at_end_of_disk "${image_target}"
236-
fi
237-
sfdisk -d "${image_target}" > /tmp/parttable 2>/dev/null
238-
head -n -1 /tmp/parttable > /tmp/parttable_1
239-
tail -n 1 /tmp/parttable > /tmp/parttable_2
240-
if [ "${table_type}" = "gpt" ];then
241-
sed -ie "s@\(/dev/.* : start=.*\), size=.*, \(type=.*, uuid=.*, name=\".*\"\)@\1, \2@" \
242-
/tmp/parttable_2
243-
else
244-
sed -ie "s@\(/dev/.* : start=.*\), size=.*, \(type=.*\)@\1, \2@" \
245-
/tmp/parttable_2
246-
fi
247-
cat /tmp/parttable_1 /tmp/parttable_2 > /tmp/parttable
248-
set_device_lock "${image_target}" \
249-
sfdisk -f "${image_target}" < /tmp/parttable
250-
}
251-
252230
function get_last_partition_device {
253231
# """
254232
# Get unix node of last partition in table

0 commit comments

Comments
 (0)