Re: [systemd-devel] Fwd: best way to handle service restarts after hibernate/suspend?

2013-08-08 Thread 孙冰
I use this: [Unit] Description=Wicd sleep hook Before=sleep.target StopWhenUnneeded=yes [Service] Type=oneshot RemainAfterExit=yes ExecStart=-/usr/share/wicd/daemon/suspend.py ExecStop=-/usr/share/wicd/daemon/autoconnect.py [Install] WantedBy=sleep.target

Re: [systemd-devel] Fwd: best way to handle service restarts after hibernate/suspend?

2013-08-08 Thread Mathijs Kwik
孙冰 subi.the.dream.wal...@gmail.com writes: I use this: [Unit] Description=Wicd sleep hook Before=sleep.target StopWhenUnneeded=yes [Service] Type=oneshot RemainAfterExit=yes ExecStart=-/usr/share/wicd/daemon/suspend.py

[systemd-devel] [PATCH] fstab-generator: respect noauto/nofail when adding sysroot mount

2013-08-08 Thread WANG Chao
Currently we don't respect noauto/nofail root mount options (from rootflags kernel cmdline). We should map these two flags to the corresponding boolean variable noauto and nofail when calling add_mount(). Signed-off-by: WANG Chao chaow...@redhat.com --- Days ago, I sent a patch to add

Re: [systemd-devel] How to delete device units presented in systemd-analyze plot.

2013-08-08 Thread Mantas Mikulėnas
On Thu, Aug 8, 2013 at 4:10 AM, Tony Seo tonys...@gmail.com wrote: I understand what you mean, but I think that I will cut the time for loading device unit if I keep those from appearing on my plot. No, just hiding them will not change anything. What do think that loading time for device

[systemd-devel] Have 'session' keyrings per service

2013-08-08 Thread Stef Walter
Hey guys. I'm trying to figure out details for: http://www.freedesktop.org/wiki/Specifications/login-unlock/ Lennart we talked about this briefly in Brno ... basically the concept is that when systemd does cryptsetup, it'll stash away the password it successfully used in the kernel keyring, and

Re: [systemd-devel] Fwd: best way to handle service restarts after hibernate/suspend?

2013-08-08 Thread killermoehre
Am 08.08.2013 08:12, schrieb 孙冰: I use this: [Unit] Description=Wicd sleep hook Before=sleep.target StopWhenUnneeded=yes [Service] Type=oneshot RemainAfterExit=yes ExecStart=-/usr/share/wicd/daemon/suspend.py

Re: [systemd-devel] Fwd: best way to handle service restarts after hibernate/suspend?

2013-08-08 Thread 孙冰
Hi, Yep. I have the exact same sleep@.service and it works. BTW, sleep.target is pulled in by both suspend.target and hibernate.target. There are some use cases that a hook should be only invoked by suspend.target (or hibernate.target). For instance, I have a hook used with the tuxoniceui:

[systemd-devel] [PATCHv4] tmpfiles, man: Add xattr support to tmpfiles

2013-08-08 Thread Maciej Wereski
This patch makes it possible to set extended attributes on files created by tmpfiles. This can be especially used to set SMACK security labels on volatile files and directories. It is done by adding new line of type t. Such line should contain attributes in Argument field, using following format:

[systemd-devel] [PATCH 2/3] install: don't allow to enable/disable templates

2013-08-08 Thread Michal Sekletar
Calling enable on template units doesn't make sense since it is possible to enable instances directly and users are not forced to use Alias= trickery anymore. --- src/shared/install.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/shared/install.c

[systemd-devel] [PATCH 1/3] systemctl: check for triggering units before calling StopUnit

2013-08-08 Thread Michal Sekletar
Rearranging the code in a way that we always check for triggers before we issue StopUnit D-Bus call will make behavior consistent, thus triggers are always checked. https://bugzilla.redhat.com/show_bug.cgi?id=908690 --- src/systemctl/systemctl.c | 20 ++-- 1 file changed, 10

[systemd-devel] [PATCH 3/3] TODO: don't allow to enable/disable template

2013-08-08 Thread Michal Sekletar
--- TODO | 5 - 1 file changed, 5 deletions(-) diff --git a/TODO b/TODO index ead699c..884acd6 100644 --- a/TODO +++ b/TODO @@ -2,11 +2,6 @@ Bugfixes: * the running hwdb seems not to pick up updated database files without an explicit: udevadm control --reload -* enabling an instance

Re: [systemd-devel] [PATCH 2/3] install: don't allow to enable/disable templates

2013-08-08 Thread Tom Gundersen
Hi Michal, On Thu, Aug 8, 2013 at 3:19 PM, Michal Sekletar msekl...@redhat.com wrote: Calling enable on template units doesn't make sense since it is possible to enable instances directly and users are not forced to use Alias= trickery anymore. It actually might make sense to still call

Re: [systemd-devel] [PATCH 1/3] systemctl: check for triggering units before calling StopUnit

2013-08-08 Thread Václav Pavlín
Michal Sekletar píše v Čt 08. 08. 2013 v 15:19 +0200: Rearranging the code in a way that we always check for triggers before we issue StopUnit D-Bus call will make behavior consistent, thus triggers are always checked. The patch looks good, but I struggled to get through the commit message -

Re: [systemd-devel] [PATCH 1/3] systemctl: check for triggering units before calling StopUnit

2013-08-08 Thread Michal Sekletar
On Thu, Aug 08, 2013 at 03:57:20PM +0200, Václav Pavlín wrote: Michal Sekletar píše v Čt 08. 08. 2013 v 15:19 +0200: Rearranging the code in a way that we always check for triggers before we issue StopUnit D-Bus call will make behavior consistent, thus triggers are always checked. The

Re: [systemd-devel] FUSE mount cannot be started on boot

2013-08-08 Thread Tom Gundersen
On Thu, Aug 8, 2013 at 2:00 PM, Jan Engelhardt jeng...@inai.de wrote: With systemd 195, an /etc/fstab line like /srv/www /home/www fuse.bindfs auto,group=foo,perms=g+rw 0 0 can fail to start if /dev/fuse does not exist yet. This sounds strange. /dev/fuse should be created by udev

Re: [systemd-devel] FUSE mount cannot be started on boot

2013-08-08 Thread Jan Engelhardt
On Thursday 2013-08-08 16:26, Tom Gundersen wrote: On Thu, Aug 8, 2013 at 2:00 PM, Jan Engelhardt jeng...@inai.de wrote: With systemd 195, an /etc/fstab line like /srv/www /home/www fuse.bindfs auto,group=foo,perms=g+rw 0 0 can fail to start if /dev/fuse does not exist yet.

Re: [systemd-devel] [PATCH 2/3] install: don't allow to enable/disable templates

2013-08-08 Thread Thomas Bächler
Am 08.08.2013 15:19, schrieb Michal Sekletar: Calling enable on template units doesn't make sense since it is possible to enable instances directly and users are not forced to use Alias= trickery anymore. Actually, it would make sense to do this instead:

Re: [systemd-devel] FUSE mount cannot be started on boot

2013-08-08 Thread Tom Gundersen
On 8 Aug 2013 17:10, Jan Engelhardt jeng...@inai.de wrote: On Thursday 2013-08-08 16:26, Tom Gundersen wrote: On Thu, Aug 8, 2013 at 2:00 PM, Jan Engelhardt jeng...@inai.de wrote: With systemd 195, an /etc/fstab line like /srv/www /home/www fuse.bindfs auto,group=foo,perms=g+rw

Re: [systemd-devel] [PATCH 2/3] install: don't allow to enable/disable templates

2013-08-08 Thread Tom Gundersen
On 8 Aug 2013 17:57, Thomas Bächler tho...@archlinux.org wrote: Am 08.08.2013 15:19, schrieb Michal Sekletar: Calling enable on template units doesn't make sense since it is possible to enable instances directly and users are not forced to use Alias= trickery anymore. Actually, it would

Re: [systemd-devel] [PATCH 2/3] install: don't allow to enable/disable templates

2013-08-08 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Aug 08, 2013 at 03:19:09PM +0200, Michal Sekletar wrote: Calling enable on template units doesn't make sense since it is possible to enable instances directly and users are not forced to use Alias= trickery anymore. Hm, I'm having trouble with parsing this commit message. Can you

Re: [systemd-devel] fstab-generator: why nofail=true removes Before=$post in .mount

2013-08-08 Thread Tom Gundersen
On Thu, Aug 8, 2013 at 7:35 AM, WANG Chao chaow...@redhat.com wrote: In add_mount(), if nofail=true, Before=$post won't be added to xxx.mount: [..] if (post !noauto !nofail !automount) fprintf(f, Before=%s\n, post); why doing this? The way