#!/bin/sh

# Broadcast hotplug events on D-BUS and then call the appropriate agent

MESSAGE="org.handhelds.gpe.hotplug"

invoke_dbus () 
{
  cmd="dbus-send --system $MESSAGE"
  while [ $# -gt 0 ]; do
    cmd="$cmd :$1"
    shift
  done
  eval $cmd
}

invoke_dbus $*
exec /sbin/hotplug $*
