Skip to content

Commit 4f09aa7

Browse files
committed
Populate /var if it's empty
1 parent c7134a5 commit 4f09aa7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

usr/lib/tik/modules/post/15-encrypt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ configure_encryption() {
104104
# present. See
105105
# https://github.com/openSUSE/sdbootutil/commit/8d3db8b01f5681c11054c37145aad3e3973a7741
106106
if [ "${tik_encrypt_mode}" == 0 ]; then
107+
# Populate /var if it's empty
108+
if [ ! -d ${encrypt_dir}/mnt/var/lib ]; then
109+
prun-opt /usr/bin/chroot ${encrypt_dir}/mnt systemd-tmpfiles --create --no-pager
110+
fi
107111
# Make path for sdbootutil if it doesn't exist
108112
if [ ! -d ${encrypt_dir}/mnt/var/lib/sdbootutil ]; then
109113
prun /usr/bin/mkdir -p ${encrypt_dir}/mnt/var/lib/sdbootutil

0 commit comments

Comments
 (0)