Patrick Nelson <[EMAIL PROTECTED]> writes:

> OK so after browsing through the book Gordon suggested, I got an idea.  So I
> tested it out and it worked within the environment that I need it to.  Here
> is the way I did it:
>
> user="pnelson"
> cvslocal="/usr/local/cvsrep"
>
> mkdir .bon
> chown $user:cvs .bon
> cd .bon
> su $user -c 'cvs -d $cvslocal co bon/il'
> cd bon/il
> vi il.txt  <-did some editing and saved changes
> su $user -c 'cvs -d $cvslocal ci -m "Update change"'
> cd ../..
> su $user -c 'echo "y"|cvs -d $cvslocal re bon'
> cd ..
> rmdir .bon

Seems like quite a lot of huffing and puffing.  Although, I'm
certainly not an expert on cvs. wouldn't this have done the job?

First this assumes sudo is installed and your user is allowed to
sudo all.
========================================

CVSROOT=/usr/local/cvsrep;export CVSROOT

sudo cvs co bon/il
cd bon/il
sudo vi il.txt edit save
sudo cvs ci -m "Update change"

I don't think you'd really need the second and third sudos in there.
If I recall there is some kind of time limit involved.

========================================

Sudo is worth setting up for other reasons anyway.  The easy way to
set it up is to edit the /etc/sudoers file like this:

[...]
# Uncomment to allow people in group wheel to run all commands
%wheel   ALL=(ALL)   ALL
[...]

Then put your user in group wheel as an additional group.



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to