#!/bin/sh

if [ ! -e /proc/self/fd/0 ] ; then
   echo "Won't set ascii mode: Can't determine console type;" >&2
   echo " Please ensure that /proc is mounted." >&2
   exit 1
fi

readlink /proc/self/fd/0 | grep -q -e /dev/vc -e '/dev/tty[^p]' -e /dev/console
if [ $? -eq 1 ]; then
    echo  "Won't set ascii mode: not a VT." >&2
    exit 1
fi

# stop unicode
kbd_mode -a

printf '\033%%@'
