home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / hal / scripts / hal-system-storage-cleanup-mountpoint < prev    next >
Encoding:
Text File  |  2006-08-30  |  515 b   |  20 lines

  1. #!/bin/sh
  2.  
  3. # Copyright (C) 2006, David Zeuthen <davidz@redhat.com>
  4. #
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License version 2.
  7.  
  8. if [ "$HALD_CLEANUP" = "" ]; then
  9.     echo Specify directory to clean up with the environment variable HALD_CLEANUP
  10.     exit 1
  11. fi
  12.  
  13. # check if we created it
  14. if [ ! -e "$HALD_CLEANUP/.created-by-hal" ]; then
  15.     exit 1
  16. fi
  17.  
  18. rm -f "$HALD_CLEANUP/.created-by-hal"
  19. rmdir --ignore-fail-on-non-empty "$HALD_CLEANUP"
  20.