#! /bin/sh

set -e

# Source debconf library
. /usr/share/debconf/confmodule

if [ "$1" = "configure" ]; then
  db_get bottlerocket/x10_port

  if [ "x$RET" = "x" ]; then
    device="ttyS0"
  fi
  device=${RET##/dev/}

  ln -sf $device /dev/firecracker

  if [ -d /usr/share/bottlerocket/doc ]; then
      find /usr/share/bottlerocket/doc -type d -empty -delete
  fi
fi

#DEBHELPER#
