#!/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)) # " kill_splash 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