Annotation of researchv10no/cmd/uucp/unused/SetUp, revision 1.1.1.1

1.1       root        1: #!/bin/sh
                      2: # This shell tries to set up all needed uucp system files.
                      3: # Since the names changed from previous versions, it copies those.
                      4: # For the Permissions, it will generate one if none exists
                      5: 
                      6: LIB=/usr/lib/uucp
                      7: PERM=$LIB/Permissions
                      8: LPERM=$LIB/PERMISSIONS
                      9: DEVICES=$LIB/Devices
                     10: DIAL=$LIB/Dialcodes
                     11: DIALERS=$LIB/Dialers
                     12: SYSTEM=$LIB/Systems
                     13: LSYS=$LIB/L.sys
                     14: LDIAL=$LIB/L-dialcodes
                     15: LDEVICES=$LIB/L-devices
                     16: LDIALERS=$LIB/L-dialers
                     17: POLL=$LIB/Poll
                     18: UUCP=uucp
                     19: 
                     20: if [ ! -f $SYSTEM ]
                     21: then
                     22:        if [ -f $LSYS ]; then
                     23:                cp $LSYS $SYSTEM
                     24:        else
                     25:                cp Systems ${SYSTEM}
                     26:        fi
                     27:        chown $UUCP $SYSTEM
                     28:        chmod 400 $SYSTEM
                     29: fi
                     30: 
                     31: if [ ! -f $DIAL ]; then
                     32:        if [ -f $LDIAL ]; then
                     33:                cp $LDIAL $DIAL
                     34:        else
                     35:                cp Dialcodes ${DIAL}
                     36:        fi
                     37:        chown $UUCP $DIAL
                     38:        chmod 444 $DIAL
                     39: fi
                     40: 
                     41: if [ ! -f $DIALERS ]; then
                     42:        if [ -f $LDIALERS ]; then
                     43:                cp $LDIALERS $DIALERS
                     44:        else
                     45:                cp Dialers $DIALERS
                     46: 
                     47:        fi
                     48:        chown $UUCP $DIALERS
                     49:        chmod 444 $DIALERS
                     50: fi
                     51: 
                     52: if [ ! -f $DEVICES ]; then
                     53:        if [ -f $LDEVICES ]; then
                     54:                cp $LDEVICES $DEVICES
                     55:        else
                     56:                cp Devices ${DEVICES}
                     57:        fi
                     58:        chown $UUCP $DEVICES
                     59:        chmod 444 $DEVICES
                     60: fi
                     61: 
                     62: if [ ! -f $POLL ]; then
                     63:        cp Poll ${POLL}
                     64:        chown $UUCP $POLL
                     65:        chmod 644 $POLL
                     66: fi
                     67: 
                     68: if [ ! -f $PERM ]; then
                     69:        if [ -f $LPERM ]; then
                     70:                cp $LPERM $PERM
                     71:                chown $UUCP $PERM
                     72:                chmod 400 $PERM
                     73:        fi
                     74: fi
                     75: 
                     76: if [ -f $PERM ]; then
                     77:        exit
                     78: fi
                     79: 
                     80: # Try to generate a Permissions file using uucp entries in /etc/passwd
                     81: 
                     82: > $PERM
                     83: set - `sed -n "/uucico/s/:.*//p" /etc/passwd`
                     84: 
                     85: for i
                     86: do
                     87:        echo "\tLOGNAME=$i\n"
                     88: done > $PERM
                     89: 
                     90: chown $UUCP $PERM
                     91: chmod 400 $PERM

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.