patg@impch.imp.com (Patrick Guelat) (06/09/90)
The following patch fixes the 'if_filename_longer_than_14_chars_then_error'- behaviour of SCO Unix. Filenames will be truncated to 14 chars in good old SysV-manner... (no more problems to extract bsd-tar archives with long filenames, no problems with news2.11 and so on....) Patrick - cut here --- cut here --- cut here --- cut here --- cut here --- cut here - : # This is a shell archive, meaning: # 1. Remove everything above the : line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create: # README # fs-patch # This archive created: Sat Jun 9 04:17:27 1990 export PATH; PATH=/bin:/usr/bin:$PATH if test -f 'README' then echo shar: "will not over-write existing file 'README'" else sed 's/^X//' << \SHAR_EOF > 'README' X XSCO Unix System V 3.2 Filesystem Patch (Hacked by Patrick Guelat, patg@imp.com) X-------------------------------------- X XThe s5-filesystem code in sco-unix doesn't truncate filenames longer than X14 chars but generates an error (78 - ENAMETOOLONG) instead. X XThis lead to problems with programs like tar (when extracting tars made on Xbsd-systems with long filenames), news2.11 (if not compiled with FOURTEENMAX) Xand a lot of others. X XThe following patch solve these problems. It nop'es out the part of code Xthat does that 'is_it_longer_than_14_chars'-check in the s5fs-driver. X XThe patch uses 'adb' on /etc/conf/pack.d/s5/Driver.o. Before changing Xanything it'll check with 'sum' if you've the correct driver version, Xotherwise nothing will be changed.. X XA copy of "/etc/conf/pack.d/s5/Driver.o" will be made in X"/etc/conf/bak/s5_Driver.o" X XTo apply the patch just type 'sh fs-patch' as root. X X-- XPatrick Guelat, ImproWare Switzerland, Burggartenstr. 6, CH-4133 Pratteln XUUCP : patg@impch.uucp, ...!backbone!impch!patg XINTERNET : patg@impch.imp.com, patg@acadch.com, patg@ai.mit.edu SHAR_EOF fi if test -f 'fs-patch' then echo shar: "will not over-write existing file 'fs-patch'" else sed 's/^X//' << \SHAR_EOF > 'fs-patch' X: X# X# fs-patch, patches the s5-filesystem driver on sco unix to accept filenames X# longer than 14 characters. X# X# Patrick Guelat, ImproWare Switzerland, Burggartenstr. 6, CH-4133 Pratteln X# UUCP : patg@impch.uucp, ...!backbone!impch!patg X# INTERNET : patg@impch.imp.com, patg@acadch.com, patg@ai.mit.edu X# GEONET : GEO5:P.GUELAT X# X XOBJFILE=/etc/conf/pack.d/s5/Driver.o XBAKDIR=/etc/conf/bak XBAKFILE=$BAKDIR/s5_Driver.o X X X# Check Userid Xif [ `id | sed 's/.*=\([0-9]*\).*/\1/' ` != 0 ] Xthen X echo "You must run fs-patch as root" X exit 1 Xfi X X Xset `sum $OBJFILE` X Xif [ $1 != 63282 -o $2 != 73 ] Xthen X echo "Seems not to be the same driver version.. try anyway ? [Y] \c" X read answer X case "$answer" in X ""|Y*|y*) X echo "Ok... we'll try it...." X ;; X *) X echo "Your choice................" X exit 0 X ;; X esac Xfi X Xif [ ! -d $BAKDIR ] Xthen X mkdir $BAKDIR X echo "Directory $BAKDIR" created Xfi X Xif [ -f $BAKFILE ] Xthen X echo "Will not overwrite $BAKFILE, remove it if necessary" X exit 0 Xfi X Xcp $OBJFILE $BAKFILE Xecho "$OBJFILE backed up to --> $BAKFILE" X Xadb -w $OBJFILE <<END >/dev/null Xs5namei+0xa8?x X?w9090 X X?w9090 X X?w9090 X X?w9090 X X?w9090 X X?w9090 X X?w9090 X X?w9090 X X?w9090 XEND X Xecho "Patch done......" X Xcd /etc/conf/cf.d X./link_unix SHAR_EOF fi exit 0 # End of shell archive