[bglug] bsod per linux

k|b|s kbs@bglug.it
Lun 9 Gen 2006 16:01:25 CET


Vista oggi su .sys
Fantastica ;^)

--8<-- CUT HERE --8<-- 
#!/bin/sh
# Blue screen of death implementation for Linux ;-)
# Author: Christian Steinruecken <cstein@suse.de>
VERSION="1.51"

self=`basename $0`

case "$1" in
1|2) msg="$1" ;;
-*) echo "Syntax: $self"
    echo "  Blue Screen of Death implementation Version $VERSION for 
Linux. "
    echo "  Resemblance to other operating systems in purely 
incidental."
    exit 0 ;;
*) msg="1" ;;
esac

hardclear() {
  a=""
  spec=" "
  while [ "${#a}" -lt "$R" ]; do
    a="${a}${spec}"
  done

  lc="1"
  while [ "$lc" -lt "$L" ]; do
    echo "$a"
    lc=`expr $lc + 1`
  done
  echo -n "$a"
  #echo -en "\033[H\033[K"
  echo -en "\033[H"
}

if test -t 0; then
  set -- `stty size`
  L="$1"
  R="$2"
else
  L="25"
  R="80"
fi

# language settings, etc.
case "$msg" in
1) HEAD="Windows"
LN1="A fatal exception 0E has occurred at 0028:C155482E.  The current"
LN2="application will be terminated."
L01="*  Press any key to terminate the current application."
L02="*  Press CTRL-ALT-DEL again to restart your computer. You will"
L03="   lose any unsaved information in all applications." ;;
2) HEAD="Linux";
LN1="Der schwere Ausnahmefehler 0E trat auf in Prozess 01 (/sbin/init 
&)";
LN2="Die aktuelle Anwendung kann nicht fortgesetzt werden."
L01="  * Drücken Sie RETURN um die Anwendung zu beenden."
L02="  * Drücken Sie STRG-ALT-ENTF um Ihren Computer neu zu starten. 
Vergessen"
L03="  Sie nicht, vorher laut zu fluchen." ;;
esac
# add your own bluescreens - if you have some 'real' ones
# (maybe even in different languages!) or some particularly
# good ones, please email me!  -->   tcs27@cam.ac.uk

echo -en "\033[m\033[44;37m\033[H\033[J"
L1=`expr $L - 1`
RR=`expr $R / 2 - ${#HEAD} / 2 - 1` # xpos of headline
LL=`expr $L / 2 - 5`
#RR=`expr $R / 2 - 3`

hardclear  # a bugfix for stupid terminals :-(
echo -en "\033[${LL}B"
echo -en "\033[${RR}C"
echo -e "\033[7m ${HEAD} \033[27m"
RR=`expr $R / 2 - 34`
#p=`echo -en "\033[${RR}G"`
p=`echo -en "\033[${RR}C"`
echo -e "\033[44;1m"
cat <<EOF
${p}${LN1}
${p}${LN2}

${p}${L01}
${p}${L02}
${p}${L03}
EOF
if test -t 1; then
  read
  echo -en "\033[${L}H\033[m"
  #echo -e "\033[KOh, and yes... Have a nice day!! ;-)"
else
  echo -en "\033[${L}H\033[m"
fi
--8<-- CUT HERE --8<-- 

-- 
byez, k|b|s >>
vim -c ":%s/^/xofdotyhtjlmvg/|:%s/[d]/@/Ig|:%s/jlm/./Ig|:normal ggVGg?"


Maggiori informazioni sulla lista bglug