1
0
mirror of https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git synced 2025-12-14 19:02:45 +03:00

Don't try expand a non-existing device

In system containers, like incus, the root device may not exist. Avoid
return error in this case.
This commit is contained in:
Natanael Copa 2024-07-25 20:30:32 +02:00
parent 9d1d448a16
commit 874335d788

View File

@ -73,7 +73,9 @@ init__expand_root() {
$MOCK partx -u "$volume"
fi
# resize filesystem
$MOCK resize2fs "$dev"
if [ -e "$dev" ] || [ -n "$MOCK" ]; then
$MOCK resize2fs "$dev"
fi
}
init__install_hotplugs() {