[syslinux] (hpa-tftpd] remapping with regular expression problem

G. Nau b404_r66 at yahoo.de
Thu Aug 5 13:26:58 PDT 2004


Hi mailing list,
I'm working on PXE booting a BartPE (=Windows XP) system from a server running 
hpa tftpd.
In the initialization phase the files are requested from the boot server by TFTP, later 
the transfer is switched to SMB.
Most of the problems during this tftp phase can be solved with the  remapping feature 
quite nicely like:
*converting filenames into absolute paths
*convert backslashes to slashes

One problem missing is to alter the case of the requested files. As the drivers in XP 
are using a wild combination of upper and lower cases I prefer to convert the 
complete BartPE directory structure to lower case and force hpa-tftpd to remap all 
filenames in the BartPE directory only (for example /tftpboot/winpe) to lower case.

And that's where I'm stuck:
To avoid side effects to other tftp downloads from the same server I'd like to limit the 
case altering only to filenames containing '/winpe/'.
So I'm looking for a way to exit with the success the reg. ex ruleset, if '/winpe/' is 
__not__ in the filename.

Thanks for your input
Regards
  Bernd

rg	\\		/		# Convert backslashes to slashes
r	^[^/]		/tftpboot/\0	# Convert non-absolute files
r       ^/winpe/	/tftpboot/winpe/# Convert relative paths to their absolute position

#exit (with success) if the requested file not from /winpe/
#not working yet...
#ei	/winpe/				# exit ruling if not /winpe/ in the filename

#convert all file and pathnames to lower case
#not elegant, but working ...
rg	A		a		# lower case
rg	B		b		# lower case
rg	C		c		# lower case
rg	D		d		# lower case
rg	E		e		# lower case
rg	F		f		# lower case
rg	G		g		# lower case
rg	H		h		# lower case
rg	I		i		# lower case
rg	J		j		# lower case
rg	K		k		# lower case
rg	L		l		# lower case
rg	M		m		# lower case
rg	N		n		# lower case
rg	O		o		# lower case
rg	P		p		# lower case
rg	Q		q		# lower case
rg	R		r		# lower case
rg	S		s		# lower case
rg	T		t		# lower case
rg	U		u		# lower case
rg	V		v		# lower case
rg	W		w		# lower case
rg	X		x		# lower case
rg	Y		y		# lower case
rg	Z		z		# lower case




More information about the Syslinux mailing list