Xref: utzoo alt.hackers:263 alt.sources:2992 Path: utzoo!utgpu!cs.utexas.edu!uwm.edu!rpi!julius.cs.uiuc.edu!wuarchive!udel!princeton!njin!rutgers!apple!mips!dd From: dd@mips.com (Slack is full of contradictions.) Newsgroups: alt.hackers,alt.sources Subject: Re: SPARCstation Monitor Message-ID: <443@spim.mips.COM> Date: 9 Jan 91 22:54:59 GMT References: <17394@brahms.udel.edu> Sender: news@mips.COM Followup-To: alt.hackers Lines: 88 Approved: news@rutgers.rutgers.edu Nntp-Posting-Host: slack.mips.com Originator: dd@slack.mips.com In article <17394@brahms.udel.edu> gdtltr@brahms.udel.edu (root@research.bdi.com (Systems Research Supervisor)) writes: > > Just get a SPARC? Miss the blinking LED's on your old Sun-3? > > Try blink.c ! I think it's more interesting to do this with a shell script... #! /bin/sh # $Header: sunbell,v 1.6 90/02/14 18:43:55 david Exp $ # ring the bell or rotate the LEDs on a Sun keyboard # D. DiGiacomo if sun ; then : else echo "`basename $0`: not a Sun" exit 1 fi if [ -f /lib/ld.so ] ; then # SunOS 4.x belldev=/dev/kbd else # SunOS 3.x belldev=/dev/bell if [ ! -c $belldev ] ; then echo "$belldev does not exist" echo "try \"mknod $belldev c 12 2; chmod 666 /dev/bell\"" exit 1 fi fi if [ ! -w $belldev ] ; then echo "`basename $0`: $belldev is not writable" echo "(try \"chmod 666 $belldev\")" exit 2 fi if (echo "x" > $belldev) 2> /dev/null ; then : else echo "`basename $0`: cannot write to $belldev" echo "(no keyboard connected?)" exit 3 fi case $# in 0) set - $0 ;; esac case "$1" in *bell*) echo -n "beeeeeeeeeep!" | tr 'bp!' '\002\003\013' > $belldev ;; *[lL][eE][dD]*|*) # rotate LEDs -- type 4 only case "`type usleep`" in *not*found) sleep="sleep 1" ledpat="8 2 4 1 4 2" ;; *) sleep="usleep 250m" ledpat="8 2 4 1 0" ;; esac setled=`echo -n a | tr a '\016'` noclick=`echo -n a | tr a '\013'` trap 'echo -n "${setled}0${noclick}" > $belldev; exit' 1 2 15 while true do for led in $ledpat do echo -n "${setled}${led}${noclick}" $sleep done > $belldev done ;; esac -- David DiGiacomo, MIPS Computer Systems, Sunnyvale, CA dd@mips.com