diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-06-01 17:51:20 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-06-01 17:51:20 -0400 |
| commit | 6d36de695ce187ed08b6fe8893c5e3cda1577d96 (patch) | |
| tree | 0dc94d5f080322c658dea5825141738fd39f564c /src | |
| parent | b4503a782bfafd5b08c51f00e4c90539cae34009 (diff) | |
add linkJournal property so it can be reverted to disable
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Systemd.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Propellor/Property/Systemd.hs b/src/Propellor/Property/Systemd.hs index 87290fc0..83cc1eaa 100644 --- a/src/Propellor/Property/Systemd.hs +++ b/src/Propellor/Property/Systemd.hs @@ -22,6 +22,7 @@ module Propellor.Property.Systemd ( -- * Container configuration containerCfg, resolvConfed, + linkJournal, privateNetwork, ForwardedPort(..), Proto(..), @@ -136,6 +137,7 @@ container :: MachineName -> (FilePath -> Chroot.Chroot) -> Container container name mkchroot = Container name c h & os system & resolvConfed + & linkJournal where c@(Chroot.Chroot _ system _ _) = mkchroot (containerDir name) h = Host name [] mempty @@ -207,7 +209,6 @@ nspawnService (Container name _ _) cfg = setup <!> teardown , "--quiet" , "--keep-unit" , "--boot" - , "--link-journal=try-guest" , "--directory=/var/lib/container/%i" ] ++ nspawnServiceParams cfg | otherwise = l @@ -302,6 +303,13 @@ containerCfg p = RevertableProperty (mk True) (mk False) resolvConfed :: RevertableProperty resolvConfed = containerCfg "bind=/etc/resolv.conf" +-- | Link the container's journal to the host's if possible. +-- (Only works if the host has persistent journal enabled.) +-- +-- This property is enabled by default. Revert it to disable it. +linkJournal :: RevertableProperty +linkJournal = containerCfg "link-journal=try-guest" + -- | Disconnect networking of the container from the host. privateNetwork :: RevertableProperty privateNetwork = containerCfg "private-network" |
