home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Linux / Ubuntu_64-bit / ubuntu-11.04-desktop-amd64.iso / casper / filesystem.squashfs / bin / partman-commit < prev    next >
Text File  |  2010-04-27  |  2KB  |  86 lines

  1. #!/bin/sh
  2. set -e
  3.  
  4. . /lib/partman/lib/base.sh
  5.  
  6. ###########################################################
  7. # Compute some constants in order to make things faster.
  8. ###########################################################
  9.  
  10. # Detect if Debconf can escape strings
  11. # non-empty means we can escape
  12. can_escape=''
  13. if type debconf-escape >/dev/null 2>&1; then
  14.     db_capb backup align
  15.     for cap in $RET; do
  16.         case $cap in
  17.             escape)    can_escape=yes ;;
  18.         esac
  19.     done
  20. fi
  21. export can_escape
  22.  
  23. # The decimal separator (dot or comma)
  24. #db_metaget partman/text/deci description
  25. #deci="$RET"
  26. # The comma has special meaning for debconf.  Lets force dot until we
  27. # start using escaped strings.
  28. deci='.'
  29. export deci
  30.  
  31. # work around bug #243373
  32. if [ "$TERM" = xterm ] || [ "$TERM" = bterm ]; then
  33.     debconf_select_lead="$NBSP"
  34. else
  35.     debconf_select_lead="> "
  36. fi
  37. export debconf_select_lead
  38.  
  39. ###########################################################
  40.  
  41.  
  42. db_capb backup align
  43.  
  44. initcount=`ls /lib/partman/init.d/* | wc -l`
  45. db_progress START 0 $initcount partman/progress/init/title
  46. for s in /lib/partman/init.d/*; do
  47.     if [ -x $s ]; then
  48.         base=$(basename $s | sed 's/[0-9]*//')
  49.         # Not every init script has, or needs, its own progress
  50.         # template. Add them to slow init scripts only.
  51.         if ! db_progress INFO partman/progress/init/$base; then
  52.             db_progress INFO partman/progress/init/fallback
  53.         fi
  54.         if ! $s; then
  55.             db_progress STOP
  56.             exit 10
  57.         fi
  58.     fi
  59.     db_progress STEP 1
  60. done
  61. db_progress STOP
  62.  
  63. # display.d intentionally omitted.
  64.  
  65. if [ -z "$PARTMAN_ALREADY_CHECKED" ]; then
  66.     for s in /lib/partman/check.d/*; do
  67.         if [ -x $s ]; then
  68.             $s
  69.         fi
  70.     done
  71. fi
  72.  
  73. for s in /lib/partman/commit.d/*; do
  74.     if [ -x $s ]; then
  75.         $s
  76.     fi
  77. done
  78.  
  79. for s in /lib/partman/finish.d/*; do
  80.     if [ -x $s ]; then
  81.         $s
  82.     fi
  83. done
  84.  
  85. exit 0
  86.