summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rwxr-xr-xhotplug.sh.in17
2 files changed, 22 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f13c02e..9f2bacf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2007-05-24 Jeff Mitchell <me@jefferai.com>
+ * hotplug.sh.in: Properly install the HAL FDI rules if
+ the user so chooses to when prompted.
+
+2007-05-24 Jeff Mitchell <me@jefferai.com>
+
* examples/hotplug.c: Fix/update HAL output to conform
to new specs. Fix whitespacing to be consistent.
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