hal/tools hal-system-storage-mount, 1.6,
1.7 hal-system-storage-unmount, 1.2, 1.3
Kay Sievers
kay at freedesktop.org
Tue Dec 20 09:09:38 PST 2005
Update of /cvs/hal/hal/tools
In directory gabe:/tmp/cvs-serv17721/tools
Modified Files:
hal-system-storage-mount hal-system-storage-unmount
Log Message:
2005-12-20 Kay Sievers <kay.sievers at vrfy.org>
Switch extended attributes use to .created-by-hal file to
mark created mountpoints for removal on unmount.
* tools/hal-system-storage-mount:
* tools/hal-system-storage-unmount:
Index: hal-system-storage-mount
===================================================================
RCS file: /cvs/hal/hal/tools/hal-system-storage-mount,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- hal-system-storage-mount 17 Dec 2005 20:21:40 -0000 1.6
+++ hal-system-storage-mount 20 Dec 2005 17:09:35 -0000 1.7
@@ -141,7 +141,7 @@
if [ ! -e "$MOUNT_ROOT/$MOUNTPOINT" ]; then
MOUNTPOINT_CREATED=1
mkdir "$MOUNT_ROOT/$MOUNTPOINT"
- attr -s HAL_MOUNTPOINT -V "$HAL_PROP_INFO_UDI" "$MOUNT_ROOT/$MOUNTPOINT" > /dev/null 2>&1
+ touch "$MOUNT_ROOT/$MOUNTPOINT/.created-by-hal"
fi
if [ ! -e "$MOUNT_ROOT/$MOUNTPOINT" ]; then
Index: hal-system-storage-unmount
===================================================================
RCS file: /cvs/hal/hal/tools/hal-system-storage-unmount,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- hal-system-storage-unmount 17 Dec 2005 20:21:40 -0000 1.2
+++ hal-system-storage-unmount 20 Dec 2005 17:09:35 -0000 1.3
@@ -37,7 +37,9 @@
fi
# remove directory only if HAL has created it
-attr -q -g HAL_MOUNTPOINT "$HAL_PROP_VOLUME_MOUNT_POINT" > /dev/null 2>&1 || exit 0
-rmdir --ignore-fail-on-non-empty "$HAL_PROP_VOLUME_MOUNT_POINT"
+if [ -e $HAL_PROP_VOLUME_MOUNT_POINT/.created-by-hal ]; then
+ rm -f $HAL_PROP_VOLUME_MOUNT_POINT/.created-by-hal
+ rmdir --ignore-fail-on-non-empty "$HAL_PROP_VOLUME_MOUNT_POINT"
+fi
exit 0
More information about the hal-commit
mailing list