Re: [systemd-devel] systemctl isolate "foo.service" expands to "foo.service.target"

2014-11-27 Thread WANG Chao
On 11/28/14 at 10:13am, Andrei Borzenkov wrote: > В Fri, 28 Nov 2014 15:11:29 +0800 > WANG Chao пишет: > > > Hi, All > > > > I happen to notice systemctl isolate will expands "foo.service" to > > "foo.service.target", which unfortunately brea

[systemd-devel] systemctl isolate "foo.service" expands to "foo.service.target"

2014-11-27 Thread WANG Chao
as completion suffix by default. Does it mean we can only isolate to a target unit from now on? Thanks WANG Chao ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] handling mount failure in initramfs context

2014-05-28 Thread WANG Chao
ab? Thanks WANG Chao > > On 05/26/2014 09:12 AM, WANG Chao wrote: > > Hi, all > > > > In a pure initramfs enviroment, I want to mount a filesystem and I put > > an mount entry in /etc/fstab, so that fstab-generator could generate a > > mount unit and s

[systemd-devel] handling mount failure in initramfs context

2014-05-26 Thread WANG Chao
failure, systemd would stop booting and switch to emergency handling? Thanks in advance! WANG Chao ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] [PATCH] fstab-generator: local-fs.target waits for nofail mounts

2014-04-09 Thread WANG Chao
failure. > > IOW, what if we stop passing "nofail". Then local-fs.target practically > becomes local-fs-all.target. Either services will start just fine (after > a wait for deivces to show up). Or units will start failing and if boot > can't cointinue then somewher

Re: [systemd-devel] [PATCH] fstab-generator: local-fs.target waits for nofail mounts

2014-04-08 Thread WANG Chao
On 04/08/14 at 02:14am, Zbigniew Jędrzejewski-Szmek wrote: > On Mon, Apr 07, 2014 at 03:10:14PM -0400, Vivek Goyal wrote: > > On Mon, Apr 07, 2014 at 10:07:20PM +0400, Andrey Borzenkov wrote: > > > В Mon, 7 Apr 2014 13:40:17 -0400 > > > Vivek Goyal пишет: > > > > > > > > > > > Defining a new tar

[systemd-devel] [PATCH] fstab-generator: local-fs.target waits for nofail mounts

2014-04-03 Thread WANG Chao
In kdump kernel, we need mount certain file system, and we use "nofail" for all mounts specified in /etc/fstab. Because we don't want any mount failure to interrupt the boot process to arrive at dracut-pre-pivot.service (This is the point just before we switch root). And at that dracut-pre-pivot, w

Re: [systemd-devel] journal: How to limit the file size of runtime system.journal

2013-12-15 Thread WANG Chao
On 12/13/13 at 02:18pm, Zbigniew Jędrzejewski-Szmek wrote: > On Fri, Dec 13, 2013 at 01:49:51PM +0800, WANG Chao wrote: > > On 12/13/13 at 06:42am, Zbigniew Jędrzejewski-Szmek wrote: > > > On Fri, Dec 13, 2013 at 01:33:17PM +0800, WANG Chao wrote: > > > > Hi, > &g

Re: [systemd-devel] journal: How to limit the file size of runtime system.journal

2013-12-12 Thread WANG Chao
On 12/13/13 at 06:42am, Zbigniew Jędrzejewski-Szmek wrote: > On Fri, Dec 13, 2013 at 01:33:17PM +0800, WANG Chao wrote: > > Hi, > > > > In kdump environment, memory resource is quite limited. I find that the > > runtime journal file (/run/log/journal/$id/system.journ

[systemd-devel] journal: How to limit the file size of runtime system.journal

2013-12-12 Thread WANG Chao
in size. So here comes my questions: 1. Did miss use of these two config options? Because regarding the journald.conf(5), it seems I was totally doing it right. 2. If I was doing it wrong, how can I limit this file size? -- Thanks WANG Chao ___ systemd

Re: [systemd-devel] [PATCH] inline static endswith()

2013-08-26 Thread WANG Chao
On 08/26/13 at 02:22pm, Zbigniew Jędrzejewski-Szmek wrote: > On Mon, Aug 26, 2013 at 01:15:12PM +0800, WANG Chao wrote: > > > > +static inline char *endswith(const char *s, const char *postfix) { > > > > +size_t sl = strlen(s); > > > &

Re: [systemd-devel] [PATCH] inline static endswith()

2013-08-25 Thread WANG Chao
On 08/23/13 at 05:10pm, Zbigniew Jędrzejewski-Szmek wrote: > On Fri, Aug 23, 2013 at 03:36:51PM +0800, WANG Chao wrote: > > --- > > src/shared/util.c | 21 - > > src/shared/util.h | 9 - > > 2 files changed, 8 insertions(+), 22 deletions(-

[systemd-devel] [PATCH] inline static endswith()

2013-08-23 Thread WANG Chao
--- src/shared/util.c | 21 - src/shared/util.h | 9 - 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/src/shared/util.c b/src/shared/util.c index 1dde8af..3a22000 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -107,27 +107,6 @@ bool streq_pt

Re: [systemd-devel] [PATCH 1/2] Optimize startswith() to macro

2013-08-22 Thread WANG Chao
On 08/22/13 at 06:35pm, Zbigniew Jędrzejewski-Szmek wrote: > On Thu, Aug 22, 2013 at 11:03:11PM +0800, WANG Chao wrote: > > On 08/22/13 at 06:53am, Zbigniew Jędrzejewski-Szmek wrote: > > > On Thu, Aug 22, 2013 at 03:52:29AM +0200, Kay Sievers wrote: > > > > On Wed,

Re: [systemd-devel] [PATCH 1/2] Optimize startswith() to macro

2013-08-22 Thread WANG Chao
On 08/22/13 at 06:53am, Zbigniew Jędrzejewski-Szmek wrote: > On Thu, Aug 22, 2013 at 03:52:29AM +0200, Kay Sievers wrote: > > On Wed, Aug 21, 2013 at 10:16 PM, Kay Sievers wrote: > > > On Wed, Aug 21, 2013 at 8:15 PM, WANG Chao wrote: > > >> Take this optim

Re: [systemd-devel] [PATCH 2/2] Replace hasprefix() with optimized startswith()

2013-08-22 Thread WANG Chao
On 08/22/13 at 11:51am, Kay Sievers wrote: > On Wed, Aug 21, 2013 at 8:15 PM, WANG Chao wrote: > > --- > > TODO | 2 -- > > src/journal/journal-send.c | 2 +- > > src/journal/journald-native.c | 12 ++-- > > sr

[systemd-devel] [PATCH 2/2] Replace hasprefix() with optimized startswith()

2013-08-21 Thread WANG Chao
--- TODO | 2 -- src/journal/journal-send.c | 2 +- src/journal/journald-native.c | 12 ++-- src/libsystemd-bus/bus-match.c | 26 +- src/shared/logs-show.c | 2 +- src/shared/macro.h | 2 -- 6 files changed, 21

[systemd-devel] [PATCH 1/2] Optimize startswith() to macro

2013-08-21 Thread WANG Chao
Take this optimized code from Lennart[1]. Now startswith is a macro using strncmp and should be fast enough. [1]: http://lists.freedesktop.org/archives/systemd-devel/2013-July/011860.html --- src/shared/macro.h | 5 + src/shared/util.c | 17 - 2 files changed, 5 insertions(+

Re: [systemd-devel] [PATCH] Replace hasprefix() with startswith()

2013-08-21 Thread WANG Chao
On 08/21/13 at 06:58pm, Kay Sievers wrote: > On Wed, Aug 21, 2013 at 6:53 PM, WANG Chao wrote: > > On 08/21/13 at 12:05pm, Kay Sievers wrote: > >> On Wed, Aug 21, 2013 at 8:36 AM, WANG Chao wrote: > >> > >> > --- a/TODO > >> > +++ b/TODO > &

Re: [systemd-devel] [PATCH] Replace hasprefix() with startswith()

2013-08-21 Thread WANG Chao
Hi, Kay! On 08/21/13 at 12:05pm, Kay Sievers wrote: > On Wed, Aug 21, 2013 at 8:36 AM, WANG Chao wrote: > > > --- a/TODO > > +++ b/TODO > > @@ -96,8 +96,6 @@ Features: > > > > -* do we really need both hasprefix() and startswith()? > > It nee

[systemd-devel] [PATCH] Replace hasprefix() with startswith()

2013-08-20 Thread WANG Chao
--- TODO | 2 -- src/journal/journal-send.c | 2 +- src/journal/journald-native.c | 12 ++-- src/libsystemd-bus/bus-match.c | 26 +- src/shared/logs-show.c | 2 +- src/shared/macro.h | 2 -- 6 files changed, 21

[systemd-devel] [PATCH] fstab-generator: log_oom() if automount_name is null

2013-08-13 Thread WANG Chao
--- src/fstab-generator/fstab-generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 5a2074e..2a779bb 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-gen

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

2013-08-13 Thread WANG Chao
On 08/09/13 at 09:35am, Vivek Goyal wrote: > On Thu, Aug 08, 2013 at 03:18:11PM +0800, WANG Chao wrote: > > Currently we don't respect noauto/nofail root mount options (from > > rootflags kernel cmdline). We should map these two flags to the > > corresponding boolean

[systemd-devel] [PATCH v2] fstab-generator: read rd.fstab=on/off switch correctly

2013-08-09 Thread WANG Chao
--- src/fstab-generator/fstab-generator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 87b17cd..5a2074e 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab

Re: [systemd-devel] [PATCH] fstab-generator: read rd.fstab=on/off switch correctly

2013-08-09 Thread WANG Chao
On 08/09/13 at 10:07am, Colin Guthrie wrote: > 'Twas brillig, and WANG Chao at 09/08/13 09:13 did gyre and gimble: > > --- > > src/fstab-generator/fstab-generator.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/src/fstab-

[systemd-devel] [PATCH] fstab-generator: read rd.fstab=on/off switch correctly

2013-08-09 Thread WANG Chao
--- src/fstab-generator/fstab-generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 87b17cd..0c31409 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-gen

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

2013-08-08 Thread WANG Chao
On 08/09/13 at 02:08am, Tom Gundersen wrote: > On Thu, Aug 8, 2013 at 9:18 AM, WANG Chao wrote: > > Currently we don't respect noauto/nofail root mount options (from > > rootflags kernel cmdline). We should map these two flags to the > > corresponding boolean varia

[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 --- Days ago, I sent a patch to add rd.weak_sysroot. It seem

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

2013-08-07 Thread WANG Chao
to keep "Before=$post" in the nofail=true case. I coud post a patch, but I think it's best to consult to you guys first in case I'm missing something. Thanks WANG Chao ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] [PATCH] fstab-generator: introduce rd.weak_sysroot to bypass failures in sysroot.mount

2013-08-04 Thread WANG Chao
On 07/30/13 at 06:52pm, Zbigniew Jędrzejewski-Szmek wrote: > On Wed, Jul 31, 2013 at 12:46:22AM +0800, WANG Chao wrote: > > On 07/31/13 at 12:32am, WANG Chao wrote: > > > On 07/30/13 at 03:46pm, Zbigniew Jędrzejewski-Szmek wrote: > > > > On Tue, Jul 30, 2013 at 09:43

Re: [systemd-devel] [PATCH] fstab-generator: introduce rd.weak_sysroot to bypass failures in sysroot.mount

2013-08-01 Thread WANG Chao
On 08/01/13 at 08:49am, Colin Guthrie wrote: > [Resend because I fail at reply-all] > > 'Twas brillig, and WANG Chao at 01/08/13 06:36 did gyre and gimble: > > On 07/30/13 at 04:40pm, Tom Gundersen wrote: > >> On Tue, Jul 30, 2013 at 4:13 PM, Harald Hoyer wrote:

Re: [systemd-devel] [PATCH] fstab-generator: introduce rd.weak_sysroot to bypass failures in sysroot.mount

2013-07-31 Thread WANG Chao
.] _nofail_ Do not report errors for this device if it does not exist. So if filesystem is corrupted or something else fails the sysroot.mount, initrd-root-fs.target will never be reached. Thanks WANG Chao ___ systemd-devel mailing list systemd-dev

Re: [systemd-devel] [PATCH] fstab-generator: introduce rd.weak_sysroot to bypass failures in sysroot.mount

2013-07-30 Thread WANG Chao
On 07/31/13 at 12:32am, WANG Chao wrote: > On 07/30/13 at 03:46pm, Zbigniew Jędrzejewski-Szmek wrote: > > On Tue, Jul 30, 2013 at 09:43:16AM -0400, Vivek Goyal wrote: > > > [CC harald] > > > > > > Not sure if this is right way to do or not but I will give m

Re: [systemd-devel] [PATCH] fstab-generator: introduce rd.weak_sysroot to bypass failures in sysroot.mount

2013-07-30 Thread WANG Chao
On 07/30/13 at 03:46pm, Zbigniew Jędrzejewski-Szmek wrote: > On Tue, Jul 30, 2013 at 09:43:16AM -0400, Vivek Goyal wrote: > > [CC harald] > > > > Not sure if this is right way to do or not but I will give more > > background about the issue. > > > > This assumption seems to be built into initramf

Re: [systemd-devel] [PATCH] fstab-generator: introduce rd.weak_sysroot to bypass failures in sysroot.mount

2013-07-30 Thread WANG Chao
On 07/30/13 at 04:02pm, Tom Gundersen wrote: > On Tue, Jul 30, 2013 at 2:27 PM, WANG Chao wrote: > > On 07/30/13 at 02:05pm, Tom Gundersen wrote: > >> On Tue, Jul 30, 2013 at 1:53 PM, WANG Chao wrote: > >> > - It's not before initrd-root-fs.target. > &g

Re: [systemd-devel] [PATCH] fstab-generator: introduce rd.weak_sysroot to bypass failures in sysroot.mount

2013-07-30 Thread WANG Chao
On 07/30/13 at 09:51am, Vivek Goyal wrote: > On Tue, Jul 30, 2013 at 07:53:11PM +0800, WANG Chao wrote: > > If specified kernel command line rd.weak_sysroot, fstab-generate will > > generate a weaker version of sysroot.mount: > > - It's not required by initrd-root-

Re: [systemd-devel] [PATCH] fstab-generator: introduce rd.weak_sysroot to bypass failures in sysroot.mount

2013-07-30 Thread WANG Chao
On 07/30/13 at 02:05pm, Tom Gundersen wrote: > On Tue, Jul 30, 2013 at 1:53 PM, WANG Chao wrote: > > If specified kernel command line rd.weak_sysroot, fstab-generate will > > generate a weaker version of sysroot.mount: > > - It's not required by initrd-root-fs.targ

[systemd-devel] [PATCH] fstab-generator: introduce rd.weak_sysroot to bypass failures in sysroot.mount

2013-07-30 Thread WANG Chao
nd systemd will try continue rather than entering isolated emergency mode. Signed-off-by: WANG Chao --- man/kernel-command-line.xml | 10 ++ man/systemd-fstab-generator.xml | 10 ++ src/fstab-generator/fstab-generator.c | 5 - 3 files changed, 24 insertions(+),

Re: [systemd-devel] Unbuffered stderr for my systemd service?

2013-07-16 Thread WANG Chao
On 07/16/13 at 02:00pm, Kay Sievers wrote: > On Tue, Jul 16, 2013 at 5:30 AM, WANG Chao wrote: > > On 07/15/13 at 10:46pm, Lennart Poettering wrote: > >> On Mon, 15.07.13 17:56, WANG Chao (chaow...@redhat.com) wrote: > >> > >> > I have a service (a scr

Re: [systemd-devel] Unbuffered stderr for my systemd service?

2013-07-16 Thread WANG Chao
On 07/16/13 at 01:39pm, Kay Sievers wrote: > On Tue, Jul 16, 2013 at 5:30 AM, WANG Chao wrote: > > >> (Humm, please do not use "--" on a single line in the middle of an > >> email, that's indication for many MUAs that this is where the signature > >&

Re: [systemd-devel] Unbuffered stderr for my systemd service?

2013-07-15 Thread WANG Chao
On 07/15/13 at 10:46pm, Lennart Poettering wrote: > On Mon, 15.07.13 17:56, WANG Chao (chaow...@redhat.com) wrote: > > > Hi, > > > > I have a service (a script) running under systemd and need its stderr to > > be output'd immediately, not line buffered. I trie

[systemd-devel] Unbuffered stderr for my systemd service?

2013-07-15 Thread WANG Chao
line buffering, it's impossible to update information in-place (something like calling times of echo -e "blah\r", later output will override the former one). Any comments are welcome! Thanks! WANG Chao ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

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

2012-08-09 Thread WANG Chao
On 08/09/2012 05:56 PM, Zbigniew Jędrzejewski-Szmek wrote: On 08/09/2012 10:04 AM, WANG Chao wrote: On 08/09/2012 01:59 PM, Zbigniew Jędrzejewski-Szmek wrote: On 08/09/2012 06:28 AM, WANG Chao wrote: Hi, list As you see in the subject, this question comes from a lazy guy like me, who doesn&#

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

2012-08-09 Thread WANG Chao
On 08/09/2012 01:59 PM, Zbigniew Jędrzejewski-Szmek wrote: On 08/09/2012 06:28 AM, WANG Chao wrote: 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 Hey, no need to read the source code :). Please see th

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

2012-08-08 Thread WANG Chao
If A is started after B is started (still parallel somehow), is there anything I can do to control A to be started right after B is done? -- Thanks, WANG Chao ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedes