summaryrefslogtreecommitdiff
path: root/gnu/libexec/uucp/contrib/uudemon.shar
blob: 31a8fa60707c7d85864d64f16060aeb310c451fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  Poll uudemon.poll
# Wrapped by dburr@sbanet on Fri Jul 23 20:15:18 1993
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Poll' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Poll'\"
else
echo shar: Extracting \"'Poll'\" \(244 characters\)
sed "s/^X//" >'Poll' <<'END_OF_FILE'
X# HDB-ish poll file
X#
X# Format: <site><tab><hour1> <hour2> ...
X# ONLY ONE TAB BETWEEN FIELDS... more may work, but I have absolutely no
X# idea if it will work at all.
X#
X# comment lines (begin with `#') are ignored.
X
Xdschub	20 21 22
Xgd	20 21 22
END_OF_FILE
if test 244 -ne `wc -c <'Poll'`; then
    echo shar: \"'Poll'\" unpacked with wrong size!
fi
# end of 'Poll'
fi
if test -f 'uudemon.poll' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'uudemon.poll'\"
else
echo shar: Extracting \"'uudemon.poll'\" \(941 characters\)
sed "s/^X//" >'uudemon.poll' <<'END_OF_FILE'
X#!/bin/sh
X#
X# This is my impersonation of the HDB uudemon.poll script.
X# Yes, I know, this is very clumsy and clunky... ahh well, I've always
X# been better at C/pascal/etc than Shell programming... :(
X
X# change LIBDIR to where UUCP library/conf. files are
X# change SPOOLDIR to the UUCP spool directory.  It must be HDB-ish.
XLIBDIR=/usr/lib/uucp; export LIBDIR
XSPOOLDIR=/usr/spool/uucp; export SPOOLDIR
X
X###  no changes needed past here  ###
X
XHOUR=`date +%H`; export HOUR
X
Xif [ -f ${LIBDIR}/Poll ]; then
X	for SYS in `uuname`
X	do
X		CHOICES="`grep "^$SYS[	]" ${LIBDIR}/Poll | awk -F'	' \
X			'{ print $2 }'`"
X		DOIT="no"
X		for H in $CHOICES
X		do
X			if [ "$HOUR" = "$H" ]; then
X				DOIT="yes"
X			fi
X		done
X		if [ "$DOIT" = "yes" ]; then
X			if [ ! -d ${SPOOLDIR}/${SYS} ]; then
X				mkdir ${SPOOLDIR}/${SYS}
X			fi
X			chmod 755 ${SPOOLDIR}/${SYS}
X			touch ${SPOOLDIR}/${SYS}/C.${SYS}n0000
X			chmod 644 ${SPOOLDIR}/${SYS}/C.${SYS}n0000
X		fi
X	done
Xfi
END_OF_FILE
if test 941 -ne `wc -c <'uudemon.poll'`; then
    echo shar: \"'uudemon.poll'\" unpacked with wrong size!
fi
chmod +x 'uudemon.poll'
# end of 'uudemon.poll'
fi
echo shar: End of shell archive.
exit 0