diff options
| author | Shulhan <ms@kilabit.info> | 2022-07-01 00:08:42 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-07-25 19:29:22 +0700 |
| commit | 96a26cb01a019ca13b8054448373ac6700792cd4 (patch) | |
| tree | 1ff3cdf5cd67b42dd4aa1138365d2ff311a42612 | |
| parent | 632798d6b2a512d95670840b1f12e13b407829ec (diff) | |
| download | compute-archlinux-image-builder-96a26cb01a019ca13b8054448373ac6700792cd4.tar.xz | |
all: use drop-ins replacement to configure journald
Like timesyncd, overwrite the journald configuration by adding
drop-ins configuration under /etc/systemd/journald.conf.d/.
| -rwxr-xr-x | build-arch-gce | 9 | ||||
| -rw-r--r-- | sys/etc/systemd/journald.conf.d/00-google.conf | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/build-arch-gce b/build-arch-gce index f9abc19..81b938a 100755 --- a/build-arch-gce +++ b/build-arch-gce @@ -106,6 +106,10 @@ echo '-- Configuring locale.' cp ./sys/etc/locale.gen $mount_dir/etc/locale.gen cp ./sys/etc/locale.conf $mount_dir/etc/locale.conf +echo '-- Configuring journald.' +mkdir -p $mount_dir/etc/systemd/journald.conf.d +cp ./sys/etc/systemd/journald.conf.d/00-google.conf $mount_dir/etc/systemd/journald.conf.d/ + arch-chroot -- "$mount_dir" /bin/bash -s <<-'EOS' set -eEuo pipefail trap 'echo "Error: \`$BASH_COMMAND\` exited with status $?"' ERR @@ -117,11 +121,6 @@ arch-chroot -- "$mount_dir" /bin/bash -s <<-'EOS' echo '-- Running locale-gen.' locale-gen - echo '-- Configuring journald.' - gawk -i assert -i inplace ' - /^#ForwardToConsole=/ { $0 = "ForwardToConsole=yes"; ++f } - { print } END { assert(f == 1, "f == 1") }' /etc/systemd/journald.conf - echo '-- Configuring ssh.' gawk -i assert -i inplace ' /^#PasswordAuthentication / { $0 = "PasswordAuthentication no"; ++f1 } diff --git a/sys/etc/systemd/journald.conf.d/00-google.conf b/sys/etc/systemd/journald.conf.d/00-google.conf new file mode 100644 index 0000000..620db84 --- /dev/null +++ b/sys/etc/systemd/journald.conf.d/00-google.conf @@ -0,0 +1,2 @@ +[Journal] +ForwardToConsole=yes |
