Geert Stappers
2006-Jun-02 01:39 UTC
[syslinux] tftpd-hpa: remap '/tftpboot/ncd4/foo' into 'ncd4/foo'
Hello, This about remapping in the HPA tftp server. A client does request for '/tftpboot/ncd4/foo' which should be 'ncd4/foo' I have created a remap file that looks now like this: r tftpboot/ncd4/modshmx/login.hmx ncd4/modshmx/login.hmx r tftpboot/ncd4/modshmx/setup.hmx ncd4/modshmx/setup.hmx r tftpboot/ncd4/modshmx/term.hmx ncd4/modshmx/term.hmx Because r tftpboot/ncd4/\(.*\) ncd4/\1 did not work for me. The manual says: The following escape sequences are recognized as part of the replace- ment pattern: \0 The entire string matched by the regex. \1 to \9 The strings matched by each of the first nine parenthesized subexpressions, \( ... \), of the regex pattern. Does someone have a working example of '\1' replacemant? Cheers Geert Stappers -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: <http://www.zytor.com/pipermail/syslinux/attachments/20060602/670a374c/attachment.sig>
Geert Stappers
2006-Jun-02 10:59 UTC
[syslinux] tftpd-hpa: remap '/tftpboot/ncd4/foo' into 'ncd4/foo'
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, Jun 02, 2006 at 03:39:21AM +0200, Geert Stappers wrote:> Hello, > > This about remapping in the HPA tftp server. > > A client does request for '/tftpboot/ncd4/foo' which should be 'ncd4/foo' > > > I have created a remap file that looks now like this: > > r tftpboot/ncd4/modshmx/login.hmx ncd4/modshmx/login.hmx > r tftpboot/ncd4/modshmx/setup.hmx ncd4/modshmx/setup.hmx > r tftpboot/ncd4/modshmx/term.hmx ncd4/modshmx/term.hmx > > Because > > r tftpboot/ncd4/\(.*\) ncd4/\1 > > did not work for me. The manual says: > > The following escape sequences are recognized as part of the replace- > ment pattern: > > \0 The entire string matched by the regex. > > \1 to \9 > The strings matched by each of the first nine parenthesized > subexpressions, \( ... \), of the regex pattern. > > > Does someone have a working example of '\1' replacemant? >After some sleep I tried r tftpboot/ncd4/modshmx/\(.*\) ncd4/modshmx/\1 so there is no slash in the replacement, but it didn't help.> Cheers > Geert Stappers-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFEgBocOSINbgwa/7sRArbiAJ0f/NpuHl+85S/n301GaqqZirqHWgCgwQrk HQCXzaXec9172/V8Ol+BlHg=5GEg -----END PGP SIGNATURE-----
H. Peter Anvin
2006-Jun-02 14:31 UTC
[syslinux] tftpd-hpa: remap '/tftpboot/ncd4/foo' into 'ncd4/foo'
Geert Stappers wrote:> Hello, > > This about remapping in the HPA tftp server. > > A client does request for '/tftpboot/ncd4/foo' which should be 'ncd4/foo' > > > I have created a remap file that looks now like this: > > r tftpboot/ncd4/modshmx/login.hmx ncd4/modshmx/login.hmx > r tftpboot/ncd4/modshmx/setup.hmx ncd4/modshmx/setup.hmx > r tftpboot/ncd4/modshmx/term.hmx ncd4/modshmx/term.hmx > > Because > > r tftpboot/ncd4/\(.*\) ncd4/\1 > > did not work for me. The manual says: >Try: r tftpboot/ncd4/\(.*\)$ ncd4\/1 -hpa
H. Peter Anvin
2006-Jun-02 14:32 UTC
[syslinux] tftpd-hpa: remap '/tftpboot/ncd4/foo' into 'ncd4/foo'
Geert Stappers wrote:> Hello, > > I have created a remap file that looks now like this: > > r tftpboot/ncd4/modshmx/login.hmx ncd4/modshmx/login.hmx > r tftpboot/ncd4/modshmx/setup.hmx ncd4/modshmx/setup.hmx > r tftpboot/ncd4/modshmx/term.hmx ncd4/modshmx/term.hmx > > Because > > r tftpboot/ncd4/\(.*\) ncd4/\1 >Also, you can just do: r tftpboot/ncd4/ ncd4/ ... since the pattern doesn't have to match the whole string. -hpa