Re: [systemd-devel] [PATCH 2/2] tmpfiles: support globbing for w option

2012-09-03 Thread Dave Reisner
On Mon, Sep 03, 2012 at 05:13:18PM -0400, Dave Reisner wrote: > Break out the write logic into a separate function and simply use it as > a callback to glob_item. > > This allows users to consolidate writes to sysfs with multiple similar > pathnames, e.g. > > w /sys/class/block/sd[a-z]/queue/re

Re: [systemd-devel] Handling lid close in logind?

2012-09-03 Thread Matthias Clasen
On Mon, Sep 3, 2012 at 5:17 AM, Richard Hughes wrote: > I don't think the desktop guys want any kind of authentication when > the lid is closed. How feasible would it be to do the suspend when the > inhibit is removed? I guess then it puts logind into a "active but > will suspend asap" state whic

[systemd-devel] [PATCH] shared: logs-show: fflush after each output type

2012-09-03 Thread Brandon Philips
journalctl -f redirected to a pipe or file wasn't working for some output formats but was working for json. It turns out only json was doing an fflush. Make all output formats flush. --- src/shared/logs-show.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shared/l

[systemd-devel] [PATCH 1/2] logind: Ensure the user, seat and session files are updated when the session is closing.

2012-09-03 Thread Colin Guthrie
--- src/login/logind-session.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/login/logind-session.c b/src/login/logind-session.c index 16d4955..6733020 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -702,9 +702,11 @@ int session_stop(Session *s) {

[systemd-devel] [PATCH 2/2] logind: Avoid unnecesary rewrite of user file when switching sessions of the same user.

2012-09-03 Thread Colin Guthrie
--- src/login/logind-seat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index 0457121..9c7cc1f 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -261,7 +261,8 @@ int seat_set_active(Seat *s, Session *se

Re: [systemd-devel] (no subject)

2012-09-03 Thread Colin Guthrie
'Twas brillig, and Colin Guthrie at 03/09/12 23:46 did gyre and gimble: > Hi, > > OK, so these are the changes I'd propose to fix the issues mentioned > in this thread. I've not tested them so this is more for general > feedback as to whether this approach is generally a good one or not. > > The

[systemd-devel] [PATCH] logind: Add a two new variables to the user session tracking file.

2012-09-03 Thread Colin Guthrie
This counts 'online sessions' in addition to 'active sessions' and 'sessions'. In this context, an 'online session' covers all session in the 'active' state in addition to the explicit 'online' state. This provides an easy machanism to determin all relevant sessions easily (i.e. those that are no

[systemd-devel] [PATCH 3/4] logind: Properly list the ACTIVE_SEATS in the user session tracking file.

2012-09-03 Thread Colin Guthrie
Prevsiouly the first active seat for a user would never be listed and any subsequent seats would be concatenated on without any spaces. --- src/login/logind-user.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/login/logind-user.c b/src/login/logind-user.c index a33978c

[systemd-devel] [PATCH 1/4] pam: Add session class to the debug log.

2012-09-03 Thread Colin Guthrie
--- src/login/pam-module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/login/pam-module.c b/src/login/pam-module.c index 0727164..d7f4128 100644 --- a/src/login/pam-module.c +++ b/src/login/pam-module.c @@ -517,8 +517,8 @@ _public_ PAM_EXTERN int pam_sm_open_session

[systemd-devel] [PATCH 2/4] logind: If all user sessions are in closing state, set the overall status to closing.

2012-09-03 Thread Colin Guthrie
PulseAudio for example will keep a client connection open provided at least one session exists. However, if all sessions are currently in the process of closing, we should flag that as the overall state appropriately to better reflect what is happening. Although this does better reflect the status

[systemd-devel] (no subject)

2012-09-03 Thread Colin Guthrie
Hi, OK, so these are the changes I'd propose to fix the issues mentioned in this thread. I've not tested them so this is more for general feedback as to whether this approach is generally a good one or not. The initial patch is just extra debugging I added to try and work out why my gdm session i

[systemd-devel] [PATCH 4/4] logind: Add a two new variables to the user session tracking file.

2012-09-03 Thread Colin Guthrie
This counts 'online sessions' in addition to 'active sessions' and 'sessions'. In this context, an 'online session' covers all session in the 'active' state in addition to the explicit 'online' state. This provides an easy machanism to determin all relevant sessions easily (i.e. those that are no

[systemd-devel] [PATCH 2/2] tmpfiles: support globbing for w option

2012-09-03 Thread Dave Reisner
Break out the write logic into a separate function and simply use it as a callback to glob_item. This allows users to consolidate writes to sysfs with multiple similar pathnames, e.g. w /sys/class/block/sd[a-z]/queue/read_ahead_kb - - - - 1024 --- As is, and even without this patch, the example

[systemd-devel] [PATCH 1/2] shared/install: ignore ENOENT from unit_file_can_install

2012-09-03 Thread Dave Reisner
When a service file contains an .include directive with a path that doesn't exist, systemctl list-unit-files will simply error out with: Failed to get unit file list: No such file or directory To reproduce: # echo ".include /this/doesnt/exist" >/etc/systemd/system/foo.service # systemctl dae

Re: [systemd-devel] alsa-restore.service seems to be too early

2012-09-03 Thread Вечный Студент
03.09.2012, 22:40, "Colin Guthrie" : > I would lean towards this being a kernel problem or some other rule in > place which invalidates the action (e.g. perhaps it's restored but a > latter call issues an "alsactl init 1"). > > I don't know enough about udev or kernel side of things to really say >

Re: [systemd-devel] alsa-restore.service seems to be too early

2012-09-03 Thread Colin Guthrie
'Twas brillig, and Вечный Студент at 03/09/12 11:34 did gyre and gimble: > 03.09.2012, 13:48, "Colin Guthrie" : >> Then you should probably try and debug this further - e.g. by rmmod'ing >> the module and inserting it and trying to work out why it's not run. You >> can always replace the rule with

Re: [systemd-devel] gdm's PulseAudio not exiting.

2012-09-03 Thread Colin Guthrie
'Twas brillig, and Colin Guthrie at 03/09/12 14:47 did gyre and gimble: > [colin@jimmy systemd-189]$ cat /run/systemd/users/492 > # This is private data. Do not parse. > NAME=gdm > STATE=online > CGROUP=/user/gdm > RUNTIME=/run/user/492 > DISPLAY=1 > SESSIONS=1 > SEATS=seat0 > ACTIVE_SESSIONS= > AC

[systemd-devel] [PATCH] journal: don't try to compress without XZ

2012-09-03 Thread Michael Olbrich
otherwise the header contains the HEADER_INCOMPATIBLE_COMPRESSED flag even though the data is not compressed and reading the journal fails. --- Hi, I'm not sure if this is the correct place to do this, but the default 'compress = yes' must be ignored somewhere otherwise journalctl will not work w

[systemd-devel] [PATCH] libsystemd-core needs libsystemd-id128-internal

2012-09-03 Thread Michael Olbrich
Otherwise compiling may fail with e.g.: ./.libs/libsystemd-core.a(libsystemd_core_la-condition.o): In function `test_host': [...]/systemd-189/src/core/condition.c:205: undefined reference to `sd_id128_from_string' [...]/systemd-189/src/core/condition.c:207: undefined reference to `sd_id128_get_

[systemd-devel] gdm's PulseAudio not exiting.

2012-09-03 Thread Colin Guthrie
Hi, Been poking about trying to work out why gdm's session would not exit. [colin@jimmy systemd-189]$ loginctl session-status 1 1 - gdm (492) Since: Mon, 03 Sep 2012 09:30:34 +0100; 4h 42min ago Leader: 3203 Seat: seat0; vc1 Display: :0 Service:

[systemd-devel] [PATCH] rm_rf_children_dangerous: delete all descendants dangerously

2012-09-03 Thread Tom Gundersen
Call rm_rf_children_dangerous() recursively rather than falling back to rm_rf_children(). This fixes a bug in systemd-tmpfiles. The problem can easily be reproduced by: # mount /dev/sda1 /mnt # mkdir /mnt/test # echo "D /mnt" > /root/test.conf # systemd-tmpfiles --remove /root/test.conf

[systemd-devel] [PATCH] tmpfiles: allow Age to be set to 0d

2012-09-03 Thread Tom Gundersen
Mostly useful for testing purposes. Setting Age to 1s works just as well, but it is surprising that using 0 does not work. We had bug reports/confused users in the past, so it makes sense to change this. --- src/tmpfiles/tmpfiles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [systemd-devel] alsa-restore.service seems to be too early

2012-09-03 Thread Вечный Студент
03.09.2012, 13:48, "Colin Guthrie" : > Then you should probably try and debug this further - e.g. by rmmod'ing > the module and inserting it and trying to work out why it's not run. You > can always replace the rule with one that runs a script instead that > writes debugging info or similar. > > In

Re: [systemd-devel] alsa-restore.service seems to be too early

2012-09-03 Thread Colin Guthrie
[ Please don't drop the list from the CC ] 'Twas brillig, and Вечный Студент at 03/09/12 10:33 did gyre and gimble: > 03.09.2012, 13:05, "Colin Guthrie" : >> Yes this unit is just a part of a two part solution here. See the >> commit where it was introduced for an explanation: >> >> http://git.a

Re: [systemd-devel] Handling lid close in logind?

2012-09-03 Thread Richard Hughes
On 3 September 2012 09:17, Zbigniew Jędrzejewski-Szmek wrote: > Laptop emits a long series of angry beeps. If it starts really overheating, > thermal protection kicks in and the laptop shuts down. Unless you're a macbook, with the white thermoplastic cover. Gloopy mess :) I don't think the deskt

Re: [systemd-devel] alsa-restore.service seems to be too early

2012-09-03 Thread Colin Guthrie
'Twas brillig, and Вечный Студент at 02/09/12 15:48 did gyre and gimble: > In accordance with > > ~ $ cat /etc/modprobe.d/alsa.conf > options snd slots=snd-hda-intel,snd-hdsp,snd-usb-audio > > I have three sound cards. The second one's state (snd-hdsp) isn't restored > after booting up (say, S

Re: [systemd-devel] Handling lid close in logind?

2012-09-03 Thread Zbigniew Jędrzejewski-Szmek
On Mon, Sep 03, 2012 at 09:01:06AM +0100, Richard Hughes wrote: > Hey, > > I know Lennart and Kay are still on walkabout, but I wanted to ask any > opinions on https://bugzilla.gnome.org/show_bug.cgi?id=680689 > > Basically: > > * User inhibits suspend, perhaps by doing an update or burning a CD

Re: [systemd-devel] Handling lid close in logind?

2012-09-03 Thread Mathieu Bridon
On Mon, 2012-09-03 at 09:01 +0100, Richard Hughes wrote: > Hey, > > I know Lennart and Kay are still on walkabout, but I wanted to ask any > opinions on https://bugzilla.gnome.org/show_bug.cgi?id=680689 > > Basically: > > * User inhibits suspend, perhaps by doing an update or burning a CD Once

[systemd-devel] Handling lid close in logind?

2012-09-03 Thread Richard Hughes
Hey, I know Lennart and Kay are still on walkabout, but I wanted to ask any opinions on https://bugzilla.gnome.org/show_bug.cgi?id=680689 Basically: * User inhibits suspend, perhaps by doing an update or burning a CD * User closes laptop * Laptop shows polkit auth box, but the lid is closed and