Re: [PATCH] preseed/env2debconf: use `env' instead of `set' to iterate environment
Michael Tokarev <[email protected]> Fri, 24 Jul 2026 18:32:42 +0300
| Newsgroups | gmane.linux.debian.devel.boot |
|---|---|
| Message-ID | <[email protected]> |
On 7/12/26 15:09, Michael Tokarev wrote: > d-i can be pre-seed by specifying parameters on the kernel command line, > but instead of using /proc/cmdline for that, env2debconf relies on > the kernel passing unrecognized parameters as environment variables. > Usual form of d-i parameters include slashes and dashes, such as > rescue/enable=true - which is not valid for regular shell variables. > Neither bash nor dash `set' builtin displays such environment vars, > while `env' command does. d-i used `set' with busybox's ash, but > this one displayed these vars in the past but stopped doing that at > some point. And after that time, d-i relied on reverting the > corresponding commit from busybox in order to restore old `set' > behavior. > > Instead of relying on a hackish/questionable patch to busybox, let's > just use `env' here instead of `sed'. > > This is a simple version. The more correct approach, I think, is to parse > /proc/cmdline in this place (and rename env2debconf to cmdline2debconf > maybe). This also will help with hostname= which, when given, gets eaten > by the kernel, not passing it as environment variable, -- so that the > first half of env2debconf tries to guess if hostname= has been specified > or not. But that's for later time. > --- > I can commit this directly, I guess, but since d-i is not my area at all, > and I never, ever, committed to any of its components, I'm sending this > to the ML first. I've committed this change to preseed.git. With the next upload of preseed, busybox can be uploaded too. Thanks, /mjt