#!/bin/sh
## Build issue files
echo `clear` > /etc/issue
echo Debian `uname` `cat /etc/debian_version` >> /etc/issue
echo Kernel Version `uname -r` compiled on `uname -v` >> /etc/issue
if [ -f /etc/local/name ] ; then
    sed "s/\\\\/\\\\\\\\/g" /etc/local/name >> /etc/issue
fi
echo Debian GNU/\\s `cat /etc/debian_version` \\n \\l >> /etc/issue

if [ "`ls /etc/local/name-* 2>/dev/null`" ] ; then
  for tty in `ls /etc/local/name-* | sed s?/etc/local/name-??` ; do
    echo `clear` > /etc/issue-$tty
    echo Debian `uname` `cat /etc/debian_version` >> /etc/issue-$tty
    echo Kernel Version `uname -r` compiled on `uname -v` >> /etc/issue-$tty
    if [ -f /etc/local/name-$tty ] ; then
      sed "s/\\\\/\\\\\\\\/g" /etc/local/name-$tty >> /etc/issue-$tty
    fi
    echo Debian GNU/\\s `cat /etc/debian_version` \\n \\l >> /etc/issue-$tty
  done
fi
