#!/bin/sh -e

THIS=`basename $0`

# include common stuff
. /usr/share/synce/synce-serial-common

exit_if_not_root


if [ $# -gt 0 ]; then
  synce_cmdline_setup "$@"  
elif [ -e ${CONFIG_FILE} ]; then
  . $CONFIG_FILE
else
  echo "
${THIS} was unable to find the file ${CONFIG_FILE}:

Please run the synce-serial-config tool to create this file before running this
script again.
" >&2
  exit 1
fi
get_pid

exec $BINDIR/synce-serial-abort-device
