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