Annotation of 43BSDTahoe/new/news/src/install.sh, revision 1.1

1.1     ! root        1: : '@(#)install.sh      1.18    9/24/87'
        !             2: 
        !             3: if test "$#" != 6
        !             4: then
        !             5:        echo "usage: $0 spooldir libdir bindir nuser ngroup ostype"
        !             6:        exit 1
        !             7: fi
        !             8: SPOOLDIR=$1
        !             9: LIBDIR=$2
        !            10: BINDIR=$3
        !            11: NEWSUSR=$4
        !            12: NEWSGRP=$5
        !            13: OSTYPE=$6
        !            14: 
        !            15: : Get name of local system
        !            16: case $OSTYPE in
        !            17:        usg)    SYSNAME=`uname -n`
        !            18:                if test ! -d $LIBDIR/history.d
        !            19:                then
        !            20:                        mkdir $LIBDIR/history.d
        !            21:                        chown $NEWSUSR $LIBDIR/history.d
        !            22:                        chgrp $NEWSGRP $LIBDIR/history.d
        !            23:                fi
        !            24:                for i in 0 1 2 3 4 5 6 7 8 9
        !            25:                do
        !            26:                        touch $LIBDIR/history.d/$i
        !            27:                        chown $NEWSUSR $LIBDIR/history.d/$i
        !            28:                        chgrp $NEWSGRP $LIBDIR/history.d/$i
        !            29:                done
        !            30:                ;;
        !            31:        v7)     SYSNAME=`uuname -l`
        !            32:                touch $LIBDIR/history.pag $LIBDIR/history.dir;;
        !            33:        *)      echo "$0: Unknown Ostype"
        !            34:                exit 1;;
        !            35: esac
        !            36: 
        !            37: if test "$SYSNAME" = ""
        !            38: then
        !            39:        echo "$0: Cannot get system name"
        !            40:        exit 1
        !            41: fi
        !            42: 
        !            43: : Ensure SPOOLDIR exists
        !            44: for i in $SPOOLDIR $SPOOLDIR/.rnews
        !            45: do
        !            46:        if test ! -d $i
        !            47:        then
        !            48:                mkdir $i
        !            49:        fi
        !            50:        chmod 777 $i
        !            51:        chown $NEWSUSR $i
        !            52:        chgrp $NEWSGRP $i
        !            53: done
        !            54: 
        !            55: chown $NEWSUSR $LIBDIR
        !            56: chgrp $NEWSGRP $LIBDIR
        !            57: 
        !            58: : Ensure certain files in LIBDIR exist
        !            59: touch $LIBDIR/history $LIBDIR/active $LIBDIR/log $LIBDIR/errlog $LIBDIR/users
        !            60: chmod 666 $LIBDIR/users
        !            61: 
        !            62: : If no sys file, make one.
        !            63: if test ! -f $LIBDIR/sys
        !            64: then
        !            65: echo
        !            66: echo Making a $LIBDIR/sys file to link you to oopsvax.
        !            67: echo You must change oopsvax to your news feed.
        !            68: echo If you are not in the USA, remove '"usa"' from your line in the sys file.
        !            69: echo If you are not in North America, remove '"na"' from your line in the sys file.
        !            70:        cat > $LIBDIR/sys << EOF
        !            71: $SYSNAME:world,comp,sci,news,rec,soc,talk,misc,na,usa,to::
        !            72: oopsvax:world,comp,sci,news,rec,soc,talk,misc,na,usa,to.oopsvax::
        !            73: EOF
        !            74: fi
        !            75: 
        !            76: : If no seq file, make one.
        !            77: if test ! -s $LIBDIR/seq
        !            78: then
        !            79:        echo '100' >$LIBDIR/seq
        !            80: fi
        !            81: 
        !            82: : If no mailpaths, make one.
        !            83: if test ! -s $LIBDIR/mailpaths
        !            84: then
        !            85:        cat <<E_O_F >$LIBDIR/mailpaths
        !            86: backbone       %s
        !            87: internet       %s
        !            88: E_O_F
        !            89: echo "I have created $LIBDIR/mailpaths for you. The paths are certainly wrong."
        !            90: echo "You must correct them manually to be able to post to moderated groups."
        !            91: fi
        !            92: 
        !            93: sh makeactive.sh $LIBDIR $SPOOLDIR $NEWSUSR $NEWSGRP
        !            94: 
        !            95: for i in $LIBDIR/ngfile $BINDIR/inews $LIBDIR/localgroups $LIBDIR/moderators \
        !            96:        $LIBDIR/cunbatch $LIBDIR/c7unbatch
        !            97: do
        !            98:        if test -f $i
        !            99:        then
        !           100:                echo "$i is no longer used. You should remove it."
        !           101:        fi
        !           102: done
        !           103: 
        !           104: for i in $LIBDIR/csendbatch $LIBDIR/c7sendbatch
        !           105: do
        !           106:        if test -f $i
        !           107:        then
        !           108:                echo "$i is no longer used. You should remove it after"
        !           109:                echo "changing your crontab entry to use sendbatch [flags]"
        !           110:        fi
        !           111: done
        !           112: 
        !           113: if test -f $BINDIR/cunbatch
        !           114: then
        !           115:        echo "$BINDIR/cunbatch is not used by the new batching scheme."
        !           116:        echo "You should remove it when all of your neighbors have upgraded."
        !           117: fi
        !           118: 
        !           119: cat >$LIBDIR/aliases.new <<EOF
        !           120: comp.os.fidonet                comp.org.fidonet
        !           121: net.sources    comp.sources.misc
        !           122: misc.jobs              misc.jobs.misc
        !           123: na.forsale             misc.forsale
        !           124: rec.skydive            rec.skydiving
        !           125: talk.philosophy.tech           sci.philosophy.tech 
        !           126: talk.religion          talk.religion.misc
        !           127: talk.rumor             talk.rumors
        !           128: EOF
        !           129: : if no aliases file, make one
        !           130: if test ! -f $LIBDIR/aliases
        !           131: then
        !           132:        mv $LIBDIR/aliases.new $LIBDIR/aliases
        !           133: else
        !           134:        : see whats missing
        !           135:        sort $LIBDIR/aliases | sed -e 's/  */   /g'  -e 's/             */      /g' >/tmp/$$aliases
        !           136:        sort $LIBDIR/aliases.new | sed -e 's/  */       /g'  -e 's/             */      /g' >/tmp/$$aliases.new
        !           137:        comm -23 /tmp/$$aliases.new /tmp/$$aliases >/tmp/$$comm
        !           138:        if test -s /tmp/$$comm
        !           139:        then
        !           140:                echo "The following suggested aliases are missing or incorrect in your"
        !           141:                echo "$LIBDIR/aliases file. It is suggested you add them."
        !           142:                echo ""
        !           143:                cat /tmp/$$comm
        !           144:                echo ""
        !           145:                echo "A suggested aliases file has been left in $LIBDIR/aliases.new"
        !           146:                echo "for your convenience."
        !           147:                rm /tmp/$$comm /tmp/$$aliases
        !           148:        else
        !           149:                rm /tmp/$$comm /tmp/$$aliases $LIBDIR/aliases.new
        !           150:        fi
        !           151: fi
        !           152: 
        !           153: : if no distributions file, make one
        !           154: if test ! -f $LIBDIR/distributions
        !           155: then
        !           156:        cat >$LIBDIR/distributions <<EOF
        !           157: local          Local to this site
        !           158: regional       Everywhere in this general area
        !           159: usa            Everywhere in the USA
        !           160: na             Everywhere in North America
        !           161: world          Everywhere on Usenet in the world
        !           162: EOF
        !           163: echo
        !           164: echo You may want to add distributions to $LIBDIR/distributions if your
        !           165: echo site particpates in a regional distribution such as '"ba"' or '"dc"'.
        !           166: fi
        !           167: 
        !           168: chown $NEWSUSR $LIBDIR/[a-z]*
        !           169: chgrp $NEWSGRP $LIBDIR/[a-z]*
        !           170: 
        !           171: echo
        !           172: echo Reminder: uux must permit rnews if running over uucp.
        !           173: rm -f /tmp/$$*

unix.superglobalmegacorp.com

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