#!/bin/bash

PROGRAM=/usr/sbin/vtund
ARGS="-s"
RUNLEVEL=3
NEEDS="+remote_fs"

. /etc/init.d/smgl_init
. /etc/sysconfig/vtun

unconfigured()
{
  cat <<EOF
##############################################################
WARNING    WARNING    WARNING    WARNING    WARNING    WARNING

Vtund has not been configured yet, and will not be started
at boot for fear of opening a security hole.

Please check /etc/vtund.conf, and once you're happy with
the config, change CONFIGURED=no to CONFIGURED=yes in
/etc/init.d/vtund

##############################################################
EOF

  exit 1
}

start()
{
  [ "$CONFIGURED" != "yes" ] && unconfigured
  _start
}

reload()
{
  [ "$CONFIGURED" != "yes" ] && unconfigured
  _reload
}
