[cod] Beware...

Darren M darren at cpanel.net
Fri May 29 11:28:14 EDT 2009


> Maybe I'm misunderstanding your script, but won't the initial rm
> delete the clients' dirs, thus removing the config files as well as
> possible mods installed, etc?

The /home/users it rm's is a list created 2 lines after (or 4 lines
before, depending on which one); just a safety check to be sure you
aren't using an old list of users it would seem. He mentioned not
having any config files in the /home/install "seed" directory to
prevent overwriting users' config files. If you want to go this far
howver, you may want to just set the immutable flag on the main
binaries for the user as well so they can never change it.

> > update-files.bsh
> >
> > #!/bin/bash
> > rm -f /home/users
> > chattr -R +i /home/install
> > cd /home
> > ls -1p|grep /|grep -v install|cut -d "/" -f1 > users
> > for user in `cat users`
> > do
> > rsync -av /home/install/cod4 /home/$user/
> > done
> > rm -f /home/users
> > exit $?


More information about the cod mailing list