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

2014-11-27 Thread WANG Chao
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] 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 chaow...@redhat.com пишет: Hi, All I happen to notice systemctl isolate will expands foo.service to foo.service.target, which unfortunately breaks my boot in some way. I find the following

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

2014-05-28 Thread WANG Chao
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 systemd will mount it at some time. I have a question about mount

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

2014-04-09 Thread WANG Chao
handler should be the right thing to do. 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: 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 vgo...@redhat.com пишет: Defining a new

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

2014-04-04 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, we

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, In kdump environment, memory resource

[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] 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.journal) is 4 MB and I think that is too

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); +size_t pl = strlen(postfix); + +if (sl pl

[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

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 k...@vrfy.org wrote: On Wed, Aug 21, 2013 at 8:15 PM, WANG Chao chaow...@redhat.com wrote: Take this optimized code from

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 chaow...@redhat.com wrote: --- a/TODO +++ b/TODO @@ -96,8 +96,6 @@ Features: -* do we really need both hasprefix() and startswith()? It needs a little bit more: - the open-coded

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 chaow...@redhat.com wrote: On 08/21/13 at 12:05pm, Kay Sievers wrote: On Wed, Aug 21, 2013 at 8:36 AM, WANG Chao chaow...@redhat.com wrote: --- a/TODO +++ b/TODO @@ -96,8 +96,6 @@ Features

[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

[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

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 variable noauto and nofail when

[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 +++

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

2013-08-09 Thread WANG Chao
On 08/09/13 at 02:08am, Tom Gundersen wrote: On Thu, Aug 8, 2013 at 9:18 AM, WANG Chao chaow...@redhat.com 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 variable noauto

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-generator/fstab-generator.c b/src/fstab-generator

[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 +++

[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

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

2013-08-07 Thread WANG Chao
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-05 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:16AM -0400, Vivek Goyal wrote: [CC

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 har...@redhat.com wrote: On 07/30/2013 03:46 PM

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

2013-07-31 Thread WANG Chao
. 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-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo

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

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

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 chaow...@redhat.com 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.target. - It's

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-fs.target. - It's not before initrd

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 chaow...@redhat.com wrote: On 07/30/13 at 02:05pm, Tom Gundersen wrote: On Tue, Jul 30, 2013 at 1:53 PM, WANG Chao chaow...@redhat.com wrote: - It's not before initrd-root-fs.target. In case of kdump

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 initramfs and

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 chaow...@redhat.com 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 starts, and they chop this off when

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 chaow...@redhat.com 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 script) running under systemd and need its

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 tried serveral ways but didn't work out. I hope

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 the man

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't

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

2012-08-08 Thread WANG Chao
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.freedesktop.org/mailman/listinfo