#!/bin/bash
# /config/scripts/post-config.d/install-user-files.sh
#
# This script makes user files persistent across reboot and firmware upgrade

RUN="yes"
FILES="/etc/dhcp3/dhclient-exit-hooks.d/pointopoint"

FLAG=/tmp/install-user-files.flag
SOURCE_PREFIX=/config/user-data
if [ "$RUN" = "yes" ]
then
  if [ ! -f $FLAG ]
  then
    for FILE in $FILES
    do
      cp -p $SOURCE_PREFIX$FILE $FILE
    done
  touch $FLAG
  fi
fi

exit 0
