Systemd is such a lovely tool. It cannot run hostnamectl/localectl/timedatectl without pid 1.

This commit is contained in:
oddlama 2020-10-06 19:25:10 +02:00
parent ed87a77c13
commit 6f427dc92e
No known key found for this signature in database
GPG Key ID: 88EA325D51D53908
1 changed files with 22 additions and 21 deletions

View File

@ -64,27 +64,28 @@ configure_base_system() {
# Set hostname
einfo "Selecting hostname"
hostnamectl set-hostname "$HOSTNAME" \
|| die "Could not set hostname"
echo "$HOSTNAME" > /etc/hostname
#hostnamectl set-hostname "$HOSTNAME" \
# || die "Could not set hostname"
# Set timezone
einfo "Selecting timezone"
timedatectl set-timezone "$TIMEZONE" \
|| die "Could not set timezone"
## Set timezone
#einfo "Selecting timezone"
#timedatectl set-timezone "$TIMEZONE" \
# || die "Could not set timezone"
einfo "Setting time to UTC"
timedatectl set-local-rtc 0 \
|| die "Could not set local rtc to UTC"
#einfo "Setting time to UTC"
#timedatectl set-local-rtc 0 \
# || die "Could not set local rtc to UTC"
# Set keymap
einfo "Selecting keymap"
localectl set-keymap "$KEYMAP" \
|| die "Could not set keymap"
## Set keymap
#einfo "Selecting keymap"
#localectl set-keymap "$KEYMAP" \
# || die "Could not set keymap"
# Set locale
einfo "Selecting locale"
localectl set-locale LANG="$LOCALE" \
|| die "Could not set locale"
## Set locale
#einfo "Selecting locale"
#localectl set-locale LANG="$LOCALE" \
# || die "Could not set locale"
else
# Set hostname
einfo "Selecting hostname"
@ -296,10 +297,10 @@ install_ansible() {
main_install_gentoo_in_chroot() {
[[ $# == 0 ]] || die "Too many arguments"
# Lock the root password, making the account unaccessible for the
# period of installation, except by chrooting
einfo "Locking root account"
passwd -l root \
# Remove the root password, making the account accessible for automated
# tasks during the period of installation.
einfo "Clearing root password"
passwd -d root \
|| die "Could not change root password"
if [[ $IS_EFI == "true" ]]; then