Re: broken sysvinit?
Petr Cech <email@example.com> writes:
> On Fri, Jun 23, 2000 at 10:13:17AM -0300 , Henrique M Holschuh wrote:
> > On Fri, 23 Jun 2000, Petr Cech wrote:
> > > is it just me, or is /etc/init.d/checkroot.sh really horribly broken?
> > > This is a sniper from it. It bafs on the exec 10 (as expected) and doesn't
> > > remount root rw, so the booting is rather painfull.
> > It works here. Up-to-date woody, i386 + kernel 2.2.17pre4,
> > /bin/sh -> /bin/bash.
> hmm. so it's the sh -> ash. Hmm. So it's bashism or a bug in ash.
> > Now, I'll go read some docs to figure out exactly what those exec lines do :-)
> it probably runs the prog in a subshell? It's parsing fstab to see if it
> should check the filesystem or not.
No, the exec command can be used to open, close, or reassign file
descriptors. In this case, it temporarily reassigns stdin to fd 10,
so that it can use stdin for parsing fstab. Then later in the script
it reassigns fd 10 back to stdin.
Unfortunately ash only understands single-digit filedescriptors, it
$ exec 2>&1
$ exec 9>&1
$ exec 10>&1
exec: 10: not found
- Ruud de Rooij.
ruud de rooij | *@spam.ruud.org | http://ruud.org