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 / update.d / 20bootable next >
Encoding:
Text File  |  2007-04-12  |  449 b   |  35 lines

  1. #!/bin/sh
  2.  
  3. . /lib/partman/definitions.sh
  4.  
  5. dev=$1
  6. num=$2
  7. id=$3
  8. size=$4
  9. type=$5
  10. fs=$6
  11. path=$7
  12. name=$8
  13.  
  14. cd $dev
  15.  
  16. if [ $fs = free ]; then
  17.     rm -f $id/bootable
  18. else
  19.     bootable=no
  20.     open_dialog GET_FLAGS $id
  21.     while { read_line flag; [ "$flag" ]; }; do
  22.     if [ "$flag" = boot ]; then
  23.         bootable=yes
  24.     fi
  25.     done
  26.     close_dialog
  27.     
  28.     if [ $bootable = yes ]; then
  29.     [ -d $id ] || mkdir $id
  30.     >$id/bootable
  31.     else
  32.     rm -f $id/bootable
  33.     fi
  34. fi
  35.