Re: [systemd-devel] [PATCH] fstab-generator: respect noauto/nofail when adding sysroot mount
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 calling > > add_mount(). > > > > Signed-off-by: WANG Chao > > Chao, > > Will this work for other mount points as specified by dracut command > line --mount? Yes. "nofail" has been always work _except_ for root fs mount (which is this patch for). > > IOW, if I specify a mount point using --mount and specify "nofail" in > filesystem options, and if that file system can't be mounted, what > will happen. Will we continue to run pre-pivot service? Yes, we can use rootflags=nofail to make initrd-root-fs.target "Wants" sysroot.mount rather than strict "Requires". For mounting non-root fs from /etc/fstab, we can either use systemd by default or a dracut script running under pre-pivot hook if specified rd.fstab=0. Thanks WANG Chao > > Thanks > Vivek > > > --- > > > > Days ago, I sent a patch to add rd.weak_sysroot. It seems you guys don't > > like > > it, even me neither :( > > > > So I come up with this update. It looks more reasonable. With this patch, I > > can > > set rootflags=nofail to bypass sysroot failure, which blocking > > initrd-root-fs.target. > > > > Please put your comments. Thanks! > > > > src/fstab-generator/fstab-generator.c | 6 +- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/src/fstab-generator/fstab-generator.c > > b/src/fstab-generator/fstab-generator.c > > index c17299f..87b17cd 100644 > > --- a/src/fstab-generator/fstab-generator.c > > +++ b/src/fstab-generator/fstab-generator.c > > @@ -492,6 +492,7 @@ static int parse_new_root_from_proc_cmdline(void) { > > char *w, *state; > > int r; > > size_t l; > > +bool noauto, nofail; > > > > r = read_one_line_file("/proc/cmdline", &line); > > if (r < 0) { > > @@ -547,6 +548,9 @@ static int parse_new_root_from_proc_cmdline(void) { > > } > > } > > > > +noauto = !!strstr(opts, "noauto"); > > +nofail = !!strstr(opts, "nofail"); > > + > > if (!what) { > > log_debug("Could not find a root= entry on the kernel > > commandline."); > > return 0; > > @@ -558,7 +562,7 @@ static int parse_new_root_from_proc_cmdline(void) { > > } > > > > log_debug("Found entry what=%s where=/sysroot type=%s", what, > > type); > > -r = add_mount(what, "/sysroot", type, opts, 0, false, false, false, > > +r = add_mount(what, "/sysroot", type, opts, 0, noauto, nofail, > > false, > >false, NULL, NULL, NULL, > > SPECIAL_INITRD_ROOT_FS_TARGET, "/proc/cmdline"); > > > > return (r < 0) ? r : 0; > > -- > > 1.8.3.1 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [PATCH] fstab-generator: log_oom() if automount_name is null
--- 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-generator.c @@ -351,7 +351,7 @@ static int add_mount( if (automount && !path_equal(where, "/")) { automount_name = unit_name_from_path(where, ".automount"); -if (!name) +if (!automount_name) return log_oom(); automount_unit = strjoin(arg_dest, "/", automount_name, NULL); -- 1.8.3.1 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] brightness in tmpfiles.d
Mantas Mikulėnas on Tue, 2013/08/13 00:27: > On Mon, Aug 12, 2013 at 11:40 PM, Christian Hesse wrote: > > Hello everybody, > > > > I have a file /etc/tmpfiles.d/brightness.conf containing this line: > > > > w /sys/class/backlight/acpi_video0/brightness - - - - 10 > > > > This used to set the brightness on boot, but broke lately. The path is > > correct, so I assume this is a race condition. Any chance to get this work > > again? > > Sure, and it involves *not* using tmpfiles.d. > > I cannot know for sure, but yes, it is likely that it *is* a race > condition – tmpfiles.d being run before the relevant module gets > inserted, device gets detected, or whatever. And the usual way for > working with events like device detection is to write an udev rule > that triggers after that specific device has appeared: > > ACTION=="add", SUBSYSTEM=="backlight", > KERNEL=="acpi_video0", ATTR{brightness}="10" > > (I'm not 100% sure if the KERNEL match is correct. The rest should work.) Makes sense to use udev for this kind of things... I am not sure why I decided to use tmpfiles. Thanks for your hint! -- main(a){char*c=/*Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/*Chris get my mail address:*/=0;b=c[a++];) putchar(b-1/(/* gcc -o sig sig.c && ./sig*/b/42*2-3)*42);} signature.asc Description: PGP signature ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Hackfest at Linux Plumbers Conference?
We would love to join! On Aug 12, 2013 8:38 PM, "David Strauss" wrote: > Are there any plans? > > -- > David Strauss >| da...@davidstrauss.net >| +1 512 577 5827 [mobile] > ___ > systemd-devel mailing list > systemd-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/systemd-devel > ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Hackfest at Linux Plumbers Conference?
On Tue, Aug 13, 2013 at 4:16 PM, Alex Polvi wrote: > > We would love to join! > > On Aug 12, 2013 8:38 PM, "David Strauss" wrote: >> >> Are there any plans? The current idea is to do that during the two LinuxCon days before Plumbers starts. Kay ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Hackfest at Linux Plumbers Conference?
On Tue, Aug 13, 2013 at 1:16 PM, Kay Sievers wrote: > The current idea is to do that during the two LinuxCon days before > Plumbers starts. Thanks. That's all I need to know for booking. I'll edit the systemd wiki if it's not already there. -- David Strauss | da...@davidstrauss.net | +1 512 577 5827 [mobile] ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [PATCH] zsh_completion: Remove function from _systemd
--- shell-completion/zsh/_systemd | 163 -- 1 file changed, 79 insertions(+), 84 deletions(-) diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd index fe39de8..e954c3e 100644 --- a/shell-completion/zsh/_systemd +++ b/shell-completion/zsh/_systemd @@ -1,88 +1,83 @@ #compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop systemd-detect-virt systemd-machine-id-setup systemd-notify systemd-tty-ask-password-agent -_ctls() -{ -local curcontext="$curcontext" state lstate line -case "$service" in -systemd-ask-password) -_arguments \ -{-h,--help}'[Show this help]' \ -'--icon=[Icon name]' \ -'--timeout=[Timeout in sec]' \ -'--no-tty[Ask question via agent even on TTY]' \ -'--accept-cached[Accept cached passwords]' \ -'--multiple[List multiple passwords if available]' -;; -systemd-cat) -_arguments \ -{-h,--help}'[Show this help]' \ -'--version[Show package version.]' \ -{-t,--identifier=}'[Set syslog identifier.]' \ -{-p,--priority=}'[Set priority value.]:value:({0..7})' \ -'--level-prefix=[Control whether level prefix shall be parsed.]:boolean:(1 0)' \ -':Message' -;; -systemd-cgls) -_arguments \ -{-h,--help}'[Show this help]' \ -'--version[Show package version]' \ -'--no-pager[Do not pipe output into a pager]' \ -{-a,--all}'[Show all groups, including empty]' \ -'-k[Include kernel threads in output]' \ -':cgroups:(cpuset cpu cpuacct memory devices freezer net_cls blkio)' -;; -systemd-cgtop) -_arguments \ -{-h,--help}'[Show this help]' \ -'--version[Print version and exit]' \ -'(-c -m -i -t)-p[Order by path]' \ -'(-c -p -m -i)-t[Order by number of tasks]' \ -'(-m -p -i -t)-c[Order by CPU load]' \ -'(-c -p -i -t)-m[Order by memory load]' \ -'(-c -m -p -t)-i[Order by IO load]' \ -{-d,--delay=}'[Specify delay]' \ -{-n,--iterations=}'[Run for N iterations before exiting]' \ -{-b,--batch}'[Run in batch mode, accepting no input]' \ -'--depth=[Maximum traversal depth]' -;; -systemd-detect-virt) -_arguments \ -{-h,--help}'[Show this help]' \ -'--version[Show package version]' \ -{-c,--container}'[Only detect whether we are run in a container]' \ -{-v,--vm}'[Only detect whether we are run in a VM]' \ -{-q,--quiet}"[Don't output anything, just set return value]" -;; -systemd-machine-id-setup) -_arguments \ -{-h,--help}'[Show this help]' \ -'--version[Show package version]' -;; -systemd-notify) -_arguments \ -{-h,--help}'[Show this help]' \ -'--version[Show package version]' \ -'--ready[Inform the init system about service start-up completion.]' \ -'--pid=[Inform the init system about the main PID of the daemon]' \ -'--status=[Send a free-form status string for the daemon to the init systemd]' \ -'--booted[Returns 0 if the system was booted up with systemd]' \ -'--readahead=[Controls disk read-ahead operations]:arguments:(cancel done noreply)' -;; -systemd-tty-ask-password-agent) -_arguments \ -{-h,--help}'[Prints a short help text and exits.]' \ -'--version[Prints a short version string and exits.]' \ -'--list[Lists all currently pending system password requests.]' \ -'--query[Process all currently pending system password requests by querying the user on the calling TTY.]' \ -'--watch[Continuously process password requests.]' \ -'--wall[Forward password requests to wall(1).]' \ -'--plymouth[Ask question with plymouth(8).]' \ -'--console[Ask question on /dev/console.]' -;; -*) _message 'eh?' ;; -esac -} - -_ctls "$@" +local curcontext="$curcontext" state lstate line +case "$service" in +systemd-ask-password) +_arguments \ +{-h,--help}'[Show this help]' \ +'--icon=[Icon name]' \ +'--timeout=[Timeout in sec]' \ +'--no-tty[Ask question via agent even on TTY]' \ +'--accept-cached[Accept cached passwords]' \ +'--multiple[List multiple passwords if available]' +;; +systemd-cat) +_arguments \ +
Re: [systemd-devel] Hackfest at Linux Plumbers Conference?
On Tue, Aug 13, 2013 at 1:23 PM, David Strauss wrote: > Thanks. That's all I need to know for booking. I'll edit the systemd > wiki if it's not already there. I noticed there wasn't a G+ event for it, either. So, I made one [1] and posted it to the Hackfest section of the systemd wiki. [1] https://plus.google.com/events/ce60f0rq4lldbti9qgg0u4j8rbc -- David Strauss | da...@davidstrauss.net | +1 512 577 5827 [mobile] ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [PATCH] gnome-ask-password-agent: do not double fork spawned process
pkexec does not like being a lonely child: "Refusing to render service to dead parents." Do not double fork when spawning the process by using the DO_NOT_REAP_CHILD flag. Instead clean up manually by calling waitpid. --- src/gnome-ask-password-agent.vala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gnome-ask-password-agent.vala b/src/gnome-ask-password-agent.vala index 0f6284d..cff1e58 100644 --- a/src/gnome-ask-password-agent.vala +++ b/src/gnome-ask-password-agent.vala @@ -220,7 +220,7 @@ public class MyStatusIcon : StatusIcon { null, { "/usr/bin/pkexec", "/lib/systemd/systemd-reply-password", result == ResponseType.OK ? "1" : "0", socket }, null, -0, +GLib.SpawnFlags.DO_NOT_REAP_CHILD, null, null, out to_process, @@ -236,6 +236,7 @@ public class MyStatusIcon : StatusIcon { } catch (Error e) { show_error(e.message); } +waitpid(0, null, 0); } } -- 1.8.3.4 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] gnome-ask-password-agent: do not double fork spawned process
On Tue, 2013-08-13 at 23:42 +0200, Michael Laß wrote: > pkexec does not like being a lonely child: > "Refusing to render service to dead parents." > > Do not double fork when spawning the process by using the DO_NOT_REAP_CHILD > flag. Instead clean up manually by calling waitpid. It's cleaner to use the GLib child watch functionality. See a similar fix I did for gnome-shell: https://git.gnome.org/browse/gnome-shell/commit/?id=02e4726ba62659b4cdeca5274d76ba8f14edb768 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Hackfest at Linux Plumbers Conference?
On Tue, Aug 13, 2013 at 10:16:56PM +0200, Kay Sievers wrote: > On Tue, Aug 13, 2013 at 4:16 PM, Alex Polvi wrote: > > > > We would love to join! > > > > On Aug 12, 2013 8:38 PM, "David Strauss" wrote: > >> > >> Are there any plans? > > The current idea is to do that during the two LinuxCon days before > Plumbers starts. Hi Kay, Is this definite? Previously Lennart said something about *after* Plumbers... For me personally *before* is better, but I would like to have some concrete dates before I go to adjust my boooking. Zbyszek ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel