|
|
1.1 ! root 1: # Install SV cron system. You have to run this script as root. ! 2: # 12-30-91 Vlad ! 3: MAINDIR=/usr/lib/cron # main cron directory ! 4: SPOOLPAR=/usr/spool/cron # spool directory parent ! 5: SPOOLDIR=/usr/spool/cron/crontabs # spool directory ! 6: ALLOW=cron.allow # list of allowed users ! 7: DENY=cron.deny # list of denied users ! 8: ! 9: YES=y ! 10: ! 11: # Check if we are supperuser. 'logname' from COHware Vol.I ! 12: if [ "root" != `./logname` ]; then ! 13: echo You have to be superuser to run this script ! 14: exit 1 ! 15: fi ! 16: ! 17: # Install main cron directory ! 18: if [ ! -d $MAINDIR ]; then ! 19: mkdir $MAINDIR ! 20: chmod 700 $MAINDIR ! 21: fi ! 22: ! 23: # Users that allows use crontab ! 24: echo -n "Do you want to allow users to use cron [y/n] - ? " ! 25: read ANS ! 26: while [ $ANS = $YES ] ! 27: do ! 28: echo -n "User name ? " ! 29: read NAME ! 30: echo $NAME >> $MAINDIR/$ALLOW ! 31: echo -n "More users [y/n] - ? " ! 32: read ANS ! 33: done ! 34: ! 35: # Denied users ! 36: echo -n "Do you want to deny to use cron [y/n] - ? " ! 37: read ANS ! 38: while [ $ANS = $YES ] ! 39: do ! 40: echo -n "User name ? " ! 41: read NAME ! 42: echo $NAME >> $MAINDIR/$DENY ! 43: echo -n "More users [y/n] - ? " ! 44: read ANS ! 45: done ! 46: # Install spool cron directory ! 47: if [ ! -d $SPOOLPAR ]; then ! 48: mkdir $SPOOLPAR ! 49: chmod 700 $SPOOLPAR ! 50: fi ! 51: if [ ! -d $SPOOLDIR ]; then ! 52: mkdir $SPOOLDIR ! 53: chmod 700 $SPOOLDIR ! 54: fi ! 55: ! 56: # copy crond and crontab. To avoid problem with old cp, will use chmod. ! 57: if [ ! -f /etc/crond ]; then ! 58: cp bin/crond /etc ! 59: chmod 4511 /etc/crond ! 60: fi ! 61: if [ ! -f /usr/bin/crontab ]; then ! 62: cp bin/crontab /usr/bin ! 63: chmod 4511 /usr/bin/crontab ! 64: fi ! 65: ! 66: echo Installation Done. ! 67: echo To use a new cron system remove old crontab, create the new crontabs ! 68: echo "with crontab command. Make a changes in /etc/rc (see README.crond)" ! 69: echo "and reboot the system (just go to single user and back is enough)."
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.