From a76b6aff0c600689b6bb4c801f10730816478fc9 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Sun, 4 Nov 2018 17:04:22 +0200 Subject: [PATCH] Tweak journald (fix #1) --- src/main.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main.rs b/src/main.rs index 29793d5..7668460 100644 --- a/src/main.rs +++ b/src/main.rs @@ -32,6 +32,12 @@ BINARIES=() FILES=() HOOKS=(base udev block filesystems keyboard fsck)"; +static JOURNALD_CONF: &'static str = " +[Journal] +Storage=volatile +SystemMaxUse=16M +"; + #[derive(StructOpt)] #[structopt(name = "alma", about = "Arch Linux Mobile Appliance")] enum App { @@ -154,6 +160,12 @@ fn create(disk: PathBuf, extra_packages: Vec) -> Result<(), Error> { .args(&["systemctl", "enable", "NetworkManager"]) .run(ErrorKind::PostInstallation)?; + info!("Configuring journald"); + fs::write( + mount_point.path().join("etc/systemd/journald.conf"), + JOURNALD_CONF, + ).context(ErrorKind::PostInstallation)?; + info!("Generating initramfs"); fs::write(mount_point.path().join("etc/mkinitcpio.conf"), MKINITCPIO) .context(ErrorKind::Initramfs)?;