#!/bin/sh

# runonce script
# this script runs evertying in $RUNONCE, then deletes it all.

RUNONCEDIR=/etc/RUNONCE

if [ -d $RUNONCEDIR ]; then
   echo -n "Executing run once scripts: "
   # directory exists and thus, we need to run through everything
   for SCRIPT in ${RUNONCEDIR}/*; do
      if [ -x "$SCRIPT" ]; then
         $SCRIPT
      fi
   done
   echo "Done."
fi

rm -rf $RUNONCEDIR
