[systemd-devel] Question about After/Before of services

2012-08-08 Thread WANG Chao
Hi, list As you see in the subject, this question comes from a lazy guy like me, who doesn't read the systemd source code at all :P The silly question is if A is configured to 'Wants:B' and 'After:B', will A start exactly after B is finished or after B is started? If A is started after B is

Re: [systemd-devel] [PATCH] (resend) build-sys: use more generic regular expression to generate syscall-list.txt correctly.

2012-08-08 Thread Huang Hang
It happened that a recent commit 276c54e7995493e59853a448a2d2c3b499b8a7de changed the line of code I was trying to fix :( Just rework the patch based on the latest master. Thanks On Thu, Aug 9, 2012 at 5:57 AM, Lennart Poettering wrote: > On Thu, 09.08.12 05:10, Huang Hang (seakag...@gmail.com)

[systemd-devel] [PATCH] (resend) build-sys: use more generic regular expression to generate syscall-list.txt correctly

2012-08-08 Thread Huang Hang
Currently MIPS and ARM define syscall numbers for multiple ABI in one . The #define statments for each syscall are formated as: #define __NR_scname (BASE_OFFSET + sc_number) Thus we need a more generic regular expression to match these in awk. Signed-off-by: Huang Hang --- Makefile.am |2

Re: [systemd-devel] [PATCH] (resend) build-sys: use more generic regular expression to generate syscall-list.txt correctly.

2012-08-08 Thread Lennart Poettering
On Thu, 09.08.12 05:10, Huang Hang (seakag...@gmail.com) wrote: > Currently MIPS and ARM define syscall numbers for multiple ABI in one > . The #define statments for each syscall are formated as: > > #define __NR_scname (BASE_OFFSET + sc_number) > > Thus we need a more generic regular expressio

Re: [systemd-devel] [PATCH] timedated: gather timezone from /etc/localtime sym target

2012-08-08 Thread shawn
On Wed, 2012-08-08 at 22:56 +0200, Lennart Poettering wrote: > > static int read_data(void) { > > int r; > > +struct stat st; > > > > free_data(); > > > > +r = lstat("/etc/localtime", &st); > > +if (r < 0) { > > +log_warning("lstat() o

Re: [systemd-devel] [PATCH] service: allow service to inhibit respawn with special return code

2012-08-08 Thread Zbigniew Jędrzejewski-Szmek
On 08/08/2012 11:14 PM, "Jóhann B. Guðmundsson" wrote: > On 08/08/2012 05:30 PM, Lennart Poettering wrote: >> On Tue, 07.08.12 16:01, David Strauss (da...@davidstrauss.net) wrote: >> >>> On Sat, Aug 4, 2012 at 4:46 AM, Lennart Poettering >>> wrote: (But please, don't implement this bit just y

[systemd-devel] [PATCH] timedated: gather timezone from /etc/localtime sym target

2012-08-08 Thread shawnlandden
From: Shawn Landen keep other method for now, consider dropping later. Supporting relative links here could be problematic as timezones in /usr/share/zoneinfo are often themselves symlinks (and symlinks to symlinks), so this implamentation only only support absolute links. --- src/timedate/time

Re: [systemd-devel] [PATCH] service: allow service to inhibit respawn with special return code

2012-08-08 Thread Jóhann B. Guðmundsson
On 08/08/2012 05:30 PM, Lennart Poettering wrote: On Tue, 07.08.12 16:01, David Strauss (da...@davidstrauss.net) wrote: On Sat, Aug 4, 2012 at 4:46 AM, Lennart Poettering wrote: (But please, don't implement this bit just yet, let's wait for somebody actually needing this. Note though, that Up

Re: [systemd-devel] [PATCH] build-sys: use more generic regular expression to generate syscall-list.txt correctly

2012-08-08 Thread Huang Hang
Sorry for the trouble. Just resent using git format-patch and git send-email. Should be OK this time. On Thu, Aug 9, 2012 at 4:47 AM, Lennart Poettering wrote: > On Thu, 09.08.12 04:04, Huang Hang (seakag...@gmail.com) wrote: > >> Currently MIPS and ARM define syscall numbers for multiple ABI in

[systemd-devel] [PATCH] (resend) build-sys: use more generic regular expression to generate syscall-list.txt correctly.

2012-08-08 Thread Huang Hang
Currently MIPS and ARM define syscall numbers for multiple ABI in one . The #define statments for each syscall are formated as: #define __NR_scname (BASE_OFFSET + sc_number) Thus we need a more generic regular expression to match these in awk. Signed-off-by: Huang Hang --- Makefile.am |2

Re: [systemd-devel] [PATCH] timedated: gather timezone from /etc/localtime sym target

2012-08-08 Thread Lennart Poettering
On Wed, 08.08.12 19:29, Shawn Landen (shawnland...@gmail.com) wrote: > keep other method for now, consider dropping later. > > Supporting relative links here could be problematic as timezones in > /usr/share/zoneinfo are often themselves symlinks (and symlinks to > symlinks), so this implamentati

Re: [systemd-devel] [PATCH] build-sys: use more generic regular expression to generate syscall-list.txt correctly

2012-08-08 Thread Lennart Poettering
On Thu, 09.08.12 04:04, Huang Hang (seakag...@gmail.com) wrote: > Currently MIPS and ARM define syscall numbers for multiple ABI in one > . The #define statements for each syscall are formated as: > > #define __NR_sc_name (BASE_OFFSET + sc_number) > > Thus we need a more generic regular express

[systemd-devel] [PATCH] build-sys: use more generic regular expression to generate syscall-list.txt correctly

2012-08-08 Thread Huang Hang
Currently MIPS and ARM define syscall numbers for multiple ABI in one . The #define statements for each syscall are formated as: #define __NR_sc_name (BASE_OFFSET + sc_number) Thus we need a more generic regular expression to match these in awk. Signed-off-by: Huang Hang --- Makefile.am |

[systemd-devel] [PATCH] timedated: gather timezone from /etc/localtime sym target

2012-08-08 Thread Shawn Landen
keep other method for now, consider dropping later. Supporting relative links here could be problematic as timezones in /usr/share/zoneinfo are often themselves symlinks (and symlinks to symlinks), so this implamentation only only support absolute links. v2 - Add ZONEINFO_PATH - Restructured t

Re: [systemd-devel] [PATCH] timedated: gather timezone from /etc/localtime sym target

2012-08-08 Thread Shawn Landen
Not exactly sure how to make this defined from autoconf, but this way, if you #define ZONEINFO_PATH "/etc/" then you can have something very similar to the existing setup for embedded symtems, e.g. /etc/localtime -> /etc/Etc/UTC if the devices want to support more than one timezone, then they have

Re: [systemd-devel] [PATCH] timedated: gather timezone from /etc/localtime sym target

2012-08-08 Thread Tom Gundersen
On Wed, Aug 8, 2012 at 6:51 PM, Lennart Poettering wrote: > So, dunno, I think this is something to think about first, discuss the > pros and cons. I see that just having this as symlink is much simpler, > no doubt, but does it have more benefits? And possibly more > disadvantages? I'd very much

Re: [systemd-devel] [PATCH] service: allow service to inhibit respawn with special return code

2012-08-08 Thread Lennart Poettering
On Tue, 07.08.12 16:01, David Strauss (da...@davidstrauss.net) wrote: > > On Sat, Aug 4, 2012 at 4:46 AM, Lennart Poettering > wrote: > > (But please, don't implement this bit just yet, let's wait for somebody > > actually needing this. Note though, that Upstart actually does have > > functional

Re: [systemd-devel] [PATCH] service: allow service to inhibit respawn with special return code

2012-08-08 Thread Lennart Poettering
On Mon, 06.08.12 17:16, Lukáš Nykrýn (lnyk...@redhat.com) wrote: > Again thanks for review. Here is modified patch. > If you think that it would be better to add signal stuff before > accepting this patch I will not disagree. > +r = set_put(*set, INT_TO_PTR(val)); Hmm, so I was a

Re: [systemd-devel] Set environment variable system-wide

2012-08-08 Thread Daniel Drake
On Wed, Aug 8, 2012 at 10:56 AM, Lennart Poettering wrote: > I don't think anything can be considered "clean" if it involves setting > system-wide env vars. There must be another way to teach Python > optimization system-wide... I have yet to find the other way that you mention. Anyway, I can agr

Re: [systemd-devel] [PATCH] use "Out of memory." consistantly (or with "\n")

2012-08-08 Thread Kay Sievers
On Wed, Aug 8, 2012 at 7:09 PM, Lennart Poettering wrote: > On Wed, 08.08.12 19:06, Kay Sievers (k...@vrfy.org) wrote: > >> >> On Wed, Aug 8, 2012 at 7:02 PM, Lennart Poettering >> wrote: >> > On Mon, 06.08.12 11:43, shawn (shawnland...@gmail.com) wrote: >> > >> >> -case '?': >> >

Re: [systemd-devel] Question regarding ConditionPathExists= and systemctl status

2012-08-08 Thread Lennart Poettering
On Mon, 06.08.12 10:16, Holger Freyther (hol...@freyther.de) wrote: > Hi, > > I have launched "systemd --user", created a bts.service file, added > 'ConditionPathExists=' in the Unit section of my service. Then I > launched my service with 'systemctl --user start ...' and as the > path does not

Re: [systemd-devel] systemd powersaving feature

2012-08-08 Thread Lennart Poettering
On Wed, 08.08.12 18:54, Federico Di Pierro (nierr...@gmail.com) wrote: > Hi! > I'm usign systemd on arch, and i'm really happy with it. > Today upower 0.9.18 has been released, with systemd support (it will > suspend/hibernate using systemctl suspend/hibernate instead of pm-utils). > I was only wo

Re: [systemd-devel] [PATCH] timedated: gather timezone from /etc/localtime sym target

2012-08-08 Thread Kay Sievers
On Wed, Aug 8, 2012 at 6:51 PM, Lennart Poettering wrote: > On Tue, 07.08.12 00:31, Shawn Landen (shawnland...@gmail.com) wrote: > >> keep other method for now, consider dropping later. >> >> Supporting relative links here could be problematic as timezones in >> /usr/share/zoneinfo are often thems

Re: [systemd-devel] [PATCH] use "Out of memory." consistantly (or with "\n")

2012-08-08 Thread Lennart Poettering
On Wed, 08.08.12 19:06, Kay Sievers (k...@vrfy.org) wrote: > > On Wed, Aug 8, 2012 at 7:02 PM, Lennart Poettering > wrote: > > On Mon, 06.08.12 11:43, shawn (shawnland...@gmail.com) wrote: > > > >> -case '?': > >> -return -EINVAL; > >> - > >>

Re: [systemd-devel] Re-exec()ing services for 'systemctl restart' ?

2012-08-08 Thread Lennart Poettering
On Mon, 06.08.12 16:52, Daniel P. Berrange (berra...@redhat.com) wrote: > For libvirt, we (will soon) have a daemon (virtlockd) which maintains > exclusive fcntl() based locks on disk images/devices, on behalf of both > libvirtd and any running QEMU or LXC instances. This is a safety critical > da

Re: [systemd-devel] [PATCH] use "Out of memory." consistantly (or with "\n")

2012-08-08 Thread Kay Sievers
On Wed, Aug 8, 2012 at 7:02 PM, Lennart Poettering wrote: > On Mon, 06.08.12 11:43, shawn (shawnland...@gmail.com) wrote: > >> -case '?': >> -return -EINVAL; >> - >> default: >> -log_error("Unknown option code %c", c)

Re: [systemd-devel] [PATCH] use "Out of memory." consistantly (or with "\n")

2012-08-08 Thread Lennart Poettering
On Mon, 06.08.12 11:43, shawn (shawnland...@gmail.com) wrote: > -case '?': > -return -EINVAL; > - > default: > -log_error("Unknown option code %c", c); > +log_error("Unknown option code '%c'",

Re: [systemd-devel] [systemd-commits] docs/gudev

2012-08-08 Thread Kay Sievers
On Wed, Aug 8, 2012 at 6:56 PM, Zbigniew Jędrzejewski-Szmek wrote: > On 08/08/2012 06:31 PM, Kay Sievers wrote: >> On Wed, Aug 8, 2012 at 6:26 PM, Zbigniew Jędrzejewski-Szmek >> wrote: +# Hack, hack. You silly gtk-doc, you must not add CFLAGS multiple +# times when calling gcc; it sure

[systemd-devel] systemd powersaving feature

2012-08-08 Thread Federico Di Pierro
Hi! I'm usign systemd on arch, and i'm really happy with it. Today upower 0.9.18 has been released, with systemd support (it will suspend/hibernate using systemctl suspend/hibernate instead of pm-utils). I was only wondering: the only thing systemd can't do, right now, is the pm-powersave part of p

Re: [systemd-devel] Set environment variable system-wide

2012-08-08 Thread Lennart Poettering
On Mon, 06.08.12 15:17, Daniel Drake (d...@laptop.org) wrote: > > On Mon, Aug 6, 2012 at 3:09 PM, Kay Sievers wrote: > > systemctl set-environment ... ? > > Maybe thats what I read about. > > In this case I'm looking to set it in early boot though, so that it > affects all spawned processes fr

Re: [systemd-devel] [systemd-commits] docs/gudev

2012-08-08 Thread Zbigniew Jędrzejewski-Szmek
On 08/08/2012 06:31 PM, Kay Sievers wrote: > On Wed, Aug 8, 2012 at 6:26 PM, Zbigniew Jędrzejewski-Szmek > wrote: >>> +# Hack, hack. You silly gtk-doc, you must not add CFLAGS multiple >>> +# times when calling gcc; it surely can not work with options that must >>> +# be listed only once. >>> +#

Re: [systemd-devel] [PATCH] systemd: Fail a service if it exceeds its start limit

2012-08-08 Thread Lennart Poettering
On Mon, 06.08.12 15:30, Eelco Dolstra (eelco.dols...@logicblox.com) wrote: > Previously, if a service configured to restart automatically exceeds > its start limit, it entered the "inactive/dead" state. That seems > wrong to me, since there is nothing to indicate to the user that the > service ha

Re: [systemd-devel] [PATCH] timedated: gather timezone from /etc/localtime sym target

2012-08-08 Thread Lennart Poettering
On Tue, 07.08.12 00:31, Shawn Landen (shawnland...@gmail.com) wrote: > keep other method for now, consider dropping later. > > Supporting relative links here could be problematic as timezones in > /usr/share/zoneinfo are often themselves symlinks (and symlinks to > symlinks), so this implamentati

Re: [systemd-devel] [PATCH] systemctl: cleanup dbus code.

2012-08-08 Thread Lennart Poettering
On Wed, 08.08.12 18:36, Peeters Simon (peeters.si...@gmail.com) wrote: Thanks! Love it! Merged! > > 2012/8/7 Peeters Simon : > > added a new function: bus_method_call_with_reply which does: > > dbus_message_new_method_call() > > dbus_message_append_args() > > dbus_connection_send_with_reply_an

Re: [systemd-devel] [PATCH] systemctl: cleanup dbus code.

2012-08-08 Thread Peeters Simon
2012/8/7 Peeters Simon : > added a new function: bus_method_call_with_reply which does: > dbus_message_new_method_call() > dbus_message_append_args() > dbus_connection_send_with_reply_and_block() > and the needed error handling > --- > src/systemctl/systemctl.c | 1290 > ++

Re: [systemd-devel] [systemd-commits] docs/gudev

2012-08-08 Thread Kay Sievers
On Wed, Aug 8, 2012 at 6:26 PM, Zbigniew Jędrzejewski-Szmek wrote: >> +# Hack, hack. You silly gtk-doc, you must not add CFLAGS multiple >> +# times when calling gcc; it surely can not work with options that must >> +# be listed only once. >> +# Kill CFLAGS here because gtk-doc thinks adding CFLA

Re: [systemd-devel] List all available units

2012-08-08 Thread Lennart Poettering
On Tue, 07.08.12 16:35, Václav Pavlín (vpav...@redhat.com) wrote: > Hi everyone, > > I started to work on these two bugs (if I solve the first one, the > second one will be almost solved as well): > > https://bugzilla.redhat.com/show_bug.cgi?id=748512 > https://bugzilla.redhat.com/show_bug.cgi?i

Re: [systemd-devel] [systemd-commits] docs/gudev

2012-08-08 Thread Zbigniew Jędrzejewski-Szmek
On 08/08/2012 06:19 PM, Kay Sievers wrote: > docs/gudev/Makefile.am |8 > 1 file changed, 8 insertions(+) > > New commits: > commit 29a00c41b8085596c8d5bba00cc758c38069ab48 > Author: Kay Sievers > Date: Wed Aug 8 18:16:50 2012 +0200 > > gudev: docs - work around the broken gt

Re: [systemd-devel] How to handle loop mounts?

2012-08-08 Thread Lennart Poettering
On Wed, 08.08.12 09:52, Eelco Dolstra (eelco.dols...@logicblox.com) wrote: > > Hi, > > On 08/08/12 08:24, Mike Kazantsev wrote: > > >> I have an /etc/fstab that contains the following line: > >> > >> /disk1.img /disk1 ext4 loop 0 2 > >> > >> where /disk1.img is a regular file containing an ex

Re: [systemd-devel] Automatic unmount of inactive automounted dir?

2012-08-08 Thread Lennart Poettering
On Tue, 07.08.12 16:45, Dave Reisner (d...@falconindy.com) wrote: > On Tue, Aug 07, 2012 at 04:23:05PM -0400, Maddy, Noel wrote: > > I have a number of network shares automounted through systemd's automount. > > > > How do I make them automatically unmount after a given period of inactivity? > >

Re: [systemd-devel] why systemd-udevd log to dmesg?

2012-08-08 Thread Lennart Poettering
On Wed, 08.08.12 19:59, Alexey Shabalin (a.shaba...@gmail.com) wrote: > > 2012/8/8 Lennart Poettering : > > On Wed, 08.08.12 12:07, Alexey Shabalin wrote: > > > >> After run dmesg i can see > >> [434765.990649] systemd-udevd[1186]: invalid rule > >> '/etc/udev/rules.d/90-alsa-tools-firmware.rules

Re: [systemd-devel] why systemd-udevd log to dmesg?

2012-08-08 Thread Alexey Shabalin
2012/8/8 Lennart Poettering : > On Wed, 08.08.12 12:07, Alexey Shabalin wrote: > >> After run dmesg i can see >> [434765.990649] systemd-udevd[1186]: invalid rule >> '/etc/udev/rules.d/90-alsa-tools-firmware.rules:11' >> [485891.443571] systemd-udevd[1186]: invalid rule >> '/etc/udev/rules.d/90-als

Re: [systemd-devel] why systemd-udevd log to dmesg?

2012-08-08 Thread Lennart Poettering
On Wed, 08.08.12 12:07, Alexey Shabalin (a.shaba...@gmail.com) wrote: > After run dmesg i can see > [434765.990649] systemd-udevd[1186]: invalid rule > '/etc/udev/rules.d/90-alsa-tools-firmware.rules:11' > [485891.443571] systemd-udevd[1186]: invalid rule > '/etc/udev/rules.d/90-alsa-tools-firmwar

Re: [systemd-devel] List all available units

2012-08-08 Thread Michal Schmidt
On 08/08/2012 10:21 AM, Václav Pavlín wrote: If we decide to change behaviour of systemctl, the approach, I described here, can be used. If you prefer to edit autocomplete script, it can be done with merge of sytemctl output of list-units and list-unit-files and then pipe to uniq. A lot of user

Re: [systemd-devel] How to handle loop mounts?

2012-08-08 Thread Eelco Dolstra
Hi, On 08/08/12 08:24, Mike Kazantsev wrote: >> I have an /etc/fstab that contains the following line: >> >> /disk1.img /disk1 ext4 loop 0 2 >> >> where /disk1.img is a regular file containing an ext4 filesystem. Systemd >> fails >> to mount /disk1 if I run "systemctl start disk1.mount": >> >

Re: [systemd-devel] How to handle loop mounts?

2012-08-08 Thread Mike Kazantsev
On Tue, 07 Aug 2012 18:13:46 -0400 Eelco Dolstra wrote: > Hi, > > I have an /etc/fstab that contains the following line: > > /disk1.img /disk1 ext4 loop 0 2 > > where /disk1.img is a regular file containing an ext4 filesystem. Systemd > fails > to mount /disk1 if I run "systemctl start dis

Re: [systemd-devel] why systemd-udevd log to dmesg?

2012-08-08 Thread Alexey Shabalin
2012/8/8 Kay Sievers : > On Wed, Aug 8, 2012 at 10:07 AM, Alexey Shabalin wrote: >> After run dmesg i can see >> [434765.990649] systemd-udevd[1186]: invalid rule >> '/etc/udev/rules.d/90-alsa-tools-firmware.rules:11' >> [485891.443571] systemd-udevd[1186]: invalid rule >> '/etc/udev/rules.d/90-al

Re: [systemd-devel] why systemd-udevd log to dmesg?

2012-08-08 Thread Kay Sievers
On Wed, Aug 8, 2012 at 10:07 AM, Alexey Shabalin wrote: > After run dmesg i can see > [434765.990649] systemd-udevd[1186]: invalid rule > '/etc/udev/rules.d/90-alsa-tools-firmware.rules:11' > [485891.443571] systemd-udevd[1186]: invalid rule > '/etc/udev/rules.d/90-alsa-tools-firmware.rules:11' >

Re: [systemd-devel] List all available units

2012-08-08 Thread Václav Pavlín
As I noted here: https://bugzilla.redhat.com/show_bug.cgi?id=790768#c12 this patch doesn't solve my issue. But I think it can be solved in either systemctl or autocomlete script. If we decide to change behaviour of systemctl, the approach, I described here, can be used. If you prefer to edit au

[systemd-devel] why systemd-udevd log to dmesg?

2012-08-08 Thread Alexey Shabalin
After run dmesg i can see [434765.990649] systemd-udevd[1186]: invalid rule '/etc/udev/rules.d/90-alsa-tools-firmware.rules:11' [485891.443571] systemd-udevd[1186]: invalid rule '/etc/udev/rules.d/90-alsa-tools-firmware.rules:11' Yes, i know about invalid rule. (need change "BUS" to "SUBSYSTEM") I