1825775 Members
2057 Online
109687 Solutions
New Discussion

Re: SCCS

 
Ade Falusi_1
Occasional Contributor

SCCS

How do I commit a cron change to SCCS?. Why should I do this?.
4 REPLIES 4
Deshpande Prashant
Honored Contributor

Re: SCCS

Hi
Use sccs on cronjobs, if more than one person is going to edit it. Or if that's audit requirement.

To create new SCCS file use
#sccs create root-cronjob
To get file for editing use
#sccs edit root-cronjob
edit it using vi/ex...

To submit changes to SCCS and get new version use
#sccs delget root-cronjob.

Check man sccs.

Thanks.
Prashant Deshpande.

Take it as it comes.
Steve Post
Trusted Contributor

Re: SCCS

I don't use sccs. I guess I could. I keep every previous version of root's crontab file. Why? Because you discover some type of problem that (through research) began to happen on 13 Feb 2000. You go back to your list of old crontab files and discover you started running "badprogram" at 1am each night starting on 13 Feb 2000.

Reason number two to keep past versions: You accidentally delete the crontab file for root instead of modifying it. Or you forget what change you put in 10 weeks ago.

I never edit the crontab file directory. Instead I do this....
1.crontab -l > root.14Feb2001
2. ls -ltr root.* <--to find the last mod.
3. diff root.14Feb2001 root.02Feb2001
This makes sure no one was modifying the file since the last time I documented the mod.
4. vi root.14Feb2001 and make my changes
5. diff root.14Feb2001 root.02Feb2001 <--verifies I made the correct mods.
6. crontab root.14Feb2001

Hope this helps. steve
Bill Thorsteinson
Honored Contributor

Re: SCCS

I use RCS so I can have an executable cron submission
script. SCCS will clear the executable flag on checkin.
The first line is
#!/bin/crontab.

I edit this file and then run it. Then I can submit it to
RCS.

Alternatively you can have the script use a here
document and the submit itself. Try something
like this for SCCS.

#!/bin/sh

/bin/crontab << EOF
... cronjobs go here
EOF

sccs put $0
sccs get $0
chmod +x $0

# EOF

You edit the cron entries in the script then run it.
Michael Tully
Honored Contributor

Re: SCCS

Hi,

We use 'rcs' to do all of our version control.
It is used for sytsem configuration files and
scripts, including 'cron'
We find it far easier than 'sccs'. Attached is
an example of how to use it.

HTH
-Michael
Anyone for a Mutiny ?