<xmp><!-- <body> --></xmp>


Linux logo

DSL utilities.

Home :: Info :: kurl :: runrman :: kopenvt :: shnetrik :: shlivecd :: bootuci :: Credits :: &c.


+++ kurl
#!/bin/sh
#========

echo ooo
echo external network protocol handler for firefox / opera
date +%G%b%d%a.%P%H:%M:%S
uname -srm

echo $1
KPROT=${1%%://*}
KHOST=${1##*://}
KHOST=$(echo ${KHOST} | sed "s_/__g")

# echo ${KPROT} :// ${KHOST}

# firefox passes the whole URL; opera strips the telnet://
case "${KPROT}" in
  "ping" ) aterm --title ${KPROT} -e $(zkp)/sh/runping ${KHOST} ;;
       * ) aterm --title ${KPROT} -e telnet ${KHOST} ;;
esac

exit 0


+++ runrman
#!/bin/sh
#========

echo ooo
# KPU=$(zkp)

# CircleOmega DSL driver for rman manpage formatter
# installs if necessary; checks if input is in gnuzip format
# VFU / midcomm integration: optional 2nd argument allows
# passing --dump parm to LYNX for flatfile viewers

INPUT=$1
LPARM=$2

RES=/opt/rman/usr/bin/rman
[ -f ${RES} ] || iwmenu rman --norun

echo executing ${RES} ...
${RES} -v
type ${RES} &>/dev/null || exit 1

PPROC=cat 
gunzip -c ${INPUT} &>/dev/null && PPROC="gunzip -c"

RMTMP=/tmp/rmantmp.html
${PPROC} ${INPUT} | ${RES} -S -f HTML >${RMTMP}

exec $(zkp)/sh/runlynx ${LPARM} ${RMTMP}
exit 0


+++ Virtual Console Manager
#!/bin/sh
#========

# kopenvt - general purpose script to disentangle the DSL console catastrophe
#           Screaming CuckooBroad Associates 2009
# no parms: issues openvt w/ switching, substitutes user & executes shell
#           (this creates an ordinary VT console for the DSL user)
# parm -u : (experimental resource) like default but only user passed to su
# parm -0 : issues deallocvt to clear out opened & exited VTs
# parm -x : invokes xinit in native, background mode, freeing the issuing console
#           (this mode permits X to start in the absence of an .xinitrc)
# parm -z : brings up in Shingledecker mode (cleanedup DSL startx)
#           legacy looping schema intended to support "switcher.lua"
# invocations: commandline, VFU, midcomm, Lynx

if [ -z $1 ]
then
  sudo openvt -s -- su - dsl -c bash
  exit 0
elif [ "$1" == "-u" ]
then
  shift
  sudo openvt -s -- su - dsl $@
  exit 0
elif [ "$1" == "-0" ]
then
  deallocvt
  exit 0
fi

# this is so it doesnt miss the XTdesktop icons
cd ~

# startx # (whatever)

if   [ "$1" == "-x" ]
then
  xinit &
elif [ "$1" == "-z" ]
then
# a la /usr/X11R6/bin/startx: hung in loop
# name retained for backward compatability
  BSKLUDGE=/tmp/xvesa
  touch ${BSKLUDGE}
  while [ -f ${BSKLUDGE} ]
  do
    rm -f ${BSKLUDGE}
    xinit &>/dev/null
  done
else
  echo $0 : undefined function
fi

exit 0


+++ shnetrik
#!/bin/sh
#========

echo ooo
echo netrik ...

KURL=$(zkp)/local/htm/ktux000.htm
[ -z $1 ] || KURL=$1
[ -z $2 ] || KURL=http://linux.die.net/man/1/$2

# canonical 0     1   2     3      4    5       6    7     (normal)
#  colors   black red green yellow blue magenta cyan white
#   are     8     9   10    11     12   13      14   15     (bold)

# netriks are hozed
# (normal): form / images / bold / link (remote) / main text
# (bold):   tab? / link (local) / header (big) / header

exec aterm \
  --color1 magenta \
  --color2 red     \
  --color5 yellow  \
  --color6 green   \
  --color7 cyan    \
                   \
  --color11 blue   \
  --color14 green  \
  --color13 white  \
  --color15 cyan   \
-name netrik       \
--title netrik     \
-e netrik --ignore-broken ${KURL} &

exit 0


+++ LiveCD ISO generator
#!/bin/sh
#========

echo ooo
echo CircleOmega Linux LiveCD ISO generator for DSL v1.02
date +%G%b%d%a.%P%H:%M:%S
uname -srm

# onepass mode creates bootable ISO image of frugal install from hda6
# interrupted then restarted "--genonly" allows augmentation of data areas
# clearing hda8 before execution is left to the operator

SYSTEM=/mnt/hda6
SOURCE=/mnt/hda8
TARGET=/mnt/hda8
ISONAM=gnulinux.iso

mount ${SOURCE} &>/dev/null

if [ "$1" != "--genonly" ]
then
  DSLROM=/mnt/auto/cdrom
  mount ${DSLROM} &>/dev/null

  echo "prepared to copy files to ${SOURCE}"
  echo 'press any key to continue (^C to abort)...'
  read aparm
  echo "copying files ..."

  cp -rp ${DSLROM}/KNOPPIX       ${SOURCE}
  cp -rp ${DSLROM}/boot          ${SOURCE}

  cp -rp ${SYSTEM}/backup.tar.gz ${SOURCE}
  cp -rp ${SYSTEM}/kpZone        ${SOURCE}
  cp -rp ${SYSTEM}/mydsl         ${SOURCE}
  cp -rp ${SOURCE}/mydsl/startup/bootuci.uci ${SOURCE}/mydsl

  sudo chmod -R 777 ${SOURCE}/boot
  rm -rf ${SOURCE}/boot/isolinux/german.kbd
  cp -rp ${SYSTEM}/kpZone/kData/unx/skel/isolinux/* ${SOURCE}/boot/isolinux

  ls -al ${SOURCE}
  umount  ${DSLROM} &>/dev/null
fi

echo "prepared to gen ISO on ${TARGET}"
echo 'press any key to continue (^C to abort)...'
read aparm
echo "genning ISO ..."

rm -rf ${TARGET}/${ISONAM} &>/dev/null

cd ${SOURCE}
sudo chown -R dsl.staff *
sudo chmod -R 777 *

mkisofs $2 -pad -l -r -J -V CircleOmega -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o ${TARGET}/${ISONAM} ${SOURCE}

ls -al ${TARGET}
exit 0


+++ Bootable UCI generator
#!/bin/sh
#========

echo ooo
echo Bootable UCI bundler for DSL v3.01
date +%G%b%d%a.%P%H:%M:%S
uname -srm

# Script creates a user.tar.gz containing /opt/bootlocal.sh
# & bundles it into a UCI of size greater than 2048 bytes.
# Placed in /mydsl on a remastered LiveCD this UCI can bring up
# the user environment without a restore= parm in isolinux.cfg

echo
echo 'NB: to create bootuci.uci this script temporarily renames'
echo 'your *real* /opt/bootlocal.sh (!). Be sure it is backed up.'
echo 'press any key to continue (^C to abort)...'
read aparm

echo $0 proceeding ...
cd /opt
mv bootlocal.sh bootlocal.bak

cat > bootlocal.sh << :EOF:

#!/bin/sh

# Screaming CuckooBroad Associates 2009
# bootlocal.sh for DSL LiveCD UCI boot
# explicitly restores from user backup & transfers control

# in fond memory of Robert Shingledecker & John Murga
# please be sure to get on the internet sometime
# & read the GNU general public license in its entirety

KDSL=\$(cat /etc/sysconfig/mydsl.mount)
[ "\${KDSL}" == "/tmp" ] && KDSL=/cdrom

  tar -C / -xzf \${KDSL}/backup.tar.gz
  sudo umount /opt/bootuci &>/dev/null

/opt/bootlocal.sh &

exit 0

:EOF:

  sudo chmod 777 /opt/bootlocal.sh

  UCI=/opt/bootuci
  sudo umount ${UCI} &>/dev/null
  mkdir       ${UCI} &>/dev/null

  cp -p $(zkp)/local/img/DSLtux.png /opt
  sudo tar -C / opt/bootlocal.sh opt/DSLtux.png -czvf ${UCI}/user.tar.gz

  cp -p bootlocal.sh  bootlocaluci.sh
  rm    bootlocal.sh
  mv    bootlocal.bak bootlocal.sh

mkisofs -R -hide-rr-moved ${UCI} | create_compressed_fs - 65536 >/tmp/bootuci.uci

  sudo chmod 777 /tmp/bootuci.uci
  ls -al /tmp/boot*

exit 0


GPL
© 2011 TRCM TranceRave Capital Management

Screaming CuckooBroad Associates part of the CircleOmega organisation TRCM

Free Web Hosting
<noscript> <!-- ooo