treatment chlamydia
Return to forums
Register new account
Login:
generic dapoxetine priligy

Synergy Mod Forums: Linux Case-sensitivity Fix - Synergy Mod Forums

Jump to content


Toggle shoutbox Shoutbox

WattoDaToyda...  : (24 May 2013 - 09:12 PM) Is the Linux dedicated server completely broken or is it just me?
gmc.jimmy  : (08 May 2013 - 08:05 PM) The guests browsing are probably spambots or search engines.
Vladimir Bladin  : (03 May 2013 - 08:41 PM) Hmm. the online at once record seems to be broken every day. If you're a guest browsing these forums, why not join? As the saying goes, "The more the merrier."
jonnyquattro  : (27 April 2013 - 11:47 AM) woot.
Stino  : (25 April 2013 - 10:14 AM) https://www.facebook.com/SynergyMod People, you know what to do!
TBC Alex  : (22 April 2013 - 01:38 PM) Do you need help no problem send me a pm or open a thread
WattoDaToyda...  : (20 April 2013 - 10:21 PM) Someone please help me with my server!
scorp75  : (19 January 2013 - 01:28 PM) Spam, spam, spam. I am saddened to see this
VOSK  : (18 January 2013 - 03:48 PM) Looking into ways to correct that.
ChexGuy  : (06 January 2013 - 06:44 PM) actually a lot of the forums have spambot posts
ChexGuy  : (06 January 2013 - 06:43 PM) holy crap the entire Synergy Discussion forum is spambots wtf
Pestilence  : (03 January 2013 - 11:38 AM) Woo synergy updates!!
Edfake  : (31 December 2012 - 10:22 PM) sourcemod should now be fixed as of 9 hours ago
Edfake  : (31 December 2012 - 10:21 PM) Happy new years!!!!
Zero Alpha 2  : (31 December 2012 - 12:27 PM) And Happy New years eve!
Zero Alpha 2  : (31 December 2012 - 12:26 PM) Its been awfully quiet in the shout box lately D:
gmc.jimmy  : (17 October 2012 - 09:04 PM) Here's a Slashdot article talking about a Steam vulnerability.
Edfake  : (15 October 2012 - 04:24 PM) If its any help, UrbanCommand check the November 24, 2011 post in news, and Forensic, check your drivers and update them all. maybe updating ditect x will help too
UrbanCommand  : (23 September 2012 - 10:43 AM) WTF i keep on getting invalid steam userID ticket any help :/
Forensic  : (16 September 2012 - 08:04 PM) ok, umm, blue screen of death, anyone know a fix?
Resize Shouts Area

  • (2 Pages) +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Linux Case-sensitivity Fix for servers only

#1
User is offline   VOSK 

  • Synergy Spammer
  • Group: Administrators
  • Posts: 1,544
  • Joined: 07-April 08
  • LocationOntario, Canada
This was written up by Dead_Eye, posted on the board already, I'm re-posting it for quick access.

CODE
#!/bin/bash

function usage {
        echo "Usage:"
        echo "$0 relative_path_to_directory/"
        echo "with tailing / | do not use absolute path"
        exit 1
}


if [ -z "$1" ]; then usage; fi
oldifs=$IFS
pwd=`pwd`

#evil hack for white spaces in filenames
IFS="
"
#begin to make lower case symlinks from directorys
for directory in $(find $1 -type d  | grep [A-Z]); do
        directory_lower_case=$(echo "$directory" | tr [A-Z] [a-z])
        if [ ! "$directory" = "$directory_lower_case" -a ! -e "$directory_lower_case" ]; then
                ln -s "$pwd/$directory" "$pwd/$directory_lower_case"
        fi
done

#begin to make lower case symlinks from files
for file in $(find $1 -type f | grep [A-Z]); do
        dirname=$(dirname $file)
        basename=$(basename $file)
        file_lower_case=$(echo "$basename" | tr [A-Z] [a-z])
        if [ ! "$basename" = "$file_lower_case" -a ! -e "$file_lower_case" ]; then
                ln -s $pwd/$file $pwd/$dirname/$file_lower_case
        fi
done

#set IFS back to normal
IFS=$oldifs

0

#2
User is offline   blindphaze 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 37
  • Joined: 07-October 08
This should be in Help and Support also =\
0

#3
User is offline   Sky-Knight 

  • Synergy Advanced
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 163
  • Joined: 12-August 08
Is this the "official" fix or just an alternate to the php script in the wiki?
0

#4
User is offline   VOSK 

  • Synergy Spammer
  • Group: Administrators
  • Posts: 1,544
  • Joined: 07-April 08
  • LocationOntario, Canada
It was written by Dead_Eye (on these forums), I'm just putting it here for reference.
I tested it myself on my own Linux server: after running it on my "hl2" directory (in "orangebox"), my server worked correctly - no missing animations and so on.
0

#5
User is offline   blindphaze 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 37
  • Joined: 07-October 08
I feel like an idiot but, how do I run that script?

I put it in a file named what? and then what do I type?
0

#6
User is offline   Sky-Knight 

  • Synergy Advanced
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 163
  • Joined: 12-August 08
QUOTE (blindphaze @ Oct 18 2008, 07:57 PM) <{POST_SNAPBACK}>
I feel like an idiot but, how do I run that script?

I put it in a file named what? and then what do I type?


put it in a file named whatever... convention has it end in .sh

Make it executable with chmod +x filename.sh

then run it ./filename.sh
0

#7
User is offline   blindphaze 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 37
  • Joined: 07-October 08
That's what I had tried before.


I get this error:

CODE
./bob.sh relative_path_to_directory/
with tailing / | do not use absolute path

0

#8
User is offline   VOSK 

  • Synergy Spammer
  • Group: Administrators
  • Posts: 1,544
  • Joined: 07-April 08
  • LocationOntario, Canada
I did this:

CODE
./fixcase hl2/


The script was put into the "orangebox" directory (so its at the same level as "hl2", "episodic", "ep2" and "synergy").
0

#9
User is offline   blindphaze 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 37
  • Joined: 07-October 08
QUOTE (VOSK @ Oct 19 2008, 07:20 PM) <{POST_SNAPBACK}>
I did this:

CODE
./fixcase hl2/


The script was put into the "orangebox" directory (so its at the same level as "hl2", "episodic", "ep2" and "synergy").


I just used the php script instead, tried the way you just mentioned before and it returned a lot of messages and didn't work.
0

#10
User is offline   Roland 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 22-October 08
Hi

My server is runnig FreeBSD OS. I have saved the script as scripti.sh and chmod:ed it. Then I runned it from the orangebox folder as this: ./scripti.sh hl2/ and I get this response:
./sripti.sh:1: no matches found: [A-Z]
./sripti.sh:1: no matches found: [A-Z]

What Im doing work? why is it not working?
0

#11
User is offline   Dark1337 

  • Synergy Player
  • PipPipPipPip
  • Group: Members
  • Posts: 62
  • Joined: 10-May 08
FreeBSD uses bash? mellow.gif
I need to start learning more about some of the other operating systems besides windows and anything linux based.
0

#12
User is offline   Sky-Knight 

  • Synergy Advanced
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 163
  • Joined: 12-August 08
QUOTE (Dark1337 @ Oct 22 2008, 08:04 AM) <{POST_SNAPBACK}>
FreeBSD uses bash? mellow.gif
I need to start learning more about some of the other operating systems besides windows and anything linux based.


FreeBSD doesn't have it installed by default but it can be installed. I assume in this case the script was just edited to use the Bourne Shell installed by default. I dont know enough about scripting to know if this is entirely correct. However, I do know that if FreeBSD has bash installed the shell is in /usr/local/bin/bash so perhaps not only is the wrong shell installed but the first line of the script needed changed?
0

#13
User is offline   Dark1337 

  • Synergy Player
  • PipPipPipPip
  • Group: Members
  • Posts: 62
  • Joined: 10-May 08
Well I have been doing some work with bash and I know that the first line is supposed to be #!/path/to/shell or what ever the path should be so I bet that is the problem. But now that I think of it, it looks like the script isn't running because it can't be found. To be honest I didn't even know that srcds could run on FreeBSD.
0

#14
User is offline   Sky-Knight 

  • Synergy Advanced
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 163
  • Joined: 12-August 08
FreeBSD + linux compatibility binaries for all intents and purposes runs things like a Fedora box...

I use CentOS now because Asterisk seems to be smoother here but prior to that all my srcds boxes have been FreeBSD. Including my old Counter-Strike server... it runs quite well.
0

#15
User is offline   Roland 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 22-October 08
eh huh.gif

Sory that I did not say this at first, but I changed the first line to this: #! /usr/local/bin/zsh to get the script work. Well at the moment it not a problem the the srcds dosent run on my FreeBSD server, but there is a problem that user disconnect on level change. Now I think this linux fix can help this problem, but the script dosent work. sad.gif
0

#16
User is offline   Myth 

  • Synergy Player
  • PipPipPipPip
  • Group: Members
  • Posts: 96
  • Joined: 06-October 08
Here's a php script that does the same thing. Make sure you got php-cli installed so you can run php scripts from commandline.

QUOTE
#!/usr/bin/php
<?php
symlinkDir(getcwd());
function symlinkDir($dir) {
if (is_dir($dir)) {
$files = scandir($dir);
foreach ($files as $file) {
if (($file != '.') && ($file != '..')) {
$filename = $dir . DIRECTORY_SEPARATOR . $file;
if (is_dir($filename)) {
symlinkDir($filename);
}
if ($filename != strtolower($filename)) {
@ symlink($filename, strtolower($filename));
}
}
}
}
}
?>

0

#17
User is offline   gmc.jimmy 

  • Synergy Spammer
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 694
  • Joined: 11-August 08
This name case fix script seems to work OK with the hl2 directory, but not with episodic or ep2 on my machine. I still get errors from missing VMTs. I've had much better success using this method instead with all 3 campaigns so far.
0

#18
User is offline   cartman-2000 

  • Member
  • PipPip
  • Group: Members
  • Posts: 18
  • Joined: 04-October 08
The vfat thing won't work correctly for all. Some linux oses, older ones probably, the one I tested it on had a several year old fedora core 2 install, won't allow you to mount the vfat disk image file if it's larger then 2gb.
0

#19
User is offline   gmc.jimmy 

  • Synergy Spammer
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 694
  • Joined: 11-August 08
You can divvy up the subdirectories in to individual parts to get smaller bits. It just means more effort for the person doing the work. But it still should be doable.

EDIT: Maybe.. I don't know as I don't have Fedora Core 2 to try this on. But you could try updating mkdosfs and it's mkfs.vfat tool to allow you to create vfat disk images larger than 2gb. If you have admin on that machine. And if I recall, I did have to update mine on my Slackware 11 test box for just that same reason. But my memory is failing me at this moment for me to be 100% certain. Please take this with caution.
0

#20
User is offline   webname 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 02-February 10
create a separate JFS partition format it with mkfs.jfs -O This will create a case-insensitive JFS partition
I use this for the home partition of my samba server.
Apple=aPPle smile.gif

MInd you i still come across blasted winders apps that ARE case sensitive go figure

And of course this being linux you could also create said filesystem in a file large
enough to hold all your data. Ive done that as well so who needs fat smile.gif mounted loop

0

Share this topic:


  • (2 Pages) +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users


yasmin birth control