hal/tools/callouts hal-system-storage-cleanup-mountpoints,NONE,1.1
Kay Sievers
kay at freedesktop.org
Tue Dec 20 11:19:15 PST 2005
Update of /cvs/hal/hal/tools/callouts
In directory gabe:/tmp/cvs-serv9210/tools/callouts
Added Files:
hal-system-storage-cleanup-mountpoints
Log Message:
2005-12-20 Kay Sievers <kay.sievers at vrfy.org>
Remove HAL created mountpoints on HAL startup.
* fdi/policy/10osvendor/20-storage-methods.fdi:
* tools/Makefile.am:
* tools/callouts/hal-system-storage-cleanup-mountpoints:
--- NEW FILE: hal-system-storage-cleanup-mountpoints ---
#!/bin/sh
# Copyright (C) 2005, Kay Sievers <kay.sievers at vrfy.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2.
MOUNT_ROOT="/media"
for DIR in $MOUNT_ROOT/*; do
# check if we created it
if [ ! -e $DIR/.created-by-hal ]; then
continue
fi
# don't touch mounted volumes
BUSY=
while read dev dir type options; do
if [ "$dir" = "$DIR" ]; then
BUSY=1
break
fi
done < /proc/mounts
if [ "$BUSY" = "1" ]; then
continue
fi
rm -f $DIR/.created-by-hal
rmdir --ignore-fail-on-non-empty "$DIR"
done
exit 0
More information about the hal-commit
mailing list