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 / usr / lib / tasksel / tasksel-debconf
Encoding:
Text File  |  2007-03-14  |  712 b   |  33 lines

  1. #!/bin/sh
  2. # because debconf sucks
  3. . /usr/share/debconf/confmodule
  4. set -e
  5.  
  6. tmpfile=$1
  7. choices="$2"
  8. choicestrans="$3"
  9. defaults="$4"
  10. question=$5
  11.  
  12. db_settitle tasksel/title
  13. db_subst $question ORIGCHOICES "$choices"
  14. db_subst $question CHOICES "$choicestrans"
  15.  
  16. # Allow tasksel/first to be preseeded. If it's marked as seen, then
  17. # it must have been preseeded, and that overrides any defaults set by
  18. # tasksel.
  19. if [ "$question" = "tasksel/first" ]; then
  20.     db_fget $question seen
  21.     if [ "$RET" = false ]; then
  22.         db_set $question "$defaults"
  23.     fi
  24. else
  25.     db_set $question "$defaults"
  26. fi
  27.  
  28. db_input high $question || true
  29. db_go # note: intentionally unguarded
  30. db_fset $question seen false
  31. db_get $question
  32. echo "$RET" >$tmpfile
  33.