home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / initramfs-tools / scripts / casper-bottom / 24preseed < prev    next >
Encoding:
Text File  |  2006-08-23  |  639 b   |  48 lines

  1. #! /bin/sh
  2.  
  3. PREREQ=""
  4. DESCRIPTION="Loading preseed file..."
  5.  
  6. . /scripts/functions
  7.  
  8. prereqs ()
  9. {
  10.     echo "$PREREQ"
  11. }
  12.  
  13. case $1 in
  14. # get pre-requisites
  15. prereqs)
  16.     prereqs
  17.     exit 0
  18.     ;;
  19. esac
  20.  
  21. log_begin_msg "$DESCRIPTION"
  22.  
  23. location=
  24. for x in $(cat /proc/cmdline); do
  25.     case $x in
  26.         preseed/file=*)
  27.             location="${x#preseed/file=}"
  28.             ;;
  29.         */*=*)
  30.             question="${x%%=*}"
  31.             value="${x#*=}"
  32.             casper-preseed /root "$question" "$value"
  33.             ;;
  34.         locale=*)
  35.             value="${x#*=}"
  36.             casper-preseed /root debian-installer/locale "$value"
  37.             ;;
  38.     esac
  39. done
  40.  
  41. if [ "$location" ]; then
  42.     chroot /root debconf-set-selections < "/root$location"
  43. fi
  44.  
  45. log_end_msg
  46.  
  47. exit 0
  48.