Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ else
/opt/ic/bin/guest_disk crypt-format var "$VAR_PARTITION"
/opt/ic/bin/guest_disk crypt-open var "$VAR_PARTITION"
echo "Populating /var filesystem in ${VAR_PARTITION} on first boot."
mkfs.ext4 -F /dev/mapper/var_crypt -d /var
udevadm lock --device=/dev/mapper/var_crypt mkfs.ext4 -F /dev/mapper/var_crypt -d /var
Comment thread
Bownairo marked this conversation as resolved.
# Fix root inode (mkfs fails to set correct security context).
echo "ea_set / security.selinux system_u:object_r:var_t:s0\\000" | debugfs -w /dev/mapper/var_crypt

Expand Down Expand Up @@ -80,4 +80,6 @@ else
# and continue operating.
cryptsetup luksClose old_var_crypt || echo "Failed to close old /var crypto partition"
fi

udevadm trigger --settle --action=change /dev/mapper/var_crypt
fi
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ function make_var_cryptsetup() {
echo "Before=blockdev@dev-mapper-var_crypt.target"
echo "Wants=blockdev@dev-mapper-var_crypt.target"
echo "Before=var.mount"
echo "Before=systemd-fsck@dev-mapper-var_crypt.service"
Comment thread
Bownairo marked this conversation as resolved.
Outdated
echo "Conflicts=umount.target"
echo "Before=cryptsetup.target"
echo "Requires=init-config.service"
Expand Down
Loading