Contents of /trunk/hal/hal-unmount.dev
Parent Directory | Revision Log
Revision 82 -
(show annotations)
(download)
Fri Oct 20 18:01:50 2006 UTC (17 years, 11 months ago) by niro
File size: 478 byte(s)
Fri Oct 20 18:01:50 2006 UTC (17 years, 11 months ago) by niro
File size: 478 byte(s)
patches and files for hal-0.5.7.1-r1
1 | #!/bin/sh |
2 | # $Header: /root/magellan-cvs/src/hal/hal-unmount.dev,v 1.1 2006-10-20 18:01:50 niro Exp $ |
3 | |
4 | # sanity check. DEVNAME should start with a / |
5 | [ "$DEVNAME" != "${DEVNAME#/}" ] || exit 0 |
6 | |
7 | # Lazily unmount drives which are removed, but still mounted |
8 | if [ "$ACTION" = remove ] \ |
9 | && (grep -q "^$DEVNAME" /proc/mounts || grep -q "^$DEVNAME" /etc/mtab); then |
10 | if [ -x /usr/bin/pumount ] ; then |
11 | /usr/bin/pumount -l "$DEVNAME"; |
12 | else |
13 | /bin/umount -l "$DEVNAME"; |
14 | fi |
15 | fi |
16 | |
17 | exit 0 |