[syslinux] Nested SYSLINUX configurations -- error using CONFIG directive

Rich Mahn rich at lat.com
Wed Mar 30 07:35:31 PDT 2011


Rich Mahn <rich at lat.com> wrote:

> > From: "Rich Mahn" <rich at lat.com>
> > 
> > > H. Peter Anvin <hpa at zytor.com> wrote:
> > > >> There seems to be an error using '..' in the append portion of the
> > > >> CONFIG directive.
> > > >
> > > > This is a known bug in Syslinux 4.03.  It should be fixed in 4.04-pre14,
> > > > but if it is not, please scream.
> > > >
> > > > -hpa
> > > >
> 
> Ok.  I have successfully recompile 4.04-pre14.  The problem still exists.  Here's
> another example:
> in root:
> LABEL dir1
>    config dir1/config.cfg
>    append dir1
> LABEL non-existant dir2
>    config dir2/config.cfg
>    append dir2
> 
> in dir1
> LABEL up
>    config ../config.cfg
>    append ..
> 
> directory structure:  /dir1/dir2 with no /dir2
> 
> startup syslinux in the root directory.
> select dir1, menu in dir1 comes up.
> selet up, menu in root comes up.
> 
> then select dir2.  menu in /dir1/dir2 comes up
> 
> somehow the "current working directory" doesn't seem to get
> changed with ".." or any variant thereof.  But the config
> file and the other items, such as kernel, initrd, etc come
> from the correct directory

I was mistaken about the kernel, initrd, etc.  They are not coming from
the correct directory, but instead they are coming from the directory
where the CONFIG directive was given.  This simplifies the
characterization of the error considerably:

The processing of the change to the current directory terminates upon a
".." as a component of the path.  For example, if the append portion of
the CONFIG directive is "A/B/../C/."  it will be processed as if it was
"A/B".




More information about the Syslinux mailing list