diff options
Diffstat (limited to 'scripts/tcos-bottom/80shell')
-rwxr-xr-x | scripts/tcos-bottom/80shell | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/scripts/tcos-bottom/80shell b/scripts/tcos-bottom/80shell new file mode 100755 index 0000000..afd3a0d --- /dev/null +++ b/scripts/tcos-bottom/80shell @@ -0,0 +1,60 @@ +#!/bin/sh +# +if [ "$1" = "prereqs" ]; then + exit 0 +fi + +quiet=n + +. /conf/tcos.conf +. /scripts/functions +. /conf/tcos-run-functions + + +# kill bootchart +if grep -q bootchartd /proc/cmdline ; then + [ -x /sbin/tcos-bootchartd ] && /sbin/tcos-bootchartd stop +fi + +TCOS_TTY=$(read_cmdline_var "ttys" "${TCOS_TTY}") + +export PS1="($(whoami)@$(hostname)) # " + +grep -q " startx=N " /proc/cmdline && chvt 1 + +# empty memory cache +# from http://linux-mm.org/Drop_Caches +sync +echo 3 > /proc/sys/vm/drop_caches + +# no clear +#clear + + +while [ ${TCOS_TTY} -ge 1 ]; do + if [ ${TCOS_TTY} = 1 ] ; then + if [ "${TCOS_TTY1_PROTECTED}" = "1" ]; then + rungetty tty${TCOS_TTY} + else + echo "" + echo "" + echo "Press enter to activate this console..." + read enter + sh + fi + else + rungetty tty${TCOS_TTY} & + fi + + TCOS_TTY=$((TCOS_TTY -1)) +done + + + + + +while [ 1 ]; do + sh +done + +exit 0 |