summaryrefslogtreecommitdiff
path: root/tools/zsubscriptions
diff options
context:
space:
mode:
Diffstat (limited to 'tools/zsubscriptions')
-rwxr-xr-xtools/zsubscriptions61
1 files changed, 0 insertions, 61 deletions
diff --git a/tools/zsubscriptions b/tools/zsubscriptions
deleted file mode 100755
index b9a9e79..0000000
--- a/tools/zsubscriptions
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/sh
-#
-# author: "Jr" Spidell
-# date : 4/25/92
-#
-USAGE="zsubscriptions <user>"
-DBFILE=/usr/tmp/zephyr.db # where zephyrd dumps its data after a kill -FPE
-
-# test for root
-if test "`whoami`" != root
- then
- echo "you must be root to run this script"
- exit
-fi
-
-# test for no options
-if test $# -eq 0
-then USAGE="yes"
- echo "no options given."
- echo $USAGE
- echo ""
- exit
-fi
-
-# test for server node
-if test -z "`ps aux | grep zephyrd | grep -v grep | awk '{print $2}'`"
- then echo "you must be on a zephyr server (ie cap, fred)"
- exit
-fi
-
-# root doesn't have this in its path
-path=$PATH
-PATH=$path":/usr/local/bin:/bin:/usr/athena:"
-
-# dump the database
-kill -FPE `ps aux | grep zephyrd | grep -v grep | awk '{print $2}'`
-
-user=$1
-
-nawk ' BEGIN {user=""}
- {if ((NF > 1) && (NF < 4))
- {
- if (NF == 2)
- {
- user=$2
- next
- }
- print user,$0
- }
- }' /net/cap/usr/tmp/zephyr.db | \
-sed s/.cca.cr.rockwell.com//g | sed s/"("//g | sed s/")"//g |\
-sed s/"'"//g | sed s/":"//g > /tmp/users
-
-echo ""
-echo "$user is subscribed to recieve the following message types:"
-echo ""
-
-nawk ' {if ($1 == uname)
- {printf ("%-20s%-20s%-20s\n",$2,$3,$4)}}' uname=$user /tmp/users
-
-echo ""