home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / sysv386 / 16276 < prev    next >
Encoding:
Internet Message Format  |  1992-11-07  |  4.6 KB

  1. Xref: sparky comp.unix.sysv386:16276 comp.sys.att:2461 alt.sources:2410
  2. Newsgroups: comp.unix.sysv386,comp.sys.att,alt.sources
  3. Path: sparky!uunet!ferkel.ucsb.edu!taco!gatech!europa.asd.contel.com!emory!swrinde!zaphod.mps.ohio-state.edu!uwm.edu!wupost!usc!cs.utexas.edu!chinacat!chip
  4. From: chip@chinacat.unicom.com (Chip Rosenthal)
  5. Subject: Re: crashing SVR4 i386
  6. Organization: Unicom Systems Development, Austin, TX
  7. Date: Fri, 06 Nov 1992 05:54:24 GMT
  8. Message-ID: <1992Nov06.055424.1610@chinacat.unicom.com>
  9. References: <1992Oct29.203840.15893@bradley.bradley.edu>
  10. Lines: 151
  11.  
  12. In article <1992Oct29.203840.15893@bradley.bradley.edu>
  13.     brad@bradley.bradley.edu (Bradley E. Smith) writes:
  14. >does anyone know how to make a machine panic at will? from the console?
  15.  
  16. Some folks have always believed I'm a bit twisted.  Here is proof
  17. positive.
  18.  
  19. Attached is a device driver for /dev/panic.  Just say "cat /dev/panic"
  20. and your system will come tumbling down.  This is for a V3.2 system.
  21. I'm not sure if it would be applicable to your machine.  If so, you
  22. should be able to just unbundle this somewhere and then type "sh
  23. doinstall i".
  24.  
  25. I guess the normal disclaimer on freeware sources doesn't apply.
  26. This *will* break your system!
  27.  
  28. #! /bin/sh
  29. # this is a "shar" archive - run through "/bin/sh" to extract 6 files:
  30. #   Driver.c Makefile Master Node System doinstall
  31. # Wrapped by chip@chinacat on Thu Nov 05 23:44:30 CST 1992
  32. # Unpacking this archive requires:  sed test wc (possibly mkdir)
  33. # Existing files will not be clobbered unless "-c" is specified on the cmd line.
  34. if test -f Driver.c -a "$1" != "-c" ; then
  35.     echo "Driver.c: file exists - will not be overwritten"
  36. else
  37.     echo "x - Driver.c (file 1 of 6, 85 chars)"
  38.     sed -e 's/^X//' << 'END_OF_FILE_Driver.c' > Driver.c
  39. X#include <sys/errno.h>
  40. Xpncopen()
  41. X{
  42. X    panic("user-requested panic");
  43. X    seterror(EIO);
  44. X}
  45. END_OF_FILE_Driver.c
  46.     size="`wc -c < Driver.c`"
  47.     if test 85 -ne "$size" ; then
  48.     echo "Driver.c: extraction error - got $size chars"
  49.     fi
  50. fi
  51. if test -f Makefile -a "$1" != "-c" ; then
  52.     echo "Makefile: file exists - will not be overwritten"
  53. else
  54.     echo "x - Makefile (file 2 of 6, 68 chars)"
  55.     sed -e 's/^X//' << 'END_OF_FILE_Makefile' > Makefile
  56. XSHELL = /bin/sh
  57. XCC = cc
  58. XCFLAGS = -K -Zp4 -DINKERNEL
  59. X
  60. Xall:    Driver.o
  61. X
  62. END_OF_FILE_Makefile
  63.     size="`wc -c < Makefile`"
  64.     if test 68 -ne "$size" ; then
  65.     echo "Makefile: extraction error - got $size chars"
  66.     fi
  67. fi
  68. if test -f Master -a "$1" != "-c" ; then
  69.     echo "Master: file exists - will not be overwritten"
  70. else
  71.     echo "x - Master (file 3 of 6, 27 chars)"
  72.     sed -e 's/^X//' << 'END_OF_FILE_Master' > Master
  73. Xpanic    o    ico    pnc    0    0    1    1    -1
  74. END_OF_FILE_Master
  75.     size="`wc -c < Master`"
  76.     if test 27 -ne "$size" ; then
  77.     echo "Master: extraction error - got $size chars"
  78.     fi
  79. fi
  80. if test -f Node -a "$1" != "-c" ; then
  81.     echo "Node: file exists - will not be overwritten"
  82. else
  83.     echo "x - Node (file 4 of 6, 16 chars)"
  84.     sed -e 's/^X//' << 'END_OF_FILE_Node' > Node
  85. Xpanic    panic    c    0
  86. END_OF_FILE_Node
  87.     size="`wc -c < Node`"
  88.     if test 16 -ne "$size" ; then
  89.     echo "Node: extraction error - got $size chars"
  90.     fi
  91. fi
  92. if test -f System -a "$1" != "-c" ; then
  93.     echo "System: file exists - will not be overwritten"
  94. else
  95.     echo "x - System (file 5 of 6, 24 chars)"
  96.     sed -e 's/^X//' << 'END_OF_FILE_System' > System
  97. Xpanic    Y    1    0    0    0    0    0    0    0
  98. END_OF_FILE_System
  99.     size="`wc -c < System`"
  100.     if test 24 -ne "$size" ; then
  101.     echo "System: extraction error - got $size chars"
  102.     fi
  103. fi
  104. if test -f doinstall -a "$1" != "-c" ; then
  105.     echo "doinstall: file exists - will not be overwritten"
  106. else
  107.     echo "x - doinstall (file 6 of 6, 528 chars)"
  108.     sed -e 's/^X//' << 'END_OF_FILE_doinstall' > doinstall
  109. X:
  110. X
  111. Xcase "$1" in
  112. X
  113. Xu*)
  114. X    (
  115. X        set -x
  116. X        /etc/conf/bin/idinstall -d panic 
  117. X        rmdir /etc/conf/pack.d/panic
  118. X        rm /dev/panic
  119. X    )
  120. X    ;;
  121. X
  122. Xi*)
  123. X    (
  124. X        if [ -f /etc/conf/pack.d/panic/Driver.o ] ; then
  125. X            echo "$0: please perform uninstall first" 1>&2
  126. X            exit 1
  127. X        fi
  128. X        if [ ! -f Driver.o ] ; then
  129. X            make Driver.o
  130. X        fi
  131. X        set -xe
  132. X        mkdir panic$$
  133. X        cp Driver.o Master Node System panic$$
  134. X        cd panic$$
  135. X        /etc/conf/bin/idinstall -a panic 
  136. X        cd ..
  137. X        rmdir panic$$
  138. X    )
  139. X    ;;
  140. X
  141. X*)
  142. X    echo "usage: $0 { i[nstall] | u[ninstall] }" 1>&2
  143. X    exit 1
  144. X    ;;
  145. X
  146. Xesac
  147. X
  148. Xexit 0
  149. X
  150. END_OF_FILE_doinstall
  151.     size="`wc -c < doinstall`"
  152.     if test 528 -ne "$size" ; then
  153.     echo "doinstall: extraction error - got $size chars"
  154.     fi
  155. fi
  156. echo "done - 6 files extracted"
  157. exit 0
  158.  
  159. -- 
  160. Chip Rosenthal  512-482-8260 | I got the blues so bad one time
  161. Unicom Systems Development   | it put my face in a permanent frown.
  162. <chip@chinacat.Unicom.COM>   |   - Taj Mahal
  163.