Changelog for MSS.
As always, make sure you backup the userfiles, passwd file and group file before
upgrading. 
If upgrading more then one version at a time, make sure you follow each versions
upgrading instructions, starting from your current version and up.

Package versions have nothing to do with the versions of the individual scripts.

- New: New feature
- Fix: Bug fixed
- Chg: Feature changed.

Package 2.26 - 20060904
Slave:
MSS-CORE
2.19    :  Fix: Only affects you if you use RUNLOCAL=FALSE in mss-slave.conf.
                If so, when running a full sync and it detected an actionfile in
                the middle of the run, it would process it and afterwards continue
                with the full sync (this is normal) but it would mess up the location
                of the userfiles on the hub.
                Its rare that you would see this and it would not cause any errors part from
                the user in the actionfile not being synced. But atleast its fixed =)

                Thanks durex for finding the error and the solution.

  Update from 2.25
      Slave: * Replace mss-core.sh to version 2.19

##########################################################################################

Package 2.25
Slave:
MSS-CORE
2.18    :  New: Now syncs the EXPIRED field in the userfiles as well. This is only
                used with glftpd 2+.

  Update from 2.24
      Slave: * Replace mss-core.sh
             * Add to mss-slave.conf:
               SYNCEXPIRES=TRUE
               (or FALSE if glftpd 1. If unset, its false automatically.)

Thanks to MiNDTRiCK for testing this out as I currently have no way of testing stuff.

##########################################################################################

Package 2.24
Slave:
MSS-CORE
2.17    :  New: Now syncs DNS fields in the userfiles as well, as introduced in 
                glftpd 2.01RC5.

                No config changes needed for this. It uses SYNCIP as for IP 
                in mss-slave.conf

README:
        :  Fix: As stated by HyperZid, in the README, it specified /etc/exports to use ro
                for /glftpd/etc when it should nowdays be rw. Changed.

  Update from 2.23
      Slave: * Replace mss-core.sh


##########################################################################################

Package 2.23
Hub:
MSS-POST
1.2     :  Chg: Changed to work together with tur-trial3_autoadd.sh (from tur-trial 3+).

  Update from 2.22
      Hub: * Replace mss-post.sh

##########################################################################################

Package 2.22
Slave:
TRANSFERCREDITS
2.7.1   :  Add: The NO_TAXED setting, when used, will now better show which servers will
                not be taxed. If the hub is defined in NO_TAXED, it will say "Hubname(HUB)"
                to better stick out from the rest.


MSS-CORE
2.16    :  Add: Added options to mss-slave.conf; 
                SYNCTIMEFRAME=TRUE/FALSE
                SYNCSLOTS=TRUE/FALSE
                Setting this to TRUE will also sync the TIMEFRAME and/or SLOTS fields 
                in the userfiles.

                SLOTS does not exist in the userfiles for glftpd 2, so dont enable it there.

           Chg: Previously, mss-core.sh was checkign that you had more then 100Mb free on
                your / partition. This didnt work too well out of the box for FBSD users and
                has caused more support then its worth. That check is now gone and its now up
                to you to make sure the diskspace does not run out (or you'll end up with
                empty userfiles).

  Update from 2.21
    Slave: * Replace transfercredits.sh

           * Add to mss-slave.conf, below SYNC_FLAGS:
             SYNC_TIMEFRAME=FALSE   (or TRUE if you want to sync it).

##########################################################################################

Package 2.21
Slave:
TRANSFERCREDITS
2.7     :  Add: New setting in mss-slave.conf:
                NO_TAXED=""
                This is used when TRANSFERTAX and SLAVE2SLAVE is used and defines which
                servers it will NOT use the TRANSFERTAX too.
                Perhaps you have a mix of 10 and 100Mbit sites and dont want tax between
                the 100Mbit sites but from 100Mbit -> 10Mbit etc..
                See README for how-to on this function.

  Update from 2.20
    Slave: * Replace transfercredits.sh

           * In mss-slave.conf, add, below TRANSFERTAX:
             NO_TAXED=""

##########################################################################################

Package 2.20
Slave:
MSS-CORE
2.15.2  :  Fix: For some reason, the MOVENUKE="TRUE" setting was disabled. Dont know
                if I was testing something or what, but now its on again.

           New: Added some more information in the README regarding mixing glftpd v1
                and v2 sites in the same ring (DONT).

  Update from 2.19
    Slave: * Replace mss-core.sh

##########################################################################################

Package 2.19
Slave:
MSS-CORE
2.15.1  :  Fix: When using KEEPSTATS=TRUE, two lines in mss-core.sh were set to 'echo'
                instead of 'proc_highdebug'. This shouldnt have caused any problem, but 
                we (LPC and I) think crontab simply gets overloaded with lines to mail
                so it just cut the script short so it never finished. It also does not
                send any mails in this case.

 Update from 2.18
   Slave: * Replace mss-core.sh

##########################################################################################

Package 2.18

Slave:
MSS-CORE
2.15    :  Add: If you had a very large actionfile (site down for a while) or a very slow
                system, so that the actionfile execution took more then an hour, the lockfile
                was removed. Hence, mss-core.sh actionfile ran again and said "Hey, theres
                a .notdone actionfile here. Better work on that one first" even though there
                still is a process working on it.

                This is what caused some of the problems atleast 2 people have noticed where
                their actionfile grew to about 500 meg or more, filling the HD.

                Anyway, now made it so that for every 10 actions taken, the timestamp on
                the lockfile is updated. That way, as long as mss-core.sh is running, the
                lockfile will not be removed (since it shouldnt get to be 60 minutes old).

           Chg: Also changed the time it takes for it to remove the lockfile to 24 hours.

           Fix: Changed how it checks the permissions on the $TMP dir. Should work on all
                distros now.
                Also, it will no longer set the PERMS defined on the $TMP dir. The dir will
                always be 777 and the files within 666.
                Thanks Chro for the report.


TRANSFERCREDITS
2.6.3   :    ?: Apparently I made a 2.6.2 and forgot to write what I did in it.

           Fix: But the 2.6.3 fix is for TRANSFERTAX. If set to below 10%, it would crap
                out and withdraw 50% when set to 5%, etc.

 Update from 2.17
   Slave: * Replace mss-core.sh

          * Replace transfercredits.sh



##########################################################################################

Package 2.17

Slave:
MSS-CORE
2.14    :  Add: When moving stats, the behaviour is this:
                * Make a new temporary userfile for the hub in the $TMP dir of the slave.
                * Move all stats to this temporary file.
                * Reset all stats to another temporary filename, ment for the slave.
                * Verify the integrity of both userfiles.

                If all is well;

                * Check the locking (username.lock) on both sites. If not locked, lock them
                both and then
                * Copy the file to the hub.
                * Copy the file to the slave.

                Now, with all the checking, we kinda assume that the move to the hub
                went ok. But it apparently didnt 100% of the time for some NFS users (stale
                nfs handle, etc).

                SO! Now it will copy the file to the hub. If the file does not match the
                temporary file we just copied, it will retry the copy for up to 10 more
                times. If the copy still failed after that, it will skip that user and leave
                the stats on the slave for the next attempt.
                It will use the MD5SUM binary to check if its the same file.

           Add: The 'site mss delreports', issued from the hub has been given higher priority.
                Problem was if you ran 'site mss delreports' and then 'site mss replicate' or
                something, the result from the replicate was not in the report since it ran that
                one first and 'delreports' last.

           Chg: "Warning: Found previosly deleted userfile for: ..." messages have been moved to the
                 HIGHDEBUGLOG instead of the normal LOG. Also includes instructions for how to "fix" it.


TRANSFERCREDITS
2.6.1   :  Fix: If TRANSFERTOHUB=FALSE you might get the wrong helptext when running 'site transfer'.
                Its only cosmetic but fixed anyway. Thanks Dandd- for noticing it !

           Fix: If you had SLAVE_INTERNAL enabled, it could mess up the credits if the receiving section
                were in the negative and the move put it in the positive (it didnt).
                Thanks osiris for the report.

           Chg: If SLAVE2SLAVE is enabled, you can now define the hub as the slave to move to.
                It will then move the credits as if you hadnt defined any slave (instant).
                No big change but it should make it a bit easier for your users.
                Thanks to LPC for the suggestion.


 Update from 2.16
   Slave: * Replace mss-core.sh

          * Replace transfercredits.sh


##########################################################################################

Package 2.16

Updated the README in the actionfile section to reflect the new command added and
its usage (see below). Also added some information to other scripters in it for how
they can use the actionfile system to sync users in their own scripts, etc.
Also updated section 2.4 for the new version of mss-rlscomp.sh.


Slave:
MSS-CORE
2.13    :  Add: Added a new manual command: ./mss-core.sh cleanup (debug)

                If, for example, you had executed a command or similar
                that caused mss-core.sh to hang when running actionfile
                ( for example, 'site mss runcmd -all top' )
                the actionfile is not cleared. This is because its smart and can detect
                if an actionfile has not yet been processed completely (incase of 
                shutdown/powerloss etc).

                Since the actionfile wasnt removed, it was reprocessed and the "hang"
                will happen again.

                Executing mss-core.sh cleanup (debug) from the slave will remove any
                queued actionfile or "live" actionfile.
                This was added because it was hard to clean these up yourself since they
                are in 3 locations (live actionfile on the hub, being processed now and
                not yet completed).

                So, should you have problems with the actionfile system where the actionfile
                only grows and grows and never finishes, use this command on the slave(s).

           Add: To ease new installations of mss-rlscomp.sh on the slaves, mss-core.sh will
                now check if USERDEST and PASSWDDEST is set to
                drwxrwxrwx. If not, it will chmod 777 them and log it in the highdebug log.
                It will also check the $TMP dir and if needed, run:
                chmod 777 $TMP; chmod 666 $TMP/*
                Also, if RLSCOMPLOG is defined, it will check that permissions are 666 on it
                as well. This should fix the problem most people have with mss-rlscomp.sh

           Fix: KEEPSTATS=TRUE only worked partially in the it moved the stats OK. Sadly it 
                moved the DAYUP stats to all other stats on the hub and left the stats nulled
                on the slave (not ever zeroes).

           Fix: When trying to sync a user and no userfile exists on the hub, it verifies if
                the user exists in the passwd on the hub. If he does, it means you have an
                entry in the passwd but no userfile.. It will then try to restore that user
                from the last hub backup if COPYLOCAL=TRUE. This has always been the case.
                Whats new is that it now checks if hes actually IN the backup files before
                trying to copy the userfile so you wont get annoying cp errors. 
                It will also log a bit better here.

MSS-RLSCOMP
0.8     :  Add: Added the ability for mss-rlscomp.sh to run as a cscript PRE QUIT in glftpd.conf.
                This adds the ability to move the stats for a user back to the hub whenever he
                logs out from the slave. Its "better" then adding it to zsconfig.h since it will
                also trigger if a user just logs on and back out again..
                A bit more overhead, but worth it. I use both ways.
                See section 2.4 in the README for full explanation.

                Since not everyone should get their stats moved this way (BNC accounts that log
                in, etc), a new option in mss-slave.conf was created:
                LOGOUT_EXCLUDE="User1|User2"
                Users added here will not cause a statmove when they log out.

Hub:
MSS-SITE
1.5     :  Add: Added a new command 'site mss cleanup'.
                It will tell all slaves to remove any .notdone or otherwise busted actionfiles
                and just quit.
                See changelog for mss-core above.
                This works because CLEANUP in the actionfile will have the highest priority
                when mss-core.sh runs actionfile, so even if the actionfile has 2000 lines of
                crap ahead of CLEANUP, it will still only do the cleanup and then quit.

           Chg: 'site mss replicate <script> <slave/-all>' has been changed
                to 'site mss replicate <slave/-all> <script>' to match the
                other similar commands (runcmd etc).


 Update from 2.15
   Slave: * Replace mss-core.sh

          * Replace mss-rlscomp.sh

          * Read section 2.4 in the README for how to enable the "new way" in glftpd.conf.
            Old way still works too so leave it in zsconfig.h

          * Add to mss-slave.conf, above VERBOSE=
             ## If loaded as a cscript in glftpd.conf, exclude these users (services etc)
             ## Not used if loaded in zsconfig.h, only on logout.
             LOGOUT_EXCLUDE="User1|User2"

     Hub: * Replace mss-site.sh


##########################################################################################

Package 2.15

Hub:
MSS-SITE
1.4     :  Fix: Readreports command fixed. If you had multiple slaves defined but there
                was no report from one of them, it would quit instead of viewing the reports
                from the other slaves.

           Chg: Double newlines between slave reports downsized to one newline =)

Slave:
Config
        :  Fix: Had made an error in the default config. Accidently put $FTP_DATA.EXT where
                it should have been $FTP_DATA_EXT.


 Update from 2.14
     Hub: * Replace mss-site.sh

##########################################################################################

Package 2.14

Slave:
MSS-CORE
2.12    :  Fix: When mss-core.sh was moving credits (either by automatic move after race
                or when issuing 'movecreds' from the shell), if the user had less then
                1024 KB credits, you'd get an error message when it tried to convert it
                to MB. 

                Thanks ChrCo for the report.

           Fix: The EXCLUDE in mss-slave.conf worked on the full path as 
                /glftpd/ftp-data/users/blabla, so if you excluded the glftpd user
                you excluded everyone on site.
                This has been fixed in that it reformats the EXCLUDE in the script
                from, example: 'default.user|glftpd' to '/default.user$|/glftpd$'.
                This is done automatically and no changes should be made to the EXCLUDE
                line. Still just 'username1|username2' etc.

                Thanks BoGuS for excluding the glftpd user =)

Hub:
MSS-POST
1.1    :   Fix: Fixed 'site purge *' for glftpd 2.0
                New option in mss-hub.conf for this: GL_VERSION=1 or 2.

                Thanks Kapsel for the report.

MSS-REPORT
1.1    :   Fix: Once it created the /glftpd/etc/msslogs/mss-slavestatus.db file with UP/DOWN
                status and you added more slaves to SLAVES in mss-hub.sh, those were not 
                added in the UP/DOWN list until they went down for the first time.
                It will now check on each execution that there is an UP or DOWN status on
                each slave defined.

 Update from 2.13
   Slave: * Replace mss-core.sh

     Hub: * Replace mss-post.sh

          * Add to mss-hub.conf, below LOG=
             # Version of glftpd. 1 or 2
             GL_VERSION=1

          * Replace mss-report.sh ( if using the report system ).

##########################################################################################

Package 2.13

Slave:
MSS-CORE
2.11    :  Fix: If you had multiple stat sections moved to the same section on the hub
                but did not have any stats in the first section, it would crap out and 
                not move the stats from the second one.
                Example. You had "0>0 1>0", but stat section 0 on the slave was 0 0 0, 
                it would not move the stats in section 1, even though they were not 0.

                Thanks osiris for reporting this and letting me borrow the box it happened
                on.

TRANSFERCREDITS
2.6    :   New: Added functionality for moving credits between sections on the slave if 
                you have multiple stat_sections with seperate credits.
                Please see the README for explanation ( search for SLAVE_INTERNAL & INTERNAL_ALLOW )

 Update from 2.12
   Slave: * Replace mss-core.sh

          * Replace transfercredits.sh

          * Add to mss-slave.conf, below DENY_SLAVES= :
             ## Move creds between stat section. See README for explanation.
             SLAVE_INTERNAL=""
             ## Access to moving between stat sections, space seperated.
             INTERNAL_ALLOW=""

Important note: If you have users on wkly_allotment, check out the following script. You
might need it: http://www.grandis.nu/glftpd/modules.php?name=News&file=article&sid=308

##########################################################################################

Package 2.12

Hub:
MSS-SITE
1.3     :  New: Added an option to config: ACCESS_RUNCMD=""
                This allows you to limit who has access to
                'site mss runcmd'
                Use the same format as in glftpd.conf with
                -username =groupname flag
                Example: ACCESS_RUNCMD="-turranius =SiTEOPS 1"

                Above would let user turranius, the group SiTEOPS
                and anyone with flag 1 to access 'site mss runcmd'

                Ofcourse, the user must also have access to 'site mss'
                as well. Thats the normal access level in glftpd.conf
                for the cscript.

           New: Another command added: VERSION.
                You use this like: site mss VERSION <slave/-all> <script>
                It will then try to find the version of the defined script on
                the slave and report this back to the hub, so you can read it
                with 'site mss readreports' directly from the hub.

                If you do not specify full path to the script, it will try to
                find it in the same directory as mss-core.sh is located in, on 
                the slave. Specifying full path works fine as well.

                For this to work, the line VER=<version>, VER="<version>" or
                VERSION=<version> must be in one of the first 3 lines in the
                script you are checking. All tur- scripts follows this standard.

Slave:
MSS-CORE
2.10    :  New: Added an option in the config: ALLOW_RUNCMD=TRUE/FALSE.
                With this, you can disallow RUNCMD's (added in previous version)
                from being executed on this slave. Nobody, even though
                they have access to run it from the hub, will be able to use
                this function on the slave where this is FALSE.

                This was added incase you have other people running slaves and they
                dont want people being able to execute basically anything on their
                box from the hub.

                Also a safety feature for anyone. If you dont plan on using RUNCMD,
                set this to FALSE just in case someone else gets access to mss-site.sh
                from the hub.

           New: Added an option in the config: SYNCTIME=TRUE/FALSE.
                With this on TRUE, whenever it syncs a user (not moving stats)
                it will also check when the user last logged on to this slave
                ( the TIME value for it ).
                If he should have logged on to the slave later then on the hub,
                the value on the HUB will be updated to the time thats on the slave.

                This way, any 'listidle' scripts or similar, running on the hub, will
                always show the correct time, and not just when he last logged on to the
                hub.

                Be adviced that when syncing users, we previosly only wrote to the userfiles
                on the slave. With this, it might also write to the userfile on the hub when
                updating time.

                Currently it only updates WHEN the user last logged on. Not how many times or
                similar.

                A manual command for mss-core.sh was also added for synctime.
                ./mss-core.sh synctime <user> (debug)
                will update the time on the hub with the time on the slave, should it be more
                recent.

           New: Added support for the actionfile command VERSION, added in mss-site.sh (see above).

           Fix: It would only process the last RUNCMD given, should it get more then one in a
                single actionfile. 

           Fix: Same error above but when replicating scripts. If you told it to update two scripts
                in one actionfile "run", it would only do the last one.

           Chg: In 2.9, I added the check that when replicating mss-core.sh, its always chmodded to
                755 so it wouldnt break anything due to bad permissions.
                Since mss-core.sh should only be executed as root really, this has now been changed
                to 700 instead.
 
 Update from 2.11
   Slave: * Replace mss-core.sh

          * Add to mss-slave.conf, below MSSREPL= :
            ALLOW_RUNCMD=TRUE
            (or FALSE, if you do not wish to allow runcmd from the hub)

          * Add to mss-slave.conf, below SYNCIP= :
            SYNCTIME=FALSE
            (or TRUE, if you want it to sync the TIME value on the hub)

   Hub:   * Replace mss-site.sh

          * Add to mss-hub.conf, below VERBOSE= :
            # Access to 'site mss runcmd'.
            # Same system as glftpd.conf with -username =group flag
            # Example: ACCESS_RUNCMD="-turranius =SiTEOPS 1"
            ACCESS_RUNCMD=""


##########################################################################################

Package 2.11

Hub:
MSS-SITE
1.2     :  New: Added command 'site mss runcmd <slave/-all> <command>'.
                This will allow you to tell one or all slaves to run any command.
                It will simply execute whatever you type as command.
                No safery checks are made here so if you do:
                site mss runcmd -all rm -rf /
                you can kiss all your slaves goodbye the next time they run
                mss-core.sh actionfile.

                If you make a mistake, remember that if you are fast, you can run:
                site mss cancel all
                and it will cancel any action you just told the slaves to execute.
                Dosnt work if they already picked up the actionfile though.

                Also, do not run commands that do not stop running automatically.
                For example:
                site mss runcmd -all top
                would halt mss-core.sh when it runs 'top'. It dosnt quit by itself.
                You would then have to manually kill mss-core.sh and
                clear out the SlaveName.actions.notdone file in /glftpd/etc on the 
                slaves or they will halt again the next time mss-core.sh runs.

                You can read the result of the command by executing:
                site mss readlogs
                after the slaves are finished executing it.

Slave:   
MSS-CORE
2.9     :  Chg: Small change to the replication system. If replicating mss-core.sh, it 
                will always set chmod 755 on it just to be safe. This is to safeguard
                against you replicating a mss-core.sh with the wrong permissions on it.

           New: Added the ability for mss-core.sh to run any command when running 
                'actionfile'. It gets the command to run from mss-site.sh on the hub
                ( site mss runcmd <command> )


 Update from 2.10.4
   Hub:   * Replace mss-site.sh
   Slave: * Replace mss-core.sh


##########################################################################################

Package 2.10.4

Slave:
TRANSFERCREDITS
2.5.2	:  Fix: Userfile integrity check didnt work for glftpd 2.0.
                Thanks Mo0ze for the report.

           Fix: When finding errors in userfile integrity, it didnt report the
                username in the log. Cosemtic error.
                Also added a "Please try again" echo, should those errors happen.

 Update from 2.10.3
   Slave: * Replace transfercredits.sh on the slaves.


##########################################################################################

Package 2.10.3

Slave:
MSS-CORE
2.8.3   :  Fix: Under certain circumstances, your stats could fuck up if you defined
                more then one section to move. This is now fixed.
                Thanks LPC for reporting it !

General:
        :  Updated the README with some info if you want to keep one config for all slaves
           but have some specific settings you want to keep seperated from each slave.
           ( Just move the specific settings into mss-slave.id instead of mss-slave.conf.
           If all the other settings are the same, you can replicate mss-slave.conf from
           the hub incase of changes. )


 Update from 2.10.2 package:
   Slave: * Replace mss-core.sh

##########################################################################################

Package 2.10.2

Slave:
MSS-CORE
2.8.2   :  Fix: In debug mode, when syncing RATIO, it showed "RATIO changed from 3 to "
           without showing what it changed it to. Only a display error.

           Fix: If KEEPSTATS=TRUE, then you would most likely get Does_Not_Exist errors
                on userfiles, fixed.

 Update from 2.10.1 package:
   
   Slave: * Replace mss-core.sh


##########################################################################################
# Previous version below (mss 2.10.1)
##########################################################################################

Package 2.10.1

Slave:
MSS-CORE
2.8.1   :  Fix: I checked for previously failed synced users by using:
                if [ -e "$TMP/ERROR.TEMPSTATS.*.NEW" ]; then
                This didnt work too well on gentoo amongst others ( I guess ).
                Changed to:
                if [ "`ls -1 $TMP | grep "ERROR\.TEMPSTATS.\"`" ]; then

TRANSFERCREDITS
2.5.1   :  Fix: Possible exploit with v2.2->2.5. Nothing bad so users couldnt get extra
                credits, but could still circument some of your rules.
                Thanks BoGuS for reporting it !

 Update from the 2.10 package:

   Slave: * Replace mss-core.sh
          * Replace transfercredits.sh

##########################################################################################
# Previous version below (mss 2.10)
##########################################################################################

Package 2.10

Hub:
MSS-POST
1.0     :  New: Added support for glftpd 2.0 and its two new commands
                CHGADMIN and GRPCHANGE.

                CHGADMIN will sync the /glftpd/etc/group file
                the ftp-data/groups files as well as the user specified.

                GRPCHANGE will sync the /glftpd/etc/group file and
                the ftp-data/groups files.

MSS-SITE
1.1     :  New: Just added another line in the help to show that
                issuing 'syncgroup' now also syncs the ftp-data/groups
                dir (woopie do).                

           New: Added a warning message if executed from shell since it then
                creates actionfiles owned by root. Cant change those from inside
                glftpd since its executed as the user in there.
                Not a problem if all the slaves are up to process/delete the 
                actionfile, but if one is down, mss-site and mss-post will fail.

Slave:
MSS-PONG
1.1     :  Fix: Added the same check that the other script have, in that if GLROOT
                is hard defined in it, it will check if were in glftpd. Not that its
                really needed since its not supposed to be running from inside glftpd
                but its nice when all scripts work the same way.

           Fix: It will now check if the msslogs dir exists before trying to write to it instead
                of getting an error if the hub is down.
                Errors are reported to HIGHDEBUGLOG, if defined in mss-slave.conf.

MSS-RLSCOMP
0.7     :  Fix: Error on FBSD fixed. When checking if VERBOSE was TRUE, it used
                if [ "$VERBOSE" == "TRUE" ]; then
                FBSD dosnt like == apparently. Changed to = instead.

TRANSFERCREDITS
2.5     :  New: Added option DENY_SLAVES= in mss-slave.conf.
                This is a list of slaves that the user can not transfer credits
                to if SLAVE2SLAVE is TRUE.
                Enter the exact names of the slaves, space seperated and the
                user can not initiate a slave2slave transfer to it from this slave.

           New: Added a little more logging here and there, like if the user tries to
                move credits to a non existing slave.

           Fix: The help text when running with no arguments got a small facelift.
                The example better reflects the setup. Ie, if TRANSFERTOHUB is FALSE,
                there is no example for 'site give' etc.

                If both TRANSFERTOHUB and TRANSFERTOSLAVE is FALSE it will grab a slavename
                for the 'site give' example because you probably have SLAVE2SLAVE=TRUE if so =)
                ( site transfer give <amount> <slave> )

                Also note that the arrow in "Current link is between..." changed to
                reflect this too. If both give and take is enabled, it will show '<->' as
                before. Otherwise its either '->' or '<-'.

MSS-CORE
2.8     :  New: Added support for glftpd 2.0. Its tested with v2.0BETA1

                It still support glftpd 1.3+, but you can NOT have a 
                mixed enviroment. Upgrade all sites or none of em.

                New options in mss-slave.conf for this.
                GL_VERSION. Should be either 1 or 2.
                GROUPSSOURCE. Path to groups on the hub.
                GROUPSDEST. Path to groups on the slave.
                GROUP* settings have no function if GL_VERSION is 1.

                The new dir 'ftp-data/groups' (GROUPSOURCE/GROUPDEST) is synced in
                the same way as the passwd and group files are, ie using the MD5SUM
                setting. Should be good enough I hope.

                Note that the reset binary has a bug in glftpd 2.0BETA1. It will remove
                some fields in the userfile and add another useless one. 
                So, until that is fixed, the integrity check on userfiles is modified
                to not check those fields. This will be change when its fixed in glftpd.

           Del: NOGADMINS option is useless now. There is really no use for this
                since all commands that edits the users should be disabled on the
                slaves anyway. Also, it might be nice to be able to check who is your 
                gadmin without having to log on to the hub to do it.
                ( Also it was annoying when trying to fix this for glftpd 2.0, hehe )

           Chg: Changed options for moving stats and nukes.
                Instead of:
                 MOVEALLUP=TRUE
                 MOVEALLDN=TRUE
                 MOVEWKUP=TRUE
                 MOVEWKDN=TRUE
                 MOVEDAYUP=TRUE
                 MOVEDAYDN=TRUE
                 MOVEMONTHUP=TRUE
                 MOVEMONTHDN=TRUE

                We now have:
                 MOVESTATS="ALLUP ALLDN MONTHUP MONTHDN WKUP WKDN DAYUP DAYDN"

                Instead of:
                 WITHDRAWNUKE=TRUE
                 WITHDRAWALLUP=TRUE
                 WITHDRAWMONTHUP=TRUE
                 WITHDRAWWKUP=TRUE
                 WITHDRAWDAYUP=TRUE

                We now have:
                 WITHDRAWNUKE="ALLUP MONTHUP WKUP DAYUP"

           Chg: If the lockfile exists, we previously checked if the mss-core.sh process was
                running and if we couldnt find it to be running, removed the lockfile.

                This didnt work 100% as I sometimes noticed that it said "the lockfile exists
                and mss-core running" even though it wasnt.
                Now changed. If the lockfile exists, it will check the age of it. If its more
                then 60 minutes old, it will be removed and mss-core will continue. If not = quit.

           Chg: Changed the entire proc_movestats() which moves the stats.
                Instead of 8 long if -> endif for each stat, it now has only
                one which it loops for each defined MOVESTATS. Much cleaner, faster
                and shortens the script by about 800 lines.

                Same for WITHDRAWNUKE.
                If you had WITHDRAWNUKE=FALSE, set it to "" and it will be disabled.

           New: Because of the above, I managed to get support for multiple stat sections.
                New option for this:
                STAT_SECTIONS="0>0"
                0>0 is how it worked before. Please see the README on this option for further
                explanations.

           Fix: Lowet found an error when the hub goes down. It tried to umount $USERSOURCE
                which, since package 2.6 (mss-core.sh 2.8), is not the valid one to umount.
                Rewrote most of the nfs and ping tests. It now umounts $FTP_DATA_EXT instead.
                Thanks mate =)

           Fix: When sending errors back to the hub, it now checks the the dir its writing
                too exists first. Otherwise you'd get a lot of mail when the mounts are down
                and it tries to send an error report back to the hub (real clever).

           Fix: 'mss-core.sh report' got a facelift to show the setup again. Its been left
                behind on some of the updates lately. Still not a function I'll prioritize =)
                For those who dont know what it is, run it from the slave; mss-core.sh report

           Fix: When setting this up from scratch on glftpd 2.0, I noticed some irritating
                stuff, like errors when trying to do backup if you hadnt created the backup
                dir manually first... So added a few more checks here and there that creates
                the needed dirs or atleast warns what to do.

           Fix: Some users have been getting errors when moving userfiles around.
                Something do to with not being able to keep the same permissions.
                Anyway, never found the problem, but added >/dev/null 2>&1 after each move.
                Hopefully that will remove the harmless error messages. If not, I'll have to
                change each "mv -f" to "cp -f" followed by "rm -f".

           Fix: Well, sort of anyway. If your / partition get full, you will end up with empty
                userfiles. It now runs a check, using 'df / -ml', that there is 100 MB free or more.
                If there is not, it will just quit and warn to the default log (and 'debug').
 
           Fix: If REPORTLIFE was TRUE, it sent a "I'm alive" back to the hub everytime it 
                synced a user instead of following the "only send every 10 action done" system.

           Fix: Fixed a log problem with the automatic move of credits introduced in the 2.9 package.
                Wouldnt show the previous value in the transferlog if the user had <1MB credits.
                Cosmetic fix only.

           Fix: It left temp files in your TMP dir. Specifically TEMP.user.IPDEL and TEMP.user.PRIGROUP1
                You can remove all TEMP.* and NEWUSER.* from your TMP dir if you have any.
                Thanks LPC for the report.

           Chg: When syncing users info, I used a lot of egrep -v to not read TAGLINE and USER
                etc. Thats not needed since we grep "^ALLUP " etc, so removed those egreps 
                which should speed it up a little.

 Update from the 2.9 package:
   Check the README conserning STAT_SECTIONS=

     Hub: * Replace mss-site.sh & mss-post.sh if running glftpd 2. Can skip them otherwise.
            See instructions in mss-post.sh for what to add to glftpd.conf.

   Slave: * Replace mss-core.sh
          * Replace mss-rlscomp.sh
          * Replace mss-pong.sh, if used.

          * In mss-slave.conf, remove:
             MOVEALLUP=TRUE
             MOVEALLDN=TRUE
             MOVEWKUP=TRUE
             MOVEWKDN=TRUE
             MOVEDAYUP=TRUE
             MOVEDAYDN=TRUE
             MOVEMONTHUP=TRUE
             MOVEMONTHDN=TRUE
             WITHDRAWNUKE=TRUE
             WITHDRAWALLUP=TRUE
             WITHDRAWMONTHUP=TRUE
             WITHDRAWWKUP=TRUE
             WITHDRAWDAYUP=TRUE
             NOGADMINS=TRUE/FALSE

            Add:
             GL_VERSION=1 or 2
             STAT_SECTIONS="0>0"
             MOVESTATS="ALLUP ALLDN MONTHUP MONTHDN WKUP WKDN DAYUP DAYDN"
             WITHDRAWNUKE="ALLUP MONTHUP WKUP DAYUP"
             GROUPSSOURCE=$FTP_DATA_EXT/groups
             GROUPSDEST=$GLROOT/ftp-data/groups

              GROUPSSOURCE/GROUPSDEST only matters if GL_VERSION is 2, but add it anyway.

             And to the bottom, below SLAVE2SLAVE, add
              DENY_SLAVES=""


##########################################################################################
# Previous version below (mss 2.9.1)
##########################################################################################

Package 2.9.1

Slave:
MSS-CORE
2.7.1   :  Fix: Trimlog command didnt work. Atleast not when specifying a megabyte value
                to trim the logs down to (CLEAR command still worked). Thanks Lowet for
                the report.

Hub:
MSS-POST
0.9     :  Fix: Just added a check. If GLROOT= is hardset it will check if were inside
                glftpd or not. If we are, it will unset GLROOT.

 Update from the 2.9 package:

     Slave: * Replace mss-core.sh

       Hub: * Replace mss-post.sh
              This isnt a required upgrade. If it works today, dont bother.


##########################################################################################
# Previous version below (mss 2.9)
##########################################################################################


Package 2.9

We now have the ability to let the users decide, for each slave, if they also
want to move back credits from the slave -> hub after each race.
Check section 3.5 in the README for a full explanation.
Thanks Gryphon for the idea.

Hub:
MSS-HUBTRANSFER
1.0    :  New: New script ment as a custom command for the hub.
               (see section 3.5 in the README)

Slave:
MSS-CORE
2.7    :  New: Added ability to move credits back to the hub based
               on the actionfile commmand CREDMOVE <username>.
               (see section 3.5 in the README)

          New: Added option FILES_TO_SYNC="" in mss-slave.conf.
               This enables you to sync any file that the slave has access to
               on the hub. 
               It can also sync files from slave > hub if you want that as 
               long as the slave can write to it.

               Search for FILES_TO_SYNC in the README for full explanation.

               Like for passwd and group, we use md5sum on the files to see when
               they are not up to date.

          Fix: Important fix. In the 2.5 package, an error crept in that I havent
               detected until now. When moving credits, we switched to use
               "^CREDITS [0-9]* " so that it only replaced the first number if you
               have multiple credits sections. That works fine until the user has 
               negative creds. Then its no longer CREDITS 0-9, its CREDITS -

               So, every "^CREDITS [0-9]*" has been replaced with "^CREDITS [-|0-9]*"

               It would give some strange results since the credits field would something
               look like "CREDITS -5000-5000" in the userfile.

          Fix: When running 'actionfile' it will now delay for 5 seconds before checking
               if the lockfile exists or not.
               Preciously, if you had 'actionfile' crontabbed to every minute and 'full' once or
               more each day, there was a chance that 'full' never ran because 'actionfile' started
               faster and created the lockfile, blocking 'full'.
               I hope a 5 seconds delay is be enough to remedy this.

TRANSFERCREDITS
2.4    :  New: In the help, when running 'site transfer' with no arguments, it
               will now display if automatic move of credits after a race is enabled
               or not for this slave.
               (see section 3.5 in the README)

          Fix: Important fix! Same as the important fix for MSS-CORE above.

MSS-RLSCOMP
0.6    :  New: Now writes 2 lines for each user that took part in the race.
               The moving of stats, like before and
               CREDMOVE <username>
               Weither it will actually move the credits is decided by mss-core.sh
               (see section 3.5 in the README).

 Update from the 2.8.1 package:

     Hub: * If you like what you've read for this new function and want to enable it,
            copy mss-hubtransfer.sh to the hub (same place as the other scripts).
            Make it executable with chmod 755
            Load it in glftpd.conf as follows:
             site_cmd transfer       EXEC    /bin/mss-hubtransfer.sh
             custom-transfer         *

          * If you dont want this function, simple dont load mss-hubtransfer.sh.
            Either way, you should still replace the scripts on the slave.

   Slave: * Replace mss-core.sh

          * Replace mss-rlscomp.sh

          * Replace transfercredits.sh
 
          * Add, below SLOWTIME, to mss-slave.conf:
             FILES_TO_SYNC=""            

##########################################################################################
# Previous version below (mss 2.8.1)
##########################################################################################

Package 2.8.1

Slave:
TRANSFERCREDITS
2.3.1  :  Fix: If SLAVE2SLAVE transfers were TRUE, you could not transfer credits back
               to the hub, only from slave to slave or hub to slave.
               Thanks LPC once again for finding this.

 Update from the 2.8 package:

     Slave: * Replace transfercredits.sh

##########################################################################################
# Previous version below (mss 2.8)
##########################################################################################

Package 2.8

Added a textfile called installorder.txt. Its just a guideline to which scripts to
be installed in what order. The README can be a bit overwelming for new users.

Hub:
MSS-REPORT (NEW)
1.0    :  New: This is a script that reads any possible errors sent from the slaves.
               It can also keep track of which slaves are up and down.
               When an anomaly is detected, it can echo this to irc, using glftpd.log
               and your sitebot.

               Please see the README (section 4.3) for full instructions on this.
               This is required for Slave to Slave credits-transfer (read on).

Slave:
MSS-CORE
2.6    :  Chg: Removed the HIGHDEBUG=TRUE/FALSE setting in mss-slave.conf.
               Just check if HIGHDEBUGLOG is defined or not. If not, its disabled.

          Chg: Previously, if CHMOD was set, it would chmod the LOG file on each
               run. Really no need for that so that was removed. Saves one line
               in the highdebug log each time its executed too =)

          Chg: IMPORTANT! Changed to more easely take care of glftpd 2.0 when it
               is released. Instead of mounting users to users.ext, you now need
               to mount the entire ftp-data directory instead.

               So, remove the export of users on the hub and instead export ftp-data
               (just remove /users from the current export).
               Then, run 'exportfs -r -a' to apply changes.

               On the slave, unmount users.ext. Create /glftpd/ftp-data.ext and
               change your fstab or however you mount to put ftp-data from the hub
               onto /glftpd/ftp-data.ext instead.

               If you get nfs errors, you might need to restart the nfs server
               on the hub.

               You'll need a new setting in mss-slave.conf above USERSOURCE:
               FTP_DATA_EXT=$GLROOT/ftp-data.ext
               Here you specify where you mounted the ftp-data.ext dir. Example above is the
               default setting and should be ok as long as GLROOT is defined as it 
               should in mss-slave.id

               Change USERSOURCE to USERSOURCE=$FTP_DATA_EXT/users
               Shouldnt need to change this one either.

               This will also make it possible to sync other things in the future,
               like the rules file etc.

          New: Added functionality to give creds to users with the actionfile
               system. Function in the actionfile is: GIVECREDS Username Amount_in_MB

               This is used for transfercreds for the slave -> slave transfer support
               (read on). It will log this to the same log as transfercredits.sh does
               as well as to the highdebug log if its on.

          New: Added ability to send messages back to the hub.
               Please see the README (section 4.3) for full instructions on this.
               This is required for Slave to Slave credits-transfer (read on).

TRANSFERCREDS
2.3    :  Fix: Added two more checks when the user tries to move all his credits.
               Had atleast one incident where a user tried to move all creds twice
               very quickly and had 0 creds left on the sourcesite on the second run.
               For some reason, both CREDITS fields were nulled on the sites.
               This should not happen again.

               Thanks LPC for the first report and ChrCo for the other.

          Del: No longer uses the TRANSFERTMP setting in mss-slave.conf. Instead it uses
               the default TMP setting. Really no reason to have both.

          New: Slave to Slave transfers added by public demand. It uses the actionfile
               system and mss-report.sh on the hub. Heres how it works:

               1: The user transfers 100 mb from Slave1 to Slave2 by executing the
                  following command from Slave1: site transfer give 100 Slave2

               2: It takes the credits from the slave, but instead of giving it to the
                  hub as it usually does, it writes it to Slave2.actions in the hubs
                  /glftpd/etc dir (PASSWDSOURCE, as seen from the slaves).
                  It writes: GIVECREDS username 100

               3: Slave2, when running with 'actionfile' the next time, reads that line
                  and gives 100 MB to the user.

               Pretty simple. But for this to work, Slave1 must know if Slave2 is up.
               Thats where mss-report.sh comes in. mss-report.sh, on the hub, creates a list
               of up/down slaves as well as all current slavenames.
               That is, if REPORTLIFE is set to TRUE in mss-slave.conf, so thats a requirement
               as well.

               transfercredits.sh reads this file and decides if the slave is up or not.

               When checking the help for transferstatus, it will also display this new feature
               if its enabled, as well as a list of all slaves.

               Only one new setting in the transfercredits part of mss-slave.conf for this:
               SLAVE2SLAVE=TRUE/FALSE.
               With FALSE, it works as it did before, IE only Slave->Hub and vice versa.

               The tax option added in 2.2 works on slave to slave transfers too.

               When showing the status after a transfer, the receiving slavename will be
               correct, but the credits there will be displayed as a questionmark since we
               cant read current credits on other sites. Source will show the deducted credits
               though.

               Only 'give' works with slave to slave transfers. Not take (cant verify that the
               user really has creds on any other slave).

               When mss-core.sh gives credits on the slaves, it will log to the same log as
               transfercredits does (if thats enabled). Figured its easier to spot any possible
               errors that way instead of having to look in two logfiles, although, you probably
               have to anyway (the send part is in Slave1 and the recieve part is in Slave2).

               Its also logged in the highdebuglog, if that is defined.


MSS-RLSCOMP
0.5    :  Chg: Added an extra check to see if were inside glftpd or not, just incase GLROOT is 
               hardset in the script itself (never should be unless you have a good reason).


 Update from the 2.7 package:

     Hub: * Read the README on mss-report.sh and set it up.

          * Add the following to the bottom of mss-hub.conf:
             ################################################################
             # mss-report.sh section                                        #
             ################################################################

             # Path to your REPORTDIR as defined on the slaves.
             REPORTDIR="$GLETC/msslogs"

             # Path to your glftpd.log (for announce).
             GLLOG="$GLROOT/ftp-data/logs/glftpd.log"

             # Check for errors reported.
             CHECKERROR=FALSE

             # Check if the slave reports in?
             CHECKALIVE=FALSE

             # Send error to GLLOG on first failure? If FALSE, wait one more time.
             SEND_ON_FIRST_FAILURE=TRUE

             # Send on alive again?
             SEND_ON_ALIVE=FALSE

             # Time to wait before checking
             WAITING_TIME=15

          * Change your NFS export to share the ftp-data dir instead of
            ftp-data/users

   Slave: * Umount users.ext, create /glftpd/ftp-data.ext and mount the hubs
             ftp-data there instead.
             Delete users.ext (MAKE SURE ITS NOT MOUNTED AND THAT ITS EMPTY).
             Update /etc/fstab (?!)

           * Replace mss-rlscomp.sh

           * Replace transfercredits.sh

           * Add the following to the bottom of mss-slave.conf (in the section
             for transfercredits):
              ## Allow slave -> slave transfers? Requires working actionfile system
              ## as well as mss-report.sh running on the hub.
              SLAVE2SLAVE=FALSE

           * Add the following to mss-slave.conf, above the transfersettings:
              ##########################################################################
              # mss-report.sh (hubscript) settings.                                    #
              ##########################################################################

              ## Level of errors to report back. 0=none, 1=link, 2=link & users, 3=all
              REPORTLEVEL=0

              ## Dir to report errors to.
              REPORTDIR=$PASSWDSOURCE/msslogs

              ## Send "I'm alive" when running 'actionfile' ?
              REPORTLIFE=FALSE

              ## Send report on full/fullsync/fullstats? 0 = no, 1 = on start, = 2 on complete.
              REPORTFULL=0

           * Add the following in mss-slave.conf above USERSOURCE:
              FTP_DATA_EXT=$GLROOT/ftp-data.ext

           * Change USERSOURCE in mss-slave.conf to:
              USERSOURCE=$FTP_DATA_EXT/users                      

           * Remove TRANSFERTMP setting from mss-slave.conf
             Make sure your current TMP setting is $GLROOT/tmp (atleast dont hardcode /glftpd)

##########################################################################################
# Previous version below (mss 2.7)
##########################################################################################

Package 2.7
Slave:
TRANSFERCREDS
2.2    :  New: Added 3 new options to mss-slave.conf for transfercredits.sh.

          TRANSFERTOHUB   = TRUE/FALSE. Setting this to FALSE will disable users
                            from transfering credits back to the hub from this
                            slave. Some people want one way transfers only so this 
                            is the easy solution (for you).

          TRANSFERTOSLAVE = TRUE/FALSE. Setting this to FALSE will disable users
                            from transfering credits from the hub to this slave.
                            Same as above, but the other way around.

                            Setting both this and the one above to FALSE will disable
                            the script totally. 

          TRANSFERTAX     = This is a percentage between 1-99. Its a tax which will be
                            deducted from the credits on the server thats being transfered
                            to. So, setting this to 10 and a user tries to transfer 100 MB
                            will cause it to deduct 100 MB on the source and give 90 MB on
                            the destination.

                            Setting it to "" or "0" will disable this function and no tax
                            will be deducted (as with older version).

                            A new line in the log will appear for each transfer, if you
                            have this enabled. Also, the help text has been updated to show
                            if it is on or not.

                            Tax is not being used when you execute transfercreds.sh from
                            shell (Dont see why you would anyway when mss-core.sh supports it).

                            Dont forget to inform your users in time before you make this
                            change. Not that I care (until I try to transfer myself. bwaa).

  Upgrade from 2.1
               Replace transfercredits.sh on the slave (replicate it perhaps?).

               Add 3 settings to mss-slave.conf on each slave, beneith AUTOMATICSTATUS=

                ## Enable to and from transfers.
                TRANSFERTOHUB=TRUE
                TRANSFERTOSLAVE=TRUE

                ## Tax. How much in % does it cost to move? 0 or "" to disable.
                TRANSFERTAX="0"
 
               With those settings, it will work as the older version did.
               If you skip those settings, it will also work like it did before, so
               no biggie (for now).


##########################################################################################
# Previous version below (mss 2.6.2)
##########################################################################################

Package 2.6.2
Hub:
MSS-POST
0.8    :  Fix: Another PURGE with no arguments fix. Previously, if it purged >2 users
               it would write 'PURGE user1 user2 etc' to the actionfile. mss-core.sh
               wasnt smart enough to split those up so only one of them got purged.
               The best way would be to fix that in mss-core.sh, but I felt it was much
               easier for everyone to fix it in mss-post.sh instead.
               So now, mss-post.sh will write one PURGE line for each user that was affected
               by the purge. mss-slave.sh will understand that fine.

               After intense testing, I hope this will be the last of the PURGE problems.

  Upgrade from 0.7
               Replace mss-post.sh on the hub.

##########################################################################################
# Previous version below (mss 2.6.1)
##########################################################################################

Package 2.6.1
Hub:
MSS-POST
0.7    :  Fix: Fixed the help for what to add to glftpd.conf. PURGE should be PRE
               to work 100%, not POST, since it checks all users who have flag 6 and
               adds them to the purge list, thats a bit hard if we load it as POST,
               since they are all gone before we do the check.. None found.
               Another way would be to issue a full sync on PURGE, but thats a bit
               overkill I think. Better this way.

               In other words, in <0.7, it would not purge the users from the slave
               if you issued 'site purge' without any specified user (all delled users).
               They'd be deleted on the next full sync though.

          Chg: Rewrote how it finds all deleted users before the PURGE.               

  Upgrade from 0.6
               Replace mss-post.sh on the hub.

##########################################################################################
# Previous version below (mss 2.6)
##########################################################################################

Package 2.6
Slave:
MSS-CORE
2.5    :  Chg: Big changes to moving stats. First, when moving stats, it still only
               supports the DEFAULT section (first 3 numbers), BUT it will no
               longer null any other stat sections you might have. For instance,
               if you have 2 stat sections on a slave (DEFAULT and one custom)
               the ALLUP field would look something like ALLUP 1 23 2 2 25 4.
               It will move the default section only, leaving:
               ALLUP 0 0 0 2 25 4

               Previously, it would have left: ALLUP 0 0 0
               glftpd would then, at the next userlogin, add the other 0's that
               was missing, making it ALLUP 0 0 0 0 0 0

               This now means that if you have a section you want to keep all stats
               from on the slave (perhaps not part of trial/quota), you can define
               it as a seperate stat_section in glftpd.conf and MSS will not touch
               it.
               Experts: sed -e "s/^ALLUP .*/ALLUP $new1 $new2 $new3/" 
                        was changed to
                        sed -e "s/^ALLUP [0-9]* [0-9]* [0-9]*/ALLUP $new1 $new2 $new3/"

               This applies to both the slaves and the hub, so you can have more then
               one stat_section on the hub as well.

               It also applies to the 'movecreds' function in mss-core.sh if you have
               more then one stat_section with separate credits.

               Oh yeah, when syncing RATIO, its changed too. Only syncs first number
               after RATIO and leaves any others intact.

               The above changes should give you a lot more flexibility when designing
               the sites and deciding which stats goes where, etc.

          New: Another much wanted feature! Keep the stats on the slave and still move
               them to the hub. How is this possible? mrfloppy_ had a bright idea.

               We simply add the stats to the hub, based on the DAYUP and DAYDN on the
               slave. We then set DAYUP and DAYDN to 0 on the slave, not touching the
               other values.

               For instance, if you upped 1000MB today, 1000MB is added to 
               DAYUP, WKUP, MONTHUP and ALLUP on the hub.

               Added a setting to mss-slave.conf for this: KEEPSTATS=TRUE/FALSE
               TRUE = New way.
               FALSE = Old way. Reset all stats on the slave.

               This has its advantages and disadvantages.
               The advantage, of course, is that you get to keep the stats on the slave,
               except for DAYUP and DAYDN, for whatever reasons you might have.

               The dark side of this is; we can never again use the other fields for moving
               stats since part of it has already been added to their respective fields on the
               hub. So if the reset binary runs on the slave and resets the DAYUP/DAYDN
               values and MSS has not yet synced the stats, they are gone (from the hub).

               If you ever set KEEPSTATS to TRUE and sync, you cant set it back to FALSE
               and hope everything is fine. It will then move all stats from all fields on
               the slave again, leading to the users getting way to much stats on the hub.
               If you want to change it back to FALSE, you need to reset everyones stats back 
               to 0 0 0 for every user on the slave and you need to do this BEFORE you let 
               MSS move the stats.

               In short, if the MSS link is down or the script does not run, reset should not
               be executed until its all moved back to the hub.

               It also means we HAVE to sync the stats in crontab, once a day and we have to
               do it BEFORE reset runs. We can not trust mss-rlscomp.sh here since it only
               runs on users after a race and will miss downloaded stats for those that just
               leeched.

               Check out the README on this feature if you plan to set it to TRUE.

          New: Added 6 new options so you can decide which fields to sync on the user.
               SYNCGENERAL=TRUE/FALSE
               SYNCLOGINS=TRUE/FALSE
               SYNCFLAGS=TRUE/FALSE
               SYNCTAGLINE=TRUE/FALSE
               SYNCRATIO=TRUE/FALSE
               SYNCIP=TRUE/FALSE

               So, if you want to have seperate FLAGS on the hub and slave, set
               SYNCFLAGS=FALSE and it wont sync them.
               If so, you also need to allow 'site change' on the slave (of course).

               Note that, for instance, LOGINS includes more then just the number of
               logins. Its all or nothing.

          Chg: The USENFS option changed. Its no longer TRUE to check nfs
               services on the hub. It now contains a list of the services to 
               check yourself so you can remove or add what it looks for to decide
               if the hub is up or not. Setting USENFS to "" or "FALSE" still disables 
               checking if the NFS server is up, so no different if you had it off before.

          New: When replicating scripts, it will now detect and report the version if its 
               written like VERSION= as well as VER= in the 1st or 2nd lines (woopi fucking do).

          Chg: Replaced one 'wc -L' and changed all awk to cut. For compability issues with fbsd.
               Might be more problems but I never heard of any, so...

          Fix: Running 'mss-core.sh integrity' from the slave sent the hubs integrity report back
               to the hub when it should not. It should only send the reports back if it was called
               from the actionfile system ( 'site mss integcheck' from the hub ).

  Upgrade from 2.4
               Replace mss-core.sh
                In mss-slave.conf:
                Change your USENFS setting. If its currently FALSE then you
                can either keep it that way or set it to ""
                If USENFS is currently TRUE, change it to something like
                USENFS="rquotad nfs nlockmgr mountd"
                Use 'rpcinfo -p hubip/hubname' to get a list of services
                that your hub uses.

               Add: 
                KEEPSTATS=FALSE
                 above MOVEALLUP=
                 ( if you forget or set ANYTHING else, it defaults to FALSE, as before. )

               Add:
                SYNCGENERAL=TRUE
                SYNCLOGINS=TRUE
                SYNCFLAGS=TRUE
                SYNCTAGLINE=TRUE
                SYNCRATIO=TRUE
                SYNCIP=TRUE
                 Below HIGHDEBUG=
                 ( If you forget or set ANYTHING else, it defaults to FALSE (not good). )


TRANSFERCREDITS
2.1    :  Chg: Changed to comply with other stat sections with seperate credits.
               It can still only move stats from the DEFAULT section (first value in
               the CREDITS field), but it not longer nulls any other sections.
               Experts:
               As with mss-core.sh, "s/^CREDITS .*/ .." was replaced by
               "s/^CREDITS [0-9]*/CREDITS $new/"

  Upgrade from 2.0.2
               Replace transfercredits.sh


Hub:
MSS-SITE
0.9    :  Fix: Using 'site mss cancel' on any other slave then the one defined first in
               the list caused a 'site not defined' error. Not a heavily used function so..

          Fix: Changed so it should work in fbsd by default.

          New: Added commands 'syncpasswd' and 'syncgroup' to force a sync check on those
               files on all slaves.

  Upgrade from 0.8 (or 0.8.1)
               Replace mss-site.sh


MSS-POST
0.6    :  Fix: Changed so it should work in fbsd by default.

  Upgrade from 0.5
               Replace mss-post.sh


OTHER
README :  Fix: The README got an overhaul to fix spelling errors and errors that might
               have arosed from changing functionality.

##########################################################################################
# Previous version below (mss 2.5.2)
##########################################################################################

Package 2.5.2
Hub:
MSS-POST
0.5    :  Fix: 'site purge' function wasnt functioning 100%. If you do not specify
               a user to purge, it will add all users with flag 6 to the actionfile
               for purging. Problem was that due to a spelling error, it always sent
               everyone with flag 6 for purging, even if you specified a single user.
               This cause them to be deleted on the slave. Next time you synced, they
               would either, 1: Be readded as a new user or 2: Be restored from the last
               slave backup if you have backing up enabled.

               Now, USERLSIT is changed to USERLIST and it dosnt occur anymore.

               Thanks arkie for reporting the problem and to void0 for the spelling
               error =)

  Update from 0.4
               Hub: Replace mss-post.sh

##########################################################################################
# Previous version below (mss 2.5.1)
##########################################################################################

Package  2.5.1
Slave:
TRANSFERCREDITS
2.0.2  :  Fix: If you were trying to transfer 'all' credits from a site where you had
               negative credits you'd get very poor. This only happened when using 'all'.
               A check was added for this and it will log it if it fails too.

               Thanks bogey for testing the fix =)

  Update from 2.0.1
               Slave: Replace transfercredits.sh
               (dont forget about the replication system which is excellent!)

##########################################################################################
# Previous version below (mss 2.5)
##########################################################################################

Package  2.5
Slave:
MSS-CORE
2.4    :  Fix: If multiple IP's were removed from a user, it would only delete one of them
               if nothing else was changed too. The next time it ran a sync on that user, it
               would remove the next IP, and so on. This was caused by the fact that it first
               checks if there already is a modified tempfile ( something else was changed )
               on this user. If it wasnt, it changed the original file into the temp file.
               Well, hard to explain, but its fixed by moving the check for the tempfile inside
               the 'for each IP' loop.

          New: Added new function. Report. Its just reporting all the settings and what they
               mean really. Good to make sure all options are set as you want them when
               setting up a new slave. As usual, run mss-core.sh from the slave to see
               all the options for it.

MSS-RLSCOMP
0.4     Chang: It now reads through the last 500 lines of the xferlog instead of the whole
               file. Much faster for sites with large xferlogs.

  Update from 2.4.2
               Slave: Replace mss-core.sh
                      Replace mss-rlscomp.sh

##########################################################################################
# Previous version below (mss 2.4.2)
##########################################################################################

Package 2.4.2
Slave:
MSS-CORE
2.3    :  Fix: Dont know if I should classify this as a fix since it didnt do
               much harm, but anyway..
               When merging NUKE stats, it added togheter all 3 numbers.
               Considering that the first number is the time of the last nuke, it
               should, naturally, not just be added together.
               So now, it will take the latest time and merge to the hub instead.
               If the latest nuke was on the hub, the time will not change.

          Fix: As with above, when merging stats, the third number is the SPEED. This
               shouldnt just be merged together either and, like above, it will now keep
               the highest number only.

      Rewrite: Finally took the time to rewrite some parts so that it dosnt 'cd' into
               the different userdirs when it needs something. It made it very hard to
               know where the script were when adding new functions etc. It now uses full
               paths everywhere (/glftpd/ftp-data/user/$user instead 
               of cd /glftpd/ftp-data/user, bla bla $user ).

          Fix: If all groups were removed from a user on the slave, the primary group
               was not added again from the hub. Not that you should add or remove groups
               from users on the slaves manually, but anyway.. =)

  Update from 2.4.1
               Slave: Replace mss-core.sh

##########################################################################################
# Previous version below (mss 2.4.1)
##########################################################################################

Package 2.4.1
Slave:
MSS-CORE
2.2.3  :  Fix: Problem with the feature introduced in 2.2.2, AUTONUKERESET.
               It first read in the bad values in memory, then changed the values in the
               file to 0 0 0. 
               Soooo when it continued, it still deducted the BAD stats from the stats on
               the hub. This effecivly destroyed my fix for bad nuke stats =(
               Anyway, should be fixed now. Thanks LPC (as usual) for finding it.

  Update from 2.4
               Slave: Replace mss-core.sh

##########################################################################################
# Previous version below (mss 2.4)
##########################################################################################

Package 2.4
Slave:
MSS-CORE
 2.2.2 :  New: You all read about the bug with nukestats I guess? Well, glftpd bugs
               the nuke values sometimes. This leads to the third NUKE value, which
               happens to be MB nuked, getting too big ( were talking TB's here ).
               Now, if you had WITHDRAWNUKE on TRUE, meaning it should deduct the
               nuke values from the stats on the hub, it wouldnt like those error
               values.

               Previosly, I skipped moving stats from that user and logged it, telling
               you to reset the NUKE values on that user back to 0 0 0, but thanks to an idea
               from ragusallad, we now have an option to reset those values automatically.
               The new setting is called AUTONUKERESET in mss.slave.conf. Setting it to
               TRUE will reset NUKE values to 0 0 0 on the slave IF ITS OBVIOUS that it
               is wrong.
               Leaving that option out of the config will default to FALSE, meaning it 
               will still act as it did before, ie warn and skip (duck and cover =)).

               Due to how the script is built, it will not reset them if it has no stats
               to move back to the hub. It will reset it as soon as it does though.

               A quick way to check if you have error nuke fields is to execute this:
               grep "^NUKE " /glftpd/ftp-data/users/*
               Have a look at the third value of each user. Thats the nuked amount in
               MB (not KB). If its like, 48758347588, you know its wrong.
               /glftpd/ftp-data/users/turranius:NUKE 1055099323 883 48705               
                                                     ^Lastnuked ^Files ^48GB Total
               Thats a good looking userfile.
               If you have more then one section, there will be 3 more numbers per section
               ( but then again, you couldnt move stats cause mss only supports one stat
                 section ).
               ( above example is not real ofcourse. Its 0 0 0, I swear. =)

TRANSFERCREDITS
 2.0.1 :  New: Couldnt transfer credits it it was in the negatives. Caused by me checking that
               it only got numbers when verifying credits and negatives are -475847. Fixed.
               Bug was introduced in v2.0

  Update from 2.3
               Slave: Replace mss-core.sh
                      Add to mss-slave.conf, below WITHDRAWNUKE:
                      AUTONUKERESET=TRUE
                      That is, if you have WITHDRAWNUKE on TRUE and want to use this
                      new function.

                      Replace transfercredits.sh

##########################################################################################
# Previous version below (mss 2.3)
##########################################################################################

Package 2.3
Slave:
TRANSFERCREDITS
 2.0   :  New: Rewritten pretty much from scratch. It had lagged behind on updates
               and was pretty badly designed. It now uses procedures like the rest
               of the mss family. That means it should be a bit faster on a few
               things.

               As a result of the above, checking status is much faster now.

               And as a result of the above (hehe), we now show before and after
               credits directly when someone moves creds. A new option added to
               disable that feature if you want, since it does take a little
               longer to make this check. 
               With that feature enabled, it will log before and after
               creds from both sites which should help if someone get their
               credits nulled for some reason.
               Which leads us to...

               Config part of transfercreds.sh moved to mss-slave.conf for easy 
               upgrades in the future. Also uses mss-slave.id for GLROOT.
               Check how to upgrade at the end of this versions changelog.

               I had disabled shell usage of this script a while back as it didnt work
               100%. It does now. I realize this isnt really needed since mss-core.sh
               handles that much better ( single or all users etc ), but I have a feeling
               someone might be using transfercredits.sh as a stand-alone script so thats 
               included it anyway. Simply run it from shell and it should display a
               slighly different helptext.

               Lockfile management got a lot better. Instead of just quitting after 
               finding a lockfile (user.lock), it will now retry once a second for up 
               to 10 seconds before giving up. If giving up, it will clear any lockfiles
               much like glftpd does it its locked for too long. This is exactly like
               mss-core.sh handles userfile locking.

               Added more checks at the start for required binaries. Mostly just a help for
               new users. A 'bc' test calculation added for verfication too.

               CreditAmount verification is faster. Before, it checked 5 or 6 things to make sure
               the user wasnt trying to screw up the script. Now, it simply tries to
               remove all number chars from the amount of credits. If its not empty, the
               user made a mistake. Much easier to check this way and probably a little
               safer too. Hardcoded to 6 chars tops as well. Any more and it will insult the
               user and abort.

               I also do the above check on digits when reading current credits from both
               sites so theres nothing wrong with the current credits value.

               Checking status is now logged with current values.

  Update from 2.2.2
               Slave: Move some of the settings from your current transfercredits.sh into
                      the bottom of mss-slave.conf. ONLY these are needed:
                      COMMAND=
                      TRANSFERLOG= (Previously called LOG only. Renamed).
                      TRANSFERTMP= (Previously called TMP only. Renamed).
                      BIN=
                      MINAMOUNT=
                      MAXAMOUNT=
                      AUTOMATICSTATUS=TRUE <- NEW. See README for info.

                      Once that is done, replace transfercredits.sh and try it from
                      shell.

                      Check the default mss-slave.conf for example.
                      Make sure that you do NOT move SOURCENAME and those settings from
                      your old transfercredits.sh. They are in mss-slave.conf already.

                      If you have transfercredits.sh in the same dir as mss-slave.conf and
                      mss-slave.id, you do not have to edit transfercredits.sh. If they
                      are not there, change paths in the script itself.
               

##########################################################################################
# Previous version below (mss 2.2.2)
##########################################################################################

Package 2.2.2
Slave:
MSS-CORE
 2.2.1 :  Fix: The movecreds command didnt work. Or well, it worked but since
               I hadnt removed the # from the mv line, it never actually copied
               the new userfiles after checking that they were ok.
               Thanks LPC for finding this one.

          Fix: When moving creds it made a check that the added value is not less
               then what it started with ( just a safety precausion ). If 
               a user had a lot of credits, it would spit out an error like:
               "integer expression expected". That was harmless but annoying.
               Fixed now in either case.

  Update from 2.2.1
               Slave: Replace mss-core.sh

##########################################################################################
# Previous version below (mss 2.2.1)
##########################################################################################

Package 2.2.1
Hub:
MSS-CUSTOMHUB
 0.1   :  New: This script is new and for the hub. Its a mss-custom.sh script but
               ment for hubs use for custom commands that you want to sync something
               on.

  Update from 2.2.0
               Install mss-customhub.sh if you want.

##########################################################################################
# Previous version below (mss 2.2.0)
##########################################################################################

Package 2.2.0
Slave:
MSS-CORE
 2.2.0 :  New: Added option PINGOPTIONS. Its the options it uses when pinging if
               PINGTEST is set to TRUE. Previosly, it was hardcoded to -w2 but 
               according to [Acido], that is not the case in, for instance, Debian.
               What we want it to do is send 2 pings only. Use -c2 in Debian.
               Check 'man ping' for how to limit the number of pings sent.

MSS-CUSTOM
 0.1   :  New: This script is new for the slaves. Edit it to check what it can do.

  Update from 2.1.9:
               Replace mss-core.sh
               Add in mss-slave.conf, below PINGTEST:
               PINGOPTIONS="-w2"

               Edit mss-custom.sh to see if its anything you can use.

##########################################################################################
# Previous version below (mss 2.1.9)
##########################################################################################

Package 2.1.9
Slave:
MSS-CORE
 2.1.9 :  Fix: Fixed "-eq: unary operator expected" errors. It was nothing dangerous
               just forgot to set a 0 on a variable when adding 'backup' in 2.1.8.

          Fix: When NFS check failed, it didnt give the right variables to test the
               connection manually. No biggie, just information error.

  Update from 2.1.8:
               Hub: Replace mss-site.sh

##########################################################################################
# Previous version below (mss 2.1.8)
##########################################################################################

Package 2.1.8
Hub:
MSS-SITE
 0.8   :  New: Added command 'dellogs' (site mss dellogs) to remove all fetched logs
               in the FETCHLOGSDIR. This will still leave the reports, just del the logs.
               Thanks LPC for the idea.

          New: Added command 'backup' (site mss backup) which tells all slaves to run
               'mss-core.sh backup' using the actionfile system.

Slave:
MSS-CORE
 2.1.8 :  New: Added support for backup option in mss-site.sh (above).

  Update from 2.1.7:
               Hub: Replace mss-site.sh
               Slave: Replace mss-core.sh


##########################################################################################
# Previous version below (mss 2.1.7)
##########################################################################################

Package 2.1.7
Slave:
MSS-CORE
 2.1.7 :  Fix: The first fix described in version 2.1.4 broke another function.
               Basically, when I switched dirs for it to start in, it gained back
               the ability to del users which is not on the hub anymore but it lost
               the ability to add new ones when running in full and fullsync (actionfile
               worked). Mostly new users noticed this when trying to sync the first time.

               I did a fix for this, but the whole 'switch dir' to where it should be
               needs a total rewrite cause its a mess. I need to add full paths to each
               argument instead, but thats a bigger project. I do not have time right now.

  Update from 2.1.6:
               Slave: Replace mss-core.sh. 

##########################################################################################
# Previous version below (mss 2.1.6)
##########################################################################################

Package 2.1.6
Slave:
MSS-CORE
 2.1.6 :  Fix: When moving stats in 'fullstats' and 'full', it no longer reads the 
               hubs stats from the local copy but directly from the hub users itself.
               First because it could take a few minutes between copying userfiles and
               it syncing a users stats, so any stats the user got on the hub in that time
               would be lost.
               Second, if you have multple slaves and you crontabbed either 'fullstats' or
               'full' on the same time, it could copy the files at the same time, leading
               to missing stats, because only the last slave to sync a user would count
               (providing the user didnt have 0 stats on the slave).

               Above only applies to those that use RUNLOCAL=TRUE, otherwise it always
               does everything from the hub directly.

               Yes, this means its a bit slower when syncing stats depending on the line, but
               its well worth it.

          Fix: RPCINFO was not in default mss-slave.conf. Forgot to add it I guess. Thanks LPC.

          Fix: USENFS no longer checks for 'status' on the hub NFS process list. Instead, it checks
               for rquotad. Not everyone showed status but NFS was working anyway. Thanks LPC.

          Fix: Changed a few awk's to cut instead. Should help on some distros although no
               report on awk failing. This applies to full, fullsync and fullstats.
               Also changed how it detects userfiles from grep -w FLAGS --> grep "^FLAGS ".

          Fix: Commented out the sleep 0.$RANDOM when checking lockfile. Search for $RANDOM and
               remove the # if you want to use it.

          Fix: The integrity command did not say which site it was checking in the logs. Might
               be nice if it did, yeah ?

  Update from 2.1.5:
               Slave: Replace mss-core.sh.
                      Check if you have RPCINFO in your mss-slave.conf. If not, add
                       RPCINFO=/usr/sbin/rpcinfo
                       below USENFS.


##########################################################################################
# Previous version below (mss 2.1.5)
##########################################################################################

Package 2.1.5
Slave:
MSS-CORE
 2.1.5 :  Fix: There was a short period of time between the checking of the lockfile
               and the creation of it, leading to the possiblilty to multiple mss-core
               running at once.

               The checking of lockfile and creation of it were moved next to each other and
               It will now sleep for 0.$RANDOM before checking lockfile (between 0-1 seconds).
               I have no idea if $RANDOM works on all distros. Just search for $RANDOM and
               comment out that line if you get fast sleep errors.
               Thanks to thulle for seeing this one.

          New: Added PINGTEST to config. This will do 2 pings on the hub before it starts.
               Problem was, mss-core checked if it could read the VERIFYUSERS on the hub.
               If the nfs/samba was down, it could hang the session totally (depending
               on mount options ofcourse. soft/hard etc)
               Anyway, now if it fails both pings, it will forcefully unmount both
               and USERSOURCE and PASSWDSOURCE. Note that REMOUNT is recomended when
               having this one true.

          New: Added USENFS to config. Like above, but this one will check that the
               NFS service is answering on the hub before continuing. You can use both
               PINGTEST and USENFS. If you do use NFS to mount stuff, USENFS is strongly
               recomended.
               Also added RPCINFO that is used to check upstatus of NFS.

               I'd like to add a USESMB check as well, but not sure how to remotely check
               if the services are up.

          New: Added DNSHUB to config. This is the name or IP of your hub. If you mount
               USERSOURCE and/or PASSWDSOURCE in /etc/fstab, you can leave this empty and
               mss-core.sh will check the name itself. If its not in there, set it.
               Just leave it empty and run once in debug mode. See if it complains.
               It's used for PINGTEST and USENFS.

          New: The function 'movecreds' introduced in 2.1.4 got an update. It can now move
               creds for a single user, a number of users or all users. 
               Run 'mss-core.sh movecreds' for explanation.


  Update from 2.1.4:
               Slave: Replace mss-core.sh.
               Slave: Add to mss-slave.conf, above REMOUNT,
                      PINGTEST=FALSE
                      USENFS=FALSE
                      RPCINFO=/usr/sbin/rpcinfo
                      DNSHUB=
           
                      Check out the README for more detailed instructions on the new
                      settings before setting any of them to TRUE.


##########################################################################################
# Previous version below (mss 2.1.4)
##########################################################################################

Package: 2.1.4
Slave:
MSS-CORE
 2.1.4 :  Fix: When doing full and fullsync, it entered the wrong starting directory.
               This made it so that some users were never deleted, since that module
               checked the hubs users directory vs the hubs users directory =)
               Now fixed so upgrade and do a full sync and perhaps it will delete someone.

          New: By request from Lowet, added a way to move everyones credits from the 
               slave back to the hub. Nice if you are removing a slave or similar.
               Dont test this unless you have to. It will piss users off I bet, hehe.
               ( mss-core.sh movecreds ).
               It will make a local backup first if backups are enabled in the config.

  Update from 2.1.3:
               Slave: Replace mss-core.sh only.


##########################################################################################
# Previous version below (mss 2.1.3)
##########################################################################################


Package: 2.1.3
Slave:
MSS-CORE
 2.1.3 :  Del: Previosly, there was a size check on the userfile. This was before
               I added the integritycheck on userfiles to make sure it really IS 
               a userfile. Thats not needed anymore and it only cause problems for
               people with different cluster sizes, so I removed the size check.

          New: If a binary is missing when running, it will now log that to the 
               highdebug log as well as output to screen. Should help those poor
               folks to get it to work from shell but not from crontab, ala ragusallad =)

  Update from 2.1.2:
               Slave: Replace mss-core.sh only.

##########################################################################################
# Previous version below (mss 2.1.2)
##########################################################################################

Package: 2.1.2
Slave:
MSS-CORE
 2.1.2 :  Chg: The message "Lockfile exists and mss-core.sh running" was moved to the
               highdebug log instead of normal log. Also shows in debug mode in shell.

TRANSFERCREDS
 1.2.1 :  New: Added a test calculation to make sure bc is working. It is mostly ment
               for new users so the userfiles does not get corrupted because bc was not
               set up beforehand. No other changes.

Hub:
MSS-HUB.ID
 NoVer :  New script. Holds GLROOT and SOURCENAME info for the hub.

MSS-POST
 0.4   :  New: Changed to use mss-hub.id instead of having settings in the script itself.
          New: Will look for mss-hub.conf in the same dir as itself if not specified.

MSS-SITE
 0.7   :  New: Changed to use mss-hub.id instead of having settings in the script itself.
          New: Will look for mss-hub.conf in the same dir as itself if not specified.


  Upgrade from 2.1.1:
               Slave:
               copy mss-core.sh and transfercredits.sh to your replication dir on the 
               hub, set executable perms on them and replicate it out with mss-site.sh 
               from inside glftpd on the hub.

               Hub:
               Copy mss-hub.id to the same place as mss-post.sh and mss-site.sh (/glftpd/bin).
               Edit mss-hub.id to suit your settings.
               Edit mss-hub.conf and remove SOURCENAME if you have that in there.

##########################################################################################
# Previous version below (mss 2.1.1)
##########################################################################################

Package: 2.1.1
MSS-CORE
 2.1.1 :  Fix: Lowet found an interesting feature. Some userfiles seems to get fudged up
               stats when nuking. The NUKE amount seems to roll over sometimes. As far as
               I can tell, it is glftpd who does this. To check if you have such users
               issue the following command from shell:
               grep "^NUKE " /glftpd/ftp-data/users/*
               Have a look at the last number in that list. That is nuked MB on that user.
               If that number looks too high, like 4294967291, that user got fudged 
               somehow, and probably not by me.
             
               In either case, I now do a check before moving nuke stats and withdrawing
               the nuke sum from the hub. If the nuked MB is more then 8 chars, I will NOT
               touch the NUKE value or withdraw any sum from hub. It will warn to the log
               though.
               To fix these users, set the NUKE value in the userfile to:
               NUKE 0 0 0.

  Upgrade from 2.1:
               copy mss-core.sh to your replication folder on the hub, set executable 
               perms on it and replicate it out with mss-site.sh from inside glftpd.


##########################################################################################
# Previous version below (mss 2.1)
##########################################################################################

Package: 2.1
GENERIC Update: A new function went into place with version 2.1. Replication.
                What this means is that you have one folder on the hub that contains
                the scripts for the slaves and incase of an update, you put the new files
                in there, execute a command from the hub and it is simply pushed out to the slaves.
                For this to work, DESTNAME had to be moved out of mss-slave.conf since
                that is different for each slave. So a new file was created; mss-slave.id.

                Also added GLROOT to mss-slave.id and set mss-slave.conf to use $GLROOT instead
                of /glftpd because that can also be different. mss-slave.id is the only file
                that should not be replicated, all others can.

                When replication is complete, mss-core.sh will send a report to the same logfile
                as integcheck uses. If it can find the version (VER=) in the replicated script, it
                will report that too. That way, after you sent out new scripts, you can check the
                reports on the hub (site mss readreports) to see that the slaves got them.

Slave scripts: 
 MSS-SLAVE.ID
 NoVer :  New: This file contains GLROOT and DESTNAME. It must reside in the same folder
               as mss-core.sh. It should never be replicated from the hub.

 MSS-CORE.SH
 2.1   :  New: Added functions to handle the replication system. Given the actioncommand
               'UPDATE <filename> destinationdir', it will copy that file to the slave 
               (note that UPDATE <filename> is the internal name for it. Nothing you use).
               If the file you are trying to push out from the hub already exists in the slaves
               dir, it will make a folder called mss-oldfiles in the same folder as mss-core.sh in in, 
               move the file there and then grab the new one. It will also report back to the hub 
               when it got it (as well as normal logging) so you can check from the hub that 
               all slaves got it.
          New: Will now read mss-slave.id for DESTNAME if it is not defined in mss-slave.conf.
          Fix: Moved down creation of the lockfile beneith all the checks so it does not leave
               the lockfile incase a check goes wrong.
          Fix: When adding and deleting groups, it would not see a difference between, for instance,
               the TRiAL and the TRiAL-2 groups, leading to some interesting results. With fullsync
               that did not matter but with the actionfile system it is important that it gets it 
               right on the first go. Fixed it by using grep -x "GROUPS $group" instead of just grep.
          Fix: When doing a fullsync from the slave, it entered the slaves userfolder instead of
               the hubs. This caused it to not add any new users. Worked with actionfile system though.
          Fix: Bad bug.
               When running a fullsync using RUNLOCAL (copying hub userfiles to slave)
               and it found an actionfile in the middle of the sync, it would sync that user from the
               copied version of the userfile. That file did not have the new info since the userfile
               was copied before the change was made on the hub. It now switches back to the local 
               userfiles on the hub, should I find an actionfile in the middle of a fullsync.
               
               If you are running in RUNLOCAL=TRUE mode, it will also make a new local copy of those users
               found in the actionfile so that the info does not get overwritten when it does the normal
               sync further down.
               (ie, userfiles are copied in fullsync. User nisse has not yet been synced but you add something
               to his userfile on the hub, causing mss-core.sh to pause the fullsync to do the actionfile. 
               Once he is synced from the actionfile, the fullsync will sync him again, but this time read
               from the local copy, so the changes the actionfile made are poofed.)
            
               Another fullsync would fix this problem, but you should not need to do fullsyncs if the
               actionfile system worked 100% (which I hope it does now).
               
 MSS-RLSCOMP.SH
 0.3   :  New: If MSSSLAVECONF is not defined, it will look for it in the same folder as
               mss-rlscomp.sh is executed.
          New: GLROOT will now be read from the mss-slave.id file if it is not defined
               in mss-rlscomp.sh.

 MSS-SLAVE.CONF
 NoVer :  New: MSSREPL=$PASSWDSOURCE/mssrepl
               (Added below FETCHLOGSDIR.)
               This is the replication folder on the hub, as seen from the slave.
               Must point to the same folder as MSSREPL= in mss-hub.conf
          Del: Deleted DESTNAME as this is now located in the mss-slave.id instead.
       Change: Changed all instances of /glftpd to $GLROOT. This is also in mss-slave.id now
          Del: Removed the GLETC setting for mss-rlscomp.sh as it now uses PASSWDDEST instead
               (no difference really. GLETC just got redundant when we changed /glftpd to $GLROOT).

Hub scripts:
 MSS-SITE.SH
 0.6   :  New: 3 new functions. delreports, repllist and replicate.
               Previously, the integcheck command would clear the reportfile each time it ran, since it
               was the only thing that used the report stuff.
               Now the replicate system uses it too, so integcheck should NOT clear it out.
               The delreports command will tell the slaves to clear it out instead.

               repllist will list all script in the hubs 'pushout' folder (MSSREPL in config).

               replicate will write to the actionfile, telling the slave(s) to get the 
               files from the hubs 'pushout' folder, and where to put them.
               (readreports will read the report send back from the slave when updating someting.)

 MSS-HUB.CONF
 NoVer :  New: MSSREPL="$GLETC/mssrepl"
               This is the local folder for replication files. As per default, its located
               in the /etc folder inside /glftpd.
               mss-site.sh will create this folder if it is not there.

** Update from 2.0.1:
         Hub: Replace mss-site.sh
              Add to mss-hub.conf, below MSSLOGS (see example .conf): 
               # Path to your mssrepl as defined on the slaves. For msssite.sh only.
               MSSREPL="$GLETC/mssrepl"
        
       Slave: Replace mss-core.sh
              Replace mss-rlscomp.sh
              Copy mss-slave.id to the same folder as mss-core.sh and edit the 2 settings in it.
              Edit your current mss-slave.conf and..: 
               Remove GLETC setting.
               Change all /glftpd to $GLROOT ( /glftpd/etc becomes $GLROOT/etc ) See example
               ( Take care not to change VERIFYUSER. That should still be 'glftpd' since its a user. )
               Remove DESTNAME setting.
               Add below FETCHLOGSDIR:
                MSSREPL=$PASSWDSOURCE/mssrepl


##########################################################################################
# Previous version below (mss 2.0.1)
##########################################################################################

MSS-RLSCOMP
0.2   :  Fix: mss-rlscomp.sh used EXCLUDE in mss-slave.conf to exclude dirs, but EXCLUDE 
              were also used for mss-core.sh to exclude users. Not good.
              Renamed the bottom EXCLUDE in mss-slave.conf to EXCLUDEDIR instead.
              Also added some crap code so if EXCLUDEDIR is empty, the script will still
              run.

  Upgrade from 0.1 : Replace mss-rlscomp.sh on the slave.
                     In mss-slave.conf, change the bottom EXCLUDE to EXCLUDEDIR (not the
                     top one).

##########################################################################################
# Older version below (mss 2.0)
##########################################################################################

TRANSFER:
1.2   :  Fix: Changed how it do calculations. expr that I used before could crap out
              on big numbers. I now use 'bc -l' instead.
              This means that you must have the binary 'bc' in /glftpd/bin.
              bc requires some libs, like libreadline.so.4.2 and libncurses.so.5
              so run a 'locate libreadline.so.4.2' and copy that file to 
              /glftpd/lib as well. Same for libncurses.so.5
              If you get errors about such a file when running it, do the same
              thing for that one.

         New: Added more logging to transferlog incase stuff goes wrong etc.
              It will log failures etc and give you the exact command the user made.
              This means a larger transfer log, but I feel its worth it.

         New: Transfer now usees the same method to lock userfiles as glftpd and will
              wait 1 second if it finds one one either site. After that, it will abort.
              As always, should it be locked or get an error, NO userfiles will be touched.

         New: We now do a general integrity check on the userfiles before transfering anything.
              It also does a check on the temp files with modified credits, before moving them
              as well as making sure the temp files can be moved.

         New: Changed all grep from '-w CREDITS' to "^CREDITS " to make it more secure.

MSS-CORE (previously mss.sh):
2.0    : Chg: Scripts renamed. Since we have scripts on both slaves and the hub now, it
              got confusing which script goes where. Now called mss-core.sh, mss-slave.conf
              mss-hub.conf etc.

         New: Rewrote logging to make it smaller and easier to read.

         New: highdebug got its own logfile so you can keep it on TRUE and still
              not clog up your normal logs. I found that when you needed to enable
              highdebug, it was often too late.

         New: Some more info when runnning it in HIGHDEBUG="TRUE" and DEBUG mode.

         New: Actionfile system (near instant replication. 1 min or so). See readme
              for how this works.
 
         New: mss-site (hub admin tool). Check readme for info on this one.

         New: mss-rlscomp (near instant moving of stats after race for zipscript-c).
              See readme for how this works.

         New: A couple of new execution arguments, including 'full' for doing
              fullsync followed by fullstats. Remember that fullsync takes a while
              so if you crontab it to do 'full' 2 minutes before midnight, stats
              might reset before it gets to the fullstats part.
              Better to cron it with 'fullstats' 2-5 minutes before midnight instead.
              Its always best to use a midnight script though. Examples of that can
              be found at Zio's webpage.

              Another one added is 'integrity'. What it does is check that all users
              on the hub exists in the hubs passwd file and vice versa. It also does
              a integrity check on each userfile to make sure they are not missing any
              critical fields.
              It then does the same check on the slave. 'mss.sh integrity debug'
              Note that this can be quite slow sometimes due to checking everything
              directly from the hub instead of from a local copy.

              There are a few others as well. Some are mostly ment for the ActionFile
              system incase you wonder what the heck they are used for.

         New: We had a flaw in earlier versions (imagine that). If you upload 200
              meg to a slave, the stats are moved to the hub & you are nuked on the
              slave, you would still get to keep your stats from that release since
              glftpd never puts stats in the negatives on the slave.

              We now check when moving stats: Does the user have any nukes on him (NUKE)?
              If so, subtract the number of bytes from the UP stats on the hub.
              Note: glftpd dosnt save the number of files nuked in the NUKE field. Only 
              how many TIMES the user was nuked. So we can only subtract the bytes. Files
              will be miscalculated, but hey, who cares, right ?

              Therefor, we have 5 new options in the conf to handle this:
              WITHDRAWNUKE=    Use this method at all? If FALSE, it will let the user keep 
                               his stats, providing they were moved to the hub before nuke.

              WITHDRAWALLUP=   Subtract nuke values from the ALLUP values on the hub?
              WITHDRAWMONTHUP= Subtract nuke values from the MONTHUP values on the hub?
              WITHDRAWWKUP=    Subtract nuke values from the WKUP values on the hub?
              WITHDRAWDAYUP=   Subtract nuke values from the DAYUP values on the hub?
              Observe that it will never set any values below 0 on the hub. If nuke value
              is higher then the current value on the hub, it will set it to 0 on the hub.
              If the value is already 0 on the hub, it wont touch it.

              All other UP values have already been moved when this runs, so it should get it
              right.

              A problem that can arise is if you nuke a release upped yesterday, for instance.
              If you then have WITHDRAWDAYUP=TRUE, it will subtract the nuke value from 
              todays upload stats, even though it was not upped today. 
              No other way to do it IMO and no biggie if it happens. If you like, you can
              keep WITHDRAWDAYUP on FALSE to only subtract from the others.

              Note: When upload, glftpd adds the stats to all 4 values (ALLUP, MONMTHUP etc)
                    so subtracting from all of them should be done. glftpd does not move
                    stats from, say, WEEKUP to MONTHUP. It only resets WEEKUP value to 0
                    at the time of a new week.

              If any of the settings in the conf is either missing or not set, it will default
              to TRUE.

         New: When verifying that link is up it will also try and grab the FLAGS
              field from the VERIFYUSER. This should help with those caching file-
              systems that make it look like the link is up although it might not be.

         New: If the lockfile exists it will now check if it is running.
              If it is not running, it will delete the lockfile and go.
              If not, it will quit as usual.
              This makes LOCKOVERRIDE obselete, so remove that from the config
              and delete any 'touch' you made on the hub at bootup ( see v1.1.4 ).

         New: If a user exists in the passwd file on the hub, but there are no userfile
              for that user on the hub, something baaad happened there. Previously, mss
              only logged it but now it will search through backups made from the local
              copy, starting with the newest one. If it find the user there, it will 
              restore that file to the hub automatically, then continue syncing.
              If not, it will log it with a warning, just like older versions.
              This is not 100% since the latest working backup might not be the one
              this particular slave restores. However, its better then a non working 
              userfile.

         New: If you delete and purge a user, a copy will still be saved in the 'deleted'
              folder on each slave. If you should add a user with the same name, it will no
              longer automatically restore that user. It will log the existance for each
              time it runs so you can either delete the copy or restore manually.
              This is so that it does not restore a new user with the same name as someone
              else, which you deleted 6 months ago =)
              
         New: Since I had atleast one report of corrupt userfiles (never experienced
              this myself), it will now use glftpds way of locking userfiles whenever
              it changes anything in them ( $USER.lock ).
              It will also check for the existance of any such file before changing
              anything on a user (incase glftpd has it locked). If it exists, it will
              try 10 more times with 1 second intervals. If its still there it will skip that
              user (means hes either busy on the server or there is a frelled .lock file).

         New: Also new because of above: When moving stats it creates a new userfile
              in the TMP folder which, when finish, overwrites the actual userfile on
              the hub. mss now do a generic check on that file to make sure it has all
              the fields it should have, part from IP and GROUP (since those can be
              non existant. Will give warning on no IP or GROUP though). 
              If this should fail, it will log it (normal LOG and when using debug)
              and leave the temp file there. It will paste the original userfile to it
              so you can check how it looked before and how the new file it created
              looks now. This should help debug any errors to userfiles.

              So, before moving stats, if there is something to move, it will check the 
              integrity of the userfile on the hub and the slave. If they are ok
              it will build the new userfiles for them. Once finished, it will check
              the integrity of both those new files and if ok, overwrite the ones on the
              hub and slave. If ANY of the files fail, no files will be overwritten.

              Previously, if it screwed up the writing to the hub, the stats would still
              be zeroed on the slave. Whaaa, whiny users.

         New: Like above, syncing normal user information changed in the same way. Instead
              of doing the changes directly to the userfile, mss now creates a temporary
              userfile which it does the changes to. Once everything is synced, it checks the
              integrity on the new file and if its ok, overwrites the userfile on the slave.
              Like above, should it go wrong, it will leave the ERROR file in your TMP
              folder with the original userfile pasted to the bottom of it.
              mss will not sync a user if he has an ERROR. file in TMP.

         New: If it fails to read any of the required fields in a userfile when syncing
              it will skip that user entirely and do nothing to him.
              Previously it would keep syncing the user anyway, even though something
              apparently went wrong.

         New: When adding a new user, it will make sure it got all the values in the
              newly zeroed userfile.

         New: Instead of just copying group and passwd right over the one on the slave
              it will now copy it to TMP. It will then run a md5sum on the new copy and
              if it does not match the original one on the hub, it will just deleted
              the version in TMP. If they do match, that means the copy went ok and it
              will be overwritted on the slave.

         Fix: Like for the transfercreds.sh script, it now uses 'bc' instead of 'expr'
              when calculating. expr have a naughty way of wrapping big numbers around.
              Try from shell: expr 1 + 10000000000
              Does that say 10000000001 ? Nope.
              Try: echo "1 + 10000000000" | bc -l
              Does that say 10000000001 = Yepp. bc good, expr bad, Kreaaaagh Bundulo.

         Fix: When deleting a user it verifies that the username is not in the passwd.
              problem was that it did not delete the user if he has a similar name
              as someone else. Ie, deleted the user Jocke, but he wasnt deleted
              becuase you had a user called ocke on site too.
              It now checks the whole name so cant go wrong.

         Fix: If it does not manage to umount a failed share, it will not
              mount it anyway. This should fix the multiple failed mounts that
              some people were experiencing.
    
         Fix: Had a few hardcoded 'sleep 0.1' that was changed to use SLOWTIME
              instead. Remember to set it to 0,1 if you get sleep errors. Not recomended
              that you set it to 0.

         Fix: Changed how it searches the values in the userfiles. It will always
              skip grep in the TAGLINE and USER fields, unless when syncing TAGLINE 
              ofcourse, so if people use, for instance, CREDITS in their tagline
              it wont matter. Same with user comments.
              All the greps have been changed from 'grep -w CREDITS' to
              grep "^CREDITS ". That should secure it even more from getting the
              wrong info.

         Del: Removed the ZIP option. It will always use tar's -z option now (zcf).
              Remove ZIP setting in config. Lame frigging option anyway.

-------------------------------------------------------------------------------
1.2   :  New: I split the script into proc_ sections so you can utilize
              the different parts in it seperetly. This makes it pissa.. err
              possible to sync or move stats from a single users.
              I also added some other goodies that you will see when you 
              run mss.sh from shell.
              This changes how you should put it in the crontab.

              This opens up the possiblily to have a post or pre command
              on the hub that executes something so the slave triggers the
              sync on that user only. So when you do site addip user blabla, it 
              will send something to the slaves so they run mss.sh singlesync
              (username) and it does not have to wait for the crontab to sync
              the whole bunch of users. There is no support for this yet though.

         New: I changed the BACKUPS option so it should work on all
              distros, regardless of ls output. Hope this works good.
              It was only the part that deletes the oldest backups that
              was changed.

         New: Changed how it backs up the HUBs userfiles. Previously
              it backed up the files from last times sync. Changed that
              so it first copies them to the slave and then backs them up.
              This only applies if you have COPYLOCAL on true ofcourse.
   
         New: Added more debug output when syncing passwd/group file.

 Update from 1.1.4: * Replace mss.sh.
                    * Change your crontab for syncing users and add
                      'fullsync' after it (mss.sh fullsync) without the ''.
                    * Change your crontab for stat moving and change
                      the 'stats' word to 'fullstats' (mss.sh fullstats).
                    * Run mss.sh from shell to see what else you can do.
                    * No changes to mss.conf

MSS:
1.1.4 :  Fix: When syncing LOGINS, it did not say what it synced too
              in the logs. Only a log error and no big deal.
         New: Added the option OVERRIDELOCK= to config file.
              See the README for full instructions about this one.
              Basically, its a way for the HUB to reset the lockfile
              on the slaves, should it exist.
              
 Update from 1.1.3: * Replace mss.sh.
                    * Add below LOCKFILE in mss.conf:
                      LOCKOVERRIDE=/glftpd/etc.ext/mss.lock.override.tmp
                      Make sure you check the readme for what it does.
                      If you do not add this, it will simply not be used.

MSS:
1.1.3 :  Fix: The LOGINS row in the userfiles were not synced at all
              due to 3 spelling mistakes. Thanks to Lowet for reporting
              that one. No harm done to userfiles though.

 Update from 1.1.2: Replace mss.sh only. No other changes.

MSS
1.1.2 :  Fix: PERMS is now set on a userfile the first time it is 
              added too. Previously, you might get write errors on
              the newly added user until the script ran again and 
              changed perms on all users.
              Setting PERMS= to "" will still disable this feature.
              Thanks to Cleese for reporting this one.

         New: Added a new option to mss.conf. REMOUNT=
              In case MSS can not find the verifyuser, it will attempt
              to umount users.ext and etc.ext (or whatever you named
              them too) and then try to mount them again.
              Only set this one on TRUE if the 2 paths show up when
              running 'df' AND you have the entries for them in /etc/fstab.
              Setting this to FALSE will act as it did before, IE stop the
              script if the verifyuser can not be found.
              This should help if the HUB is on a dynamic IP and the slaves
              often loose contact to it.

         Fix: chmod errors because of timeout on link will no longer be 
              mailed to the user running the script in the crontab.

         New: Changes PASSWDSOURCE and PASSWDDEST to point to the folder
              instead of the the file. I figure everyone had
              GROUPSOURCE and GROUPDEST to the same as PASSWDSOURCE and
              PASSWDDEST anyway. Removed GROUPSOURCE and GROUPDEST settings.

         New: When checking for deleted users and you used COPYLOCAL to copy
              the userfiles locally, it would switch back to checking at the
              HUBs folder instead of the locally copied one if a user could
              not be found in the local copy. It would then keep checking on
              the HUBs folder. It will now only check the user it could not
              find towards the HUBs folder, then continue in the local copy
              for the rest of the users (until it finds another one missing).
              This should make it slighly faster when it comes to checking 
              for deleted users, especially if you are on a slow line.

 TRANSFERCREDS:
 1.1   : Fix: In transfercreds.sh, it gave the wrong example line when
              running it from shell. Updated it to 1.1, but dont bother
              changing it, cause the change is so small and wont affect
              anything.

 Update mss from 1.1.1: Edit your current mss.conf:
                        1: Below ZIP=, add REMOUNT=FALSE (or TRUE).
                        2: Remove the line starting with GROUPSOURCE=
                        3: Remove the line starting with GROUPDEST=
                        4: Change PASSWDSOURCE and PASSWDDEST to reflect
                           the folder instead of the file (if you had
                           /glftpd/etc.ext/passwd, change to /glftpd/etc.ext ).
                        5: Replace the mss.sh file.


1.1.1 :  Fix: When backing up both hub and slave files, it often
              deleted the wrong backup files. It now does a full list
              of the dir (ls -tl) and use the 9th argument as the 
              dirnames. This is on Redhat and Mandrake. If you are
              using another distro, try ls -tl in a folder. The files
              should be sorted by date, with the oldest at the bottom.
              The filename should be word 9. For instance:
              -rw-r--r--    1 root     root         1630 Nov 26 20:59 CHANGELOG
              ^1st word       ^3rd     ^4rth        ^5th     ^7th     ^9th word

              If your distro shows it as another word number, edit mss.sh and 
              find this line:
  for old in `ls -tl $BACKUPDEST | grep -v deleted | tail -n $del | awk '{print $9}'`; do
              and change the the 9 to the actual word number.

  Update from 1.1: Only mss.sh changed. Just replace that one straite up.

1.1   :  Fix: Now deletes the oldest backups instead of the newest ones.
              ( Tihi ).
         Fix: Display error in debug mode when showing updated GENERAL field.
         New: Added the setting SHAREALLOTMENT. With this on TRUE, it will
              act as it did before. That is, if the user has 1 gig weekly 
              allotment on the hub, he'll get that on the slave(s) as well
              meaning the user doubles his weekly allotment.
              With it on FALSE, it will simply set the weekly allotment
              to 1000 Kb on the slave(s), thus setting the users CREDITS to
              1 Mb on the slave(s) when the reset bin is executed for new week.
              That means the user have to transfer new credits from the 
              hub to the slave(s) each new week.
         New: Put the config in a separate file called mss.conf for easier
              upgrades. 

  Update from 1.0: Either reconfigure it, or copy all the settings to a new
                   file called mss.conf. Put it in /glftpd/bin.
                   Add SHAREALLOTMENT=TRUE (or FALSE) to mss.conf.


1:0   :  Initial release.
