#!/bin/sh
#
# mount UPnP VFS
#
# runlevels: geexbox, debug, configure

# get options
test -f /etc/network || exit 1
. /etc/network

if test "$UPNP" = "yes" -a -f /usr/bin/djmount; then
  echo "### Mounting UPnP VFS ###"

  # Build UPnP VFS directory
  mkdir -p /tmp/UPnP

  (
    while [ ! -f /var/ifup ]; do
      sleep 1
    done 

    # Mount UPnP VFS
    djmount -f /tmp/UPnP >/dev/null 2>&1 &
  )&
fi

exit 0
