Skip to content

Commit

Permalink
hooks: restructure a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Meulengracht committed Feb 20, 2025
1 parent 6af3cc9 commit e38e5ff
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
9 changes: 0 additions & 9 deletions hooks/009-locale-archive.chroot
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,3 @@ for encoding in "${!found_encodings[@]}"; do
done

apt-get purge -y locales

# restore configuration so the default locale can be found
printf 'LANG=C.UTF-8\n' > /etc/writable/locale.conf
ln -s ../writable/locale.conf /etc/default/locale
ln -s writable/locale.conf /etc/locale.conf

mv /etc/vconsole.conf /etc/writable/vconsole.conf
ln -s ../writable/vconsole.conf /etc/default/keyboard
ln -s writable/vconsole.conf /etc/vconsole.conf
15 changes: 15 additions & 0 deletions hooks/010-locale-vconsole-symlinks.chroot
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -eu

# setup default console configuration, make them symlinks
# into writable so they can be changed
printf 'LANG=C.UTF-8\n' > /etc/writable/locale.conf
ln -s ../writable/locale.conf /etc/default/locale
ln -s writable/locale.conf /etc/locale.conf

# setup default vconsole/keyboard configuration, make it a
# symlink as well so it can change
mv /etc/vconsole.conf /etc/writable/vconsole.conf
ln -s ../writable/vconsole.conf /etc/default/keyboard
ln -s writable/vconsole.conf /etc/vconsole.conf

0 comments on commit e38e5ff

Please sign in to comment.