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

  1. #!/bin/sh
  2.  
  3. . /lib/partman/definitions.sh
  4.  
  5. dev=$1
  6. id=$2
  7. cd $dev
  8.  
  9. if [ -f $id/method ]; then
  10.     method=$(cat $id/method)
  11. else
  12.     method=dont_use
  13. fi
  14.  
  15. if [ -f $id/filesystem ] && ([ "$method" = keep ] || [ "$method" = format ]); then
  16.     fs=$(cat $id/filesystem)
  17.     db_metaget partman/filesystem_long/$fs description || RET=''
  18.     if [ "$RET" ]; then
  19.     description="$RET"
  20.     else
  21.     description="$fs"
  22.     fi
  23. else
  24.     db_metaget partman/method_long/$method description || RET=''
  25.     if [ "$RET" ]; then
  26.     description="$RET"
  27.     else
  28.     description="$method"
  29.     fi
  30. fi
  31.  
  32. db_metaget partman-target/text/method description
  33. RET=$(stralign -25 "$RET")
  34. printf "method\t%s%s\n" "${RET}" "$description"
  35.