Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #64410
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Newsgroups | linux.debian.bugs.dist, linux.debian.kernel |
| Subject | Bug#931499: initramfs hook scripts which use log_* functions die |
| Date | 2019-07-09 02:00 +0200 |
| Message-ID | <yhLI5-4ws-13@gated-at.bofh.it> (permalink) |
| References | <ygXLj-89L-1@gated-at.bofh.it> <yhguC-2wY-11@gated-at.bofh.it> <yhLI5-4ws-3@gated-at.bofh.it> <ygXLj-89L-1@gated-at.bofh.it> <yhLI5-4ws-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Cross-posted to 2 groups.
[Multipart message — attachments visible in raw view] - view raw
[Please use "reply to all", to record your messages in the bug
reporting system.]
On Sun, 2019-07-07 at 19:38 +0200, Guenther Brunthaler wrote:
> Am 2019-07-07 um 15:50 schrieb Ben Hutchings:
>
> > These functions are meant to be used by boot scripts, not by hook
> > scripts.
>
> Thank you, this is good to know!
>
> Unfortunatly, this wasn't so clear for me.
>
> > The documentation is consistent with that.
>
> Actually, the documentation is *lacking* in this area.
>
> It does not explain at all how a hook script shall emit its diagnostic
> messages.
>
> So the reader is left to speculations.
[...]
Yes, I can see how you went down this path. We should separate
functions meant for use at boot time, and those few functions meant for
use at either build or boot time; and then only include definitions of
the latter in "hook-functions".
The answer to "how to log messages" is largely the same as for any
shell script: use echo or printf, and redirect warnings and errors to
stderr. If you have messages that should only appear in verbose mode
(mkinitramfs -v), test the "verbose" variable, e.g.:
[ "${verbose}" = y ] && echo "Doing my thing"
Ben.
--
Ben Hutchings
The Peter principle: In a hierarchy, every employee tends to rise to
their level of incompetence.
Back to linux.debian.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Bug#931499: initramfs hook scripts which use log_* functions die Guenther Brunthaler <gb_about_gnu@gmx.net> - 2019-07-06 20:40 +0200 Bug#931499: Is sourcing /usr/share/initramfs-tools/scripts/functions forbidden in hook scripts? Guenther Brunthaler <gb_about_gnu@gmx.net> - 2019-07-06 21:00 +0200 Processed: Re: initramfs hook scripts which use log_* functions die "Debian Bug Tracking System" <owner@bugs.debian.org> - 2019-07-07 16:40 +0200 Bug#931499: initramfs hook scripts which use log_* functions die Ben Hutchings <ben@decadent.org.uk> - 2019-07-07 16:40 +0200 Bug#931499: [Fwd: Re: initramfs hook scripts which use log_* functions die] Ben Hutchings <ben@decadent.org.uk> - 2019-07-09 02:00 +0200 Bug#931499: initramfs hook scripts which use log_* functions die Ben Hutchings <ben@decadent.org.uk> - 2019-07-09 02:00 +0200
csiph-web