summaryrefslogtreecommitdiff
path: root/hotplug.sh.in
diff options
context:
space:
mode:
authorjefferai <jefferai>2007-05-24 23:27:13 +0000
committerjefferai <jefferai>2007-05-24 23:27:13 +0000
commite3f1bbac42645075a3e16fe68b7b3731dbf51f84 (patch)
treee120c20b03e3d539373dc8ae91d610a6de3080c5 /hotplug.sh.in
parentf28f2a1e8ef69f1faeb46a840747bf5f6014cbcd (diff)
downloadlibmtp-e3f1bbac42645075a3e16fe68b7b3731dbf51f84.tar.gz
Updated hotplug.sh.in to prompt the user to install HAL rules, which are installed to the standard HAL location.
Diffstat (limited to 'hotplug.sh.in')
-rwxr-xr-xhotplug.sh.in17
1 files changed, 17 insertions, 0 deletions
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