fix(os): Add plain text ZFS key file into initramfs, it lives inside an encrypted pool anyway (#1)
This commit is contained in:
parent
f4c4504e1d
commit
75757ee108
4
setup.sh
4
setup.sh
@ -251,8 +251,10 @@ function set_locale () {
|
||||
}
|
||||
|
||||
function add_zfs_hook_to_initramfs () {
|
||||
# Add zfs hook, remove fsck hook from initramfs
|
||||
# Add zfs hook, remove fsck hook from initramfs. Also add plain text key
|
||||
# file into initramfs since it's living inside an encrypted pool anyway.
|
||||
sed -ri \
|
||||
-e 's'$'\x1''^(FILES=)[^\r\n\f]*'$'\x1''\1(/etc/zfs/'"${zpool_name}"'.key)'$'\x1''g' \
|
||||
-e 's'$'\x1''(HOOKS=)(.*?[\(| ])(filesystems)([\)| ][^\r\n\f]*)'$'\x1''\1\2zfs \3\4'$'\x1''g' \
|
||||
-e 's'$'\x1''((\()(fsck)(\)))'$'\x1''\2\4'$'\x1''g' \
|
||||
-e 's'$'\x1''(([[:space:]]+)(fsck)|(fsck)([[:space:]]+))'$'\x1'''$'\x1''g' \
|
||||
|
Loading…
x
Reference in New Issue
Block a user