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 / fstab.d / reiserfs < prev    next >
Encoding:
Text File  |  2007-02-20  |  1.3 KB  |  56 lines

  1. #!/bin/sh
  2.  
  3. . /lib/partman/definitions.sh
  4.  
  5. has_boot=no
  6. for dev in $DEVICES/*; do
  7.     [ -d $dev ] || continue
  8.     cd $dev
  9.     open_dialog PARTITIONS
  10.     while { read_line num id size type fs path name; [ "$id" ]; }; do
  11.     [ $fs != free ] || continue
  12.     [ -f "$id/method" ] || continue
  13.     [ -f "$id/acting_filesystem" ] || continue
  14.     [ -f "$id/mountpoint" ] || continue
  15.     mountpoint=$(cat $id/mountpoint)
  16.     if [ "$mountpoint" = /boot ]; then
  17.         has_boot=yes
  18.     fi
  19.     done
  20.     close_dialog
  21. done
  22.  
  23. for dev in $DEVICES/*; do
  24.     [ -d $dev ] || continue
  25.     cd $dev
  26.     open_dialog PARTITIONS
  27.     while { read_line num id size type fs path name; [ "$id" ]; }; do
  28.     [ $fs != free ] || continue
  29.     [ -f "$id/method" ] || continue
  30.     [ -f "$id/acting_filesystem" ] || continue
  31.     [ -f "$id/mountpoint" ] || continue
  32.     mountpoint=$(cat $id/mountpoint)
  33.     filesystem=$(cat $id/acting_filesystem)
  34.     case "$filesystem" in
  35.         reiserfs)
  36.             # due to #249322, #255135, #258117:
  37.             if [ "$mountpoint" = /tmp ]; then
  38.             rm -f $id/options/noexec
  39.             fi
  40.             if [ "$mountpoint" = /boot \
  41.                -o \( "$mountpoint" = / -a "$has_boot" = no \) ]; then
  42.             > $id/options/notail
  43.             fi
  44.             options=$(get_mountoptions $dev $id)
  45.             if [ "$mountpoint" = / ]; then
  46.             pass=1
  47.             else
  48.             pass=2
  49.             fi
  50.             echo "$path" "$mountpoint" reiserfs $options 0 $pass
  51.         ;;
  52.     esac
  53.     done
  54.     close_dialog
  55. done
  56.