systemd's setup deviates. #1
This commit is contained in:
parent
c61515e4e5
commit
1c476cef17
|
@ -101,6 +101,10 @@ STAGE3_BASENAME="stage3-$GENTOO_ARCH-systemd"
|
|||
#STAGE3_BASENAME="stage3-$GENTOO_ARCH-hardened+nomultilib"
|
||||
#STAGE3_BASENAME="stage3-$GENTOO_ARCH-hardened-selinux+nomultilib"
|
||||
|
||||
# Set to true if the tarball is based on systemd. In this case
|
||||
# we need to use slightly different utilities to setup the base system.
|
||||
SYSTEMD=true
|
||||
|
||||
|
||||
################################################
|
||||
# Additional (optional) configuration
|
||||
|
|
|
@ -51,6 +51,41 @@ install_stage3() {
|
|||
}
|
||||
|
||||
configure_base_system() {
|
||||
einfo "Generating locales"
|
||||
echo "$LOCALES" > /etc/locale.gen \
|
||||
|| die "Could not write /etc/locale.gen"
|
||||
locale-gen \
|
||||
|| die "Could not generate locales"
|
||||
|
||||
if [[ $SYSTEMD == "true" ]]; then
|
||||
einfo "Setting machine-id"
|
||||
systemd-machine-id-setup \
|
||||
|| die "Could not setup systemd machine id"
|
||||
|
||||
# Set hostname
|
||||
einfo "Selecting hostname"
|
||||
hostnamectl set-hostname "$HOSTNAME" \
|
||||
|| die "Could not set hostname"
|
||||
|
||||
# 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"
|
||||
|
||||
# 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"
|
||||
else
|
||||
# Set hostname
|
||||
einfo "Selecting hostname"
|
||||
sed -i "/hostname=/c\\hostname=\"$HOSTNAME\"" /etc/conf.d/hostname \
|
||||
|
@ -69,11 +104,8 @@ configure_base_system() {
|
|||
|
||||
# Set locale
|
||||
einfo "Selecting locale"
|
||||
echo "$LOCALES" > /etc/locale.gen \
|
||||
|| die "Could not write /etc/locale.gen"
|
||||
locale-gen \
|
||||
|| die "Could not generate locales"
|
||||
try eselect locale set "$LOCALE"
|
||||
fi
|
||||
|
||||
# Update environment
|
||||
env_update
|
||||
|
|
Loading…
Reference in New Issue