5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License, Version 1.0 only
7 # (the "License"). You may not use this file except in compliance
10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 # or http://www.opensolaris.org/os/licensing.
12 # See the License for the specific language governing permissions
13 # and limitations under the License.
15 # When distributing Covered Code, include this CDDL HEADER in each
16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 # If applicable, add the following below this CDDL HEADER, with the
18 # fields enclosed by brackets "[]" replaced with your own identifying
19 # information: Portions Copyright [yyyy] [name of copyright owner]
23 #ident "%Z%%M% %I% %E% SMI" /* from SVR4 bnu:Uutry 2.6.1.8 */
29 # This shell will start a uucico for the system given.
31 # -xN the debugging level for uucico (-x5 default)
32 # -r force the removal of the status file
33 # The output is put in /tmp/Name where Name is the name
34 # of the system name. A tail -f is performed after uucico is started.
36 STATUS
=/var
/uucp
/.Status
38 UUCICO
=/usr
/lib
/uucp
/uucico
40 if [ "`pwd`" != "/usr/lib/uucp" -a "$?" = 0 -a -x "./uucico" ]; then
41 echo "OK to execute uucico from current directory (`pwd`)? y or n? \c"
55 -c) shift; CLASS
="-c$1"; shift;;
56 -c*) CLASS
="$1"; shift;;
57 -x) shift; X
="-x$1"; shift;;
59 -r) REMOVE
="-f"; shift;;
60 -?
) echo "$0: unrecognized flag $1\nUSAGE: $0 [-r] [-xdebug_level] system";exit 1;;
67 echo "$0: system name required"
71 # check for existence in Systems file
72 # only accept match of full name
73 # (important because some names may be prefixes of others!)
75 XX
=`uuname | grep "^${SYS}$" `
78 echo "Invalid system name \"$SYS\""
86 # remove old status file (can't actually remove, since $STATUS isn't
87 # publicly writable, but zero-ing it out works fine)
88 if [ -n "$REMOVE" ]; then
89 cp /dev
/null
$STATUS/${SYS} 2>/dev
/null
92 echo "$UUCICO -r1 -s$SYS $CLASS $REMOVE $X >$STMP 2>&1&"
93 $UUCICO -r1 -s$SYS $CLASS $REMOVE $X >$STMP 2>&1&
96 # on heavily loaded systems, may take a moment for uucico
97 # to create debug file.