home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / lib / partman / active_partition / 30format / choices next >
Encoding:
Text File  |  2006-08-30  |  713 b   |  37 lines

  1. #!/bin/sh
  2.  
  3. . /usr/share/debconf/confmodule
  4.  
  5. dev="$1"
  6. id=$2
  7. cd $dev
  8.  
  9. [ -f $id/method ] || exit 0
  10. method=$(cat $id/method)
  11. [ "$method" = keep -o "$method" = format ] || exit 0
  12.  
  13. [ -f $id/filesystem ] || exit 0
  14.  
  15. [ -f $id/existing -a -f $id/formatable ] || exit 0
  16.  
  17. if [ "$method" = format ]; then
  18.     db_metaget partman-basicmethods/text/yes_format description || RET=''
  19.     if [ "$RET" ]; then
  20.     status="$RET"
  21.     else
  22.     status=yes
  23.     fi
  24. else
  25.     db_metaget partman-basicmethods/text/no_dont_format description || RET=''
  26.     if [ "$RET" ]; then
  27.     status="$RET"
  28.     else
  29.     status=no
  30.     fi
  31. fi
  32.  
  33. db_metaget partman-basicmethods/text/format description
  34. RET=$(stralign -25 "$RET")
  35. printf "format\t%s%s\n" "${RET}" "$status"
  36.  
  37.