#! /bin/sh

set -e

a="getty"
b="-f /etc/issue.linuxlogo"
c="38400"
target=/etc/inittab

usage() {
    echo "Usage: $0 command"
    echo "  available commands: install, uninstall"
}

case "$1" in
    install)
  sed --in-place=.BAK "s|$a $c|$a $b $c|" $target
  ;;

    uninstall)
  sed --in-place=.BAK "s|$a $b $c|$a $c|" $target
  ;;

    *)
  usage;
  exit 1
  ;;
esac
