1-get-initial-setup-working #2

Merged
hygienic-books merged 92 commits from 1-get-initial-setup-working into main 2023-03-05 03:02:48 +00:00
Showing only changes of commit 11b43e6fd0 - Show all commits

View File

@ -240,13 +240,22 @@ function set_hostname () {
} }
function set_locale () { function set_locale () {
printf -- '%s\n' 'KEYMAP=de-latin1' > '/mnt/etc/vconsole.conf' printf -- '%s\n' \
'KEYMAP=de-latin1' \
'FONT=Lat2-Terminus16' \
'FONT_MAP=8859-1' \
> '/mnt/etc/vconsole.conf'
sed -ri -e 's'$'\x1''^(#)(en_US.UTF-8[^\r\n\f]*)'$'\x1''\2'$'\x1''g' '/mnt/etc/locale.gen' sed -ri -e 's'$'\x1''^(#)(en_US.UTF-8[^\r\n\f]*)'$'\x1''\2'$'\x1''g' '/mnt/etc/locale.gen'
printf -- '%s\n' 'LANG=en_US.UTF-8' > '/mnt/etc/locale.conf' printf -- '%s\n' 'LANG=en_US.UTF-8' > '/mnt/etc/locale.conf'
} }
function add_zfs_hook_to_initramfs () { function add_zfs_hook_to_initramfs () {
sed -ri -e 's'$'\x1''(HOOKS=)(.*?[\(| ])(filesystems)([\)| ][^\r\n\f]*)'$'\x1''\1\2zfs \3\4'$'\x1''g' '/mnt/etc/mkinitcpio.conf' # Add zfs hook, remove fsck hook from initramfs
sed -ri \
-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' \
'/mnt/etc/mkinitcpio.conf'
} }
function add_zfs_files_to_new_os () { function add_zfs_files_to_new_os () {