[systemd-devel] [PATCH] machine-id: add --root option to operate on an alternate fs tree

2014-03-13 Thread Greg KH
This makes it possible to initialize the /etc/machine-id file on an arbitrary filesystem hierarchy. This helps systems that wish to run this at image creation time in a subdirectory, or from initramfs before pivot-root is called. diff --git a/man/systemd-machine-id-setup.xml b/man/systemd-machine

[systemd-devel] [PATCH 2/3] tmpfiles: Add --root option to operate on an alternate fs tree.

2014-03-13 Thread Michael Marineau
This makes it possible to initialize or cleanup an arbitrary filesystem hierarchy in the same way that it would be during system boot. --- src/tmpfiles/tmpfiles.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles

[systemd-devel] [PATCH 3/3] tmpfiles: Add --root to the man page.

2014-03-13 Thread Michael Marineau
--- man/systemd-tmpfiles.xml | 8 1 file changed, 8 insertions(+) diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml index 0b62640..193acb7 100644 --- a/man/systemd-tmpfiles.xml +++ b/man/systemd-tmpfiles.xml @@ -152,6 +152,14 @@ prefix. Thi

[systemd-devel] [PATCH 1/3] shared: add root argument to search_and_fopen

2014-03-13 Thread Michael Marineau
This adds the same root argument to search_and_fopen that conf_files_list already has. Tools that use those two functions as a pair can now be easily modified to load configuration files from an alternate root filesystem tree. --- src/binfmt/binfmt.c | 2 +- src/modules-load/modules-l

Re: [systemd-devel] [PATCH] Fix permissions on new journal files

2014-03-13 Thread Greg KH
On Fri, Mar 14, 2014 at 03:28:27AM +0100, Zbigniew Jędrzejewski-Szmek wrote: > On Fri, Mar 14, 2014 at 12:07:35AM +, Greg KH wrote: > > When starting up journald on a new system, set the proper permissions on > > the system.journal file, not only on the journal directory. > > > > diff --git a/

Re: [systemd-devel] [PATCH] Fix permissions on new journal files

2014-03-13 Thread Dave Reisner
On Fri, Mar 14, 2014 at 03:28:27AM +0100, Zbigniew Jędrzejewski-Szmek wrote: > On Fri, Mar 14, 2014 at 12:07:35AM +, Greg KH wrote: > > When starting up journald on a new system, set the proper permissions on > > the system.journal file, not only on the journal directory. > > > > diff --git a/

Re: [systemd-devel] Help regarding service dependency

2014-03-13 Thread Andrey Borzenkov
В Thu, 13 Mar 2014 21:25:34 -0400 (EDT) Amit Saha пишет: > Hello, > > We have service1 which starts in default.target, and we want it to start > After service2 > (systemd-readahead-done) which starts after the default.target is reached. > So, I think what would happen in this case is the Afte

Re: [systemd-devel] [PATCH] Fix permissions on new journal files

2014-03-13 Thread Zbigniew Jędrzejewski-Szmek
On Fri, Mar 14, 2014 at 12:07:35AM +, Greg KH wrote: > When starting up journald on a new system, set the proper permissions on > the system.journal file, not only on the journal directory. > > diff --git a/tmpfiles.d/systemd.conf b/tmpfiles.d/systemd.conf > index 7c6d6b9099b9..1aeb5e40f1ee 10

Re: [systemd-devel] Passing variables from udev to unit

2014-03-13 Thread Andrey Borzenkov
В Fri, 14 Mar 2014 08:53:45 +1000 Peter Hutterer пишет: > Hey, > > I have a service file wacom-inputattach@.service that is started from a udev > rule: > > SUBSYSTEM=="tty|pnp", KERNEL=="ttyS[0-9]*", ATTRS{id}=="WACf*", > TAG+="systemd", ENV{SYSTEMD_WANTS}+="wacom-inputattach@%k.service" >

Re: [systemd-devel] [PATCH] nspawn: allow -EEXIST on mkdir_safe /home/${uid}

2014-03-13 Thread Lennart Poettering
On Thu, 13.03.14 15:37, Brandon Philips (bran...@ifup.co) wrote: > Also, in commit aca07 my Debian Wheezy container broke because > /usr/bin/getent doesn't understand initgroups. Is there a way to > workaround this? Oh yikes. I assumed getent with all its verb had been around since a long time.

Re: [systemd-devel] [PATCH] nspawn: allow -EEXIST on mkdir_safe /home/${uid}

2014-03-13 Thread Lennart Poettering
On Thu, 13.03.14 15:31, Brandon Philips (bran...@ifup.co) wrote: > With systemd 211 nspawn attempts to create the home directory for the > given uid. However, if the home directory already exists then it will > fail. Don't error out on -EEXIST. Applied. Thanks! Lennart -- Lennart Poettering, R

[systemd-devel] Help regarding service dependency

2014-03-13 Thread Amit Saha
Hello, We have service1 which starts in default.target, and we want it to start After service2 (systemd-readahead-done) which starts after the default.target is reached. So, I think what would happen in this case is the After=service2 for service1 is ignored and it is started before service2 s

[systemd-devel] [PATCH] Fix permissions on new journal files

2014-03-13 Thread Greg KH
When starting up journald on a new system, set the proper permissions on the system.journal file, not only on the journal directory. diff --git a/tmpfiles.d/systemd.conf b/tmpfiles.d/systemd.conf index 7c6d6b9099b9..1aeb5e40f1ee 100644 --- a/tmpfiles.d/systemd.conf +++ b/tmpfiles.d/systemd.conf @@

[systemd-devel] [RFC][PATCH v3 2/2] journald: add support for wall forwarding

2014-03-13 Thread Sebastian Thorarensen
This will let journald forward logs as messages sent to all logged in users (like wall). Two options are added: * ForwardToWall (default yes) * MaxLevelWall (default emerg) 'ForwardToWall' is overridable by kernel command line option 'systemd.journald.forward_to_wall'. This is used to emulate t

[systemd-devel] [RFC][PATCH v3 1/2] utmp-wtmp: allow overriding username on wall

2014-03-13 Thread Sebastian Thorarensen
utmp_wall() now takes an optional argument 'username_override' which allows the caller to override the username shown on wall messages. journald will use this to inform users that its wall messages comes from 'systemd-journald'. --- src/shared/utmp-wtmp.c | 12 ++

[systemd-devel] [RFC][PATCH v3 0/2] journald: add support for wall forwarding

2014-03-13 Thread Sebastian Thorarensen
These patches add two new options for journald.conf: * ForwardToWall (default yes) * MaxLevelWall (default emerg) When ForwardToWall is yes, journald forwards all log messages equal or below MaxLevelWall to utmp_wall(). This can be used to send emergency messages to logged-in users. A forwarded

[systemd-devel] Passing variables from udev to unit

2014-03-13 Thread Peter Hutterer
Hey, I have a service file wacom-inputattach@.service that is started from a udev rule: SUBSYSTEM=="tty|pnp", KERNEL=="ttyS[0-9]*", ATTRS{id}=="WACf*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="wacom-inputattach@%k.service" and the service file then runs: ExecStart=/usr/bin/inputattach -w8001

Re: [systemd-devel] [PATCH] nspawn: allow -EEXIST on mkdir_safe /home/${uid}

2014-03-13 Thread Brandon Philips
Also, in commit aca07 my Debian Wheezy container broke because /usr/bin/getent doesn't understand initgroups. Is there a way to workaround this? On Thu, Mar 13, 2014 at 3:31 PM, Brandon Philips wrote: > With systemd 211 nspawn attempts to create the home directory for the > given uid. However, if

[systemd-devel] [PATCH] nspawn: allow -EEXIST on mkdir_safe /home/${uid}

2014-03-13 Thread Brandon Philips
With systemd 211 nspawn attempts to create the home directory for the given uid. However, if the home directory already exists then it will fail. Don't error out on -EEXIST. 0001-nspawn-allow-EEXIST-on-mkdir_safe-home-uid.patch Description: Binary data

Re: [systemd-devel] Forwarding logs to another systems journal

2014-03-13 Thread David Timothy Strauss
On Thu, Mar 13, 2014 at 12:54 PM, Anand Neeli wrote: > I have multiple systems, How do i forward logs from one system running > systemd-journald to another remote systems journal service, so that all the > logs are stored on a centralized machine. > > Have went through systemd-journal-gatewayd, bu

Re: [systemd-devel] Forwarding logs to another systems journal

2014-03-13 Thread Reindl Harald
Am 13.03.2014 20:54, schrieb Anand Neeli: > I have multiple systems, How do i forward logs from one system running > systemd-journald to another remote systems > journal service, so that all the logs are stored on a centralized machine. that's not the job of journald and falls into the use-case

[systemd-devel] Forwarding logs to another systems journal

2014-03-13 Thread Anand Neeli
Hello, I have multiple systems, How do i forward logs from one system running systemd-journald to another remote systems journal service, so that all the logs are stored on a centralized machine. Have went through systemd-journal-gatewayd, but this forwards logs on http/https, doesnt send it to a

Re: [systemd-devel] Memory leak in in sd-bus.c:sd_bus_open_user?

2014-03-13 Thread Lennart Poettering
On Thu, 13.03.14 20:56, Vetoshkin Nikita (nikita.vetosh...@gmail.com) wrote: > Hi! > > Was lurking trough sources and I think I found memory leak > in sd_bus_open_user if both DBUS_SESSION_BUS_ADDRESS and XDG_RUNTIME_DIR > env variables are not available and ENABLE_KDBUS is not defined. We simply

Re: [systemd-devel] How to compute a value for a service argument or environment value?

2014-03-13 Thread Cristian Rodríguez
El 13/03/14 15:37, Alan Stern escribió: sult? All I have been able to think of is to have ExecStart= run a shell script that computes the necessary values and then execs the actual server program. Is there a better way? That's a workable hack, however the correct solution is to have the daem

[systemd-devel] Documentation error for systemctl kill?

2014-03-13 Thread Alan Stern
In systemd 208 (the version currently distributed in Fedora 20), the man page for the systemctl(1) kill command says: Send a signal to one or more processes of the unit. Use --kill-who= to select which process to kill. Use --kill-mode= to select the kill mode and --signal=

[systemd-devel] How to compute a value for a service argument or environment value?

2014-03-13 Thread Alan Stern
This question has probably been asked many times before, but I didn't see it mentioned anywhere on the systemd web site. I want to create a unit file for a service where the server program requires an argument or environment value that has to be computed at run time; it isn't known in advance. F

[systemd-devel] [PATCH] add keyhandler support to cryptsetup

2014-03-13 Thread Benjamin SANS
Hi list, Following this thread: http://lists.freedesktop.org/archives/systemd-devel/2012-July/005835.html, I understand you don't want to support a "keyscript" option as implemented in that patch. So I wrote these few lines to support a new "keyhandler" option (so that you don't necessary need

[systemd-devel] Memory leak in in sd-bus.c:sd_bus_open_user?

2014-03-13 Thread Vetoshkin Nikita
Hi! Was lurking trough sources and I think I found memory leak in sd_bus_open_user if both DBUS_SESSION_BUS_ADDRESS and XDG_RUNTIME_DIR env variables are not available and ENABLE_KDBUS is not defined. We simply return -ECONNREFUSED without falling to fail label. Sorry if I read it all wrong. ---

[systemd-devel] [PATCH 0/4] Add DHCPv4 client restart and Init-Reboot support

2014-03-13 Thread Patrik Flykt
Hi, Patches 01/04 and 02/04 are minimal fixes that sat in between the current head and the changes, both of them are pretty trivial. Patch 03/04 makes the DHCPv4 client implementation automatically restart DHCP address negotiations if the previous lease expires. This was discussed off-li

[systemd-devel] [PATCH 2/4] libsystemd-network: Add hangcheck timer for DHCP client test

2014-03-13 Thread Patrik Flykt
--- src/libsystemd-network/test-dhcp-client.c | 16 1 file changed, 16 insertions(+) diff --git a/src/libsystemd-network/test-dhcp-client.c b/src/libsystemd-network/test-dhcp-client.c index cfc75ae..9509eec 100644 --- a/src/libsystemd-network/test-dhcp-client.c +++ b/src/libsyst

[systemd-devel] [PATCH 1/4] libsystemd-network: Export checksum function to test case

2014-03-13 Thread Patrik Flykt
Remove identical checksum function implementation from the test case code. --- src/libsystemd-network/dhcp-internal.h| 2 ++ src/libsystemd-network/dhcp-packet.c | 10 +- src/libsystemd-network/test-dhcp-client.c | 30 +++--- 3 files changed, 10 insertions

[systemd-devel] [PATCH 4/4] libsystemd-network: Add Init-Reboot support

2014-03-13 Thread Patrik Flykt
Init-Reboot is tried if a client IP address has been given when the DHCP client is started. In Init-Reboot, start by sending a broadcasted DHCP Request including the supplied client IP address but without the server identifier. After sending the request, enter Reboot state. If a DHCP Ack is receiv

[systemd-devel] [PATCH 3/4] libsystemd-network: Restart DHCP acquisition if the lease expires

2014-03-13 Thread Patrik Flykt
This causes the DHCP client struct initialization and DHCP client starting to be factored out into functions of their own. --- src/libsystemd-network/sd-dhcp-client.c | 74 +++-- 1 file changed, 52 insertions(+), 22 deletions(-) diff --git a/src/libsystemd-network/sd-d

Re: [systemd-devel] [PATCH] service: don't create extra cgroup for control process when reloading SysV service

2014-03-13 Thread Lukáš Nykrýn
St 12. březen 2014, 18:34:11 CET, Uoti Urpala napsal: On Wed, 2014-03-12 at 16:51 +0100, Lennart Poettering wrote: On Mon, 10.03.14 15:25, Lukas Nykryn (lnyk...@redhat.com) wrote: Unfortunately common practice in initscripts is to have reload as an alias for restart (https://fedoraproject.org/