home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / lib / partman / init.d / 10umount_target < prev    next >
Encoding:
Text File  |  2007-04-12  |  296 b   |  23 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. cat /proc/mounts |
  6. while read dev dir type options dump pass; do
  7.     echo $dir
  8. done |
  9. grep '^/target' | 
  10. sort |
  11. {
  12.     # We miss the option -r of sort
  13.     dirs=''
  14.     while read dir; do
  15.     dirs="$dir
  16. $dirs"
  17.     done
  18.     echo -n "$dirs"
  19. } |
  20. while read dir; do
  21.     umount $dir
  22. done
  23.