#!/bin/bash

DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/opt/drbl/}"
. $DRBL_SCRIPT_PATH/sbin/drbl-conf-functions
. $DRBL_SCRIPT_PATH/conf/drbl-ocs.conf
. $DRBL_SCRIPT_PATH/sbin/ocs-functions

if ! grep -q -Ew ocs_prerun /proc/cmdline; then
  exit 1
fi
parse_cmdline_option "ocs_prerun"

if [ -n "$ocs_prerun" ]; then
  # run it
  echo "Running $ocs_prerun..."
  . $ocs_prerun
fi
