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 / mount.d / 70basic next >
Encoding:
Text File  |  2007-04-12  |  396 b   |  31 lines

  1. #!/bin/sh
  2.  
  3. set -- $1
  4.  
  5. fs=$1
  6. mp=$2
  7. type=$3
  8. options=$4
  9. dump=$5
  10. pass=$6
  11.  
  12. case $type in
  13.     ext2|vfat|ntfs)
  14.     mount $fs /target$mp || exit 1
  15.     echo "umount /target$mp"
  16.     exit 0
  17.     ;;
  18.     swap)
  19.         # Probably it's already swapped on.
  20.     if [ -f /proc/swaps ] && grep -q "^$fs " /proc/swaps; then
  21.         echo "swapoff $fs"
  22.         exit 0
  23.     fi
  24.         swapon $fs || exit 1
  25.     echo "swapoff $fs"
  26.     exit 0
  27.     ;;
  28. esac
  29.  
  30. exit 1
  31.