Added timezone and locale settings

This commit is contained in:
oddlama 2020-01-03 23:48:49 +01:00
parent c4d21647ad
commit 54f7b0f322
No known key found for this signature in database
GPG Key ID: 88EA325D51D53908
4 changed files with 55 additions and 3 deletions

View File

@ -51,3 +51,8 @@ It will do the following steps for you:
* Generate an ssh keypair (type configurable) * Generate an ssh keypair (type configurable)
* Setup a secure sshd (safe ciphers, login only with keypair) * Setup a secure sshd (safe ciphers, login only with keypair)
* Install ansible * Install ansible
# References
* [Sakaki's EFI Install Guide](https://wiki.gentoo.org/wiki/Sakaki%27s_EFI_Install_Guide)
* [Gentoo AMD64 Handbook](https://wiki.gentoo.org/wiki/Handbook:AMD64)

View File

@ -42,3 +42,25 @@ GENTOO_MIRROR="https://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo
# The stage3 tarball to install # The stage3 tarball to install
STAGE3_BASENAME="stage3-amd64-hardened+nomultilib" STAGE3_BASENAME="stage3-amd64-hardened+nomultilib"
#STAGE3_BASENAME="stage3-amd64-hardened-selinux+nomultilib" #STAGE3_BASENAME="stage3-amd64-hardened-selinux+nomultilib"
# The timezone for the new system
TIMEZONE="Europe/Berlin"
# A list of additional locales to generate. You should only
# add locales here if you really need them and want to localize
# your system. Otherwise, leave this list empty, and use C.utf8.
LOCALES=""
# The locale to set for the system. Be careful, this setting differs
# from the LOCALES list entries. (e.g. .UTF-8 vs .utf8)
LOCALE="C.utf8"
# For a german system you could use:
# LOCALES="
# de_DE.UTF-8 UTF-8
# de_DE ISO-8859-1
# de_DE@euro ISO-8859-15
# " # End of LOCALES
# LOCALE="de_DE.utf8"
# The default keymap for the system
KEYMAP="de-latin1-nodeadkeys"
#KEYMAP="us"

View File

@ -277,7 +277,12 @@ gentoo_umount() {
fi fi
} }
interactive_bash() { env_update() {
env-update \
|| die "Error in env-update"
source /etc/profile \
|| die "Could not source /etc/profile"
export PS1="(chroot) \$PS1"
} }
gentoo_chroot() { gentoo_chroot() {

View File

@ -54,17 +54,37 @@ main_install_gentoo_in_chroot() {
einfo "Selecting portage mirrors" einfo "Selecting portage mirrors"
# TODO mirrorselect # TODO mirrorselect
# TODO custom gentoo.conf for /var/db/repos ???
# TODO gpg portage sync # TODO gpg portage sync
# TODO additional binary repos # TODO additional binary repos
# TODO safe dns settings (claranet) # TODO safe dns settings (claranet)
# Mount efi partition
einfo "Mounting efi" einfo "Mounting efi"
mount_by_partuuid "$PARTITION_UUID_EFI" "/boot/efi" mount_by_partuuid "$PARTITION_UUID_EFI" "/boot/efi"
# Sync portage
einfo "Syncing portage tree" einfo "Syncing portage tree"
emerge-webrsync emerge-webrsync\
|| die "Failed to sync portage tree"
einfo "Selecting portage profile '$'" # Set timezone
einfo "Selecting timezone"
echo "$TIMEZONE" > /etc/timezone \
|| die "Could not write /etc/timezone"
emerge -v --config sys-libs/timezone-data
# Set locale
einfo "Selecting locale"
echo "$LOCALES" > /etc/locale.gen \
|| die "Could not write /etc/locale.gen"
locale-gen \
|| die "Could not generate locales"
eselect locale set "$LOCALE" \
|| die "Could not select locale"
# Update environment
env_update
#get kernel #get kernel