From e3f1bbac42645075a3e16fe68b7b3731dbf51f84 Mon Sep 17 00:00:00 2001 From: jefferai Date: Thu, 24 May 2007 23:27:13 +0000 Subject: Updated hotplug.sh.in to prompt the user to install HAL rules, which are installed to the standard HAL location. --- hotplug.sh.in | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'hotplug.sh.in') diff --git a/hotplug.sh.in b/hotplug.sh.in index df3a24b..48bd98e 100755 --- a/hotplug.sh.in +++ b/hotplug.sh.in @@ -6,6 +6,9 @@ SCRIPTNAME=libmtp.sh USERMAP=libmtp.usermap UDEVPATH=/etc/udev/rules.d UDEVRULES=libmtp.rules +HALBASEPATH=/usr/share/hal/fdi/information +HALPATH=/usr/share/hal/fdi/information/20thirdparty +HALRULES=libmtp.fdi # See if the parameter script ($2), device ($3) and productid ($4) # are already defined in the usermap ($1) @@ -74,6 +77,20 @@ if test -d ${UDEVPATH} ; then ${INSTALL} ${UDEVRULES} ${UDEVPATH} echo "You may need additional setup to get correct permissions on your device." echo "See the INSTALL file for information." + echo "Do you also want to install HAL support or the old hotplug support (y/n)?" + read IN + if [ "$IN" = "y" ] || [ "$IN" = "Y" ]; then + echo "Continuing..." + else + exit 0 + fi +fi + +# Check for HAL next +if test -d ${HALBASEPATH} ; then + echo "You seem to have HAL on your system. Installing HAL rules..." + mkdir -p ${HALPATH} + ${INSTALL} ${HALRULES} ${HALPATH} echo "Do you also want to install the old hotplug support (y/n)?" read IN if [ "$IN" = "y" ] || [ "$IN" = "Y" ]; then -- cgit v1.2.1