At what point does supporting documenting sarge in the manual in trunk stop being worthwhile? I've got an uncommittd patch that adds support for \ continuations in preseed files. This simplifys and de-uglifies some parts of the example preseed file, lime custom partman-auto recipies, but it won't work with sarge anymore, and I don't see a way to make it support both sarge and devel d-i with a patch like this: Index: build/preseed.awk =================================================================== --- build/preseed.awk (revision 29901) +++ build/preseed.awk (working copy) @@ -1,6 +1,4 @@ # Extract the preseeding example from appendix/example-preseed.xml. -# During extraction "line continuations" - that were added for improved -# readability - will be removed, rejoining the split lines. BEGIN { sectpreseed="0" @@ -30,30 +28,8 @@ sectpreseed="0" } -# Handling of lines not ending with a line continuation character -! /\\[[:space:]]*$/ { +/.*/ { if ( inexample == "1" ) { - if ( inseq == "1" ) { - sub(/^[[:space:]]*/, "") - sub(/^#[[:space:]]*/, "") - } - totline = totline $0 - - print totline - totline="" - inseq="0" + print } } - -# Handling of lines ending with a line continuation character -/\\[[:space:]]*$/ { - if ( inexample == "1" ) { - if ( inseq == "1" ) { - sub(/^[[:space:]]*/, "") - sub(/^#[[:space:]]*/, "") - } - inseq="1" - gsub(/\\[[:space:]]*$/, "") - totline = totline $0 - } -} Index: en/appendix/example-preseed.xml =================================================================== --- en/appendix/example-preseed.xml (revision 29912) +++ en/appendix/example-preseed.xml (working copy) @@ -10,25 +10,21 @@ install. Its use is explained in <xref linkend="automatic-install"/>. You may want to uncomment some of the lines before using the file. -<note><para> - -In order to be able to properly present this example in the manual, we've had -to split some lines. This is indicated by the use of the line-continuation-character -<quote>\</quote> and extra indentation in the next line. In a real preconfiguration -file, these split lines have to be joined into <emphasis>one single line</emphasis>. -If you do not, preconfiguration will fail with unpredictable results. - </para><para> -A <quote>clean</quote> example file is included on the official Debian +A file similar to this preseed file is included on the official Debian installation CD-ROMs in <filename>/doc/install/manual</filename> and available from the Internet at <ulink url="&url-example-preseed;"></ulink>. -</para></note> +</para> <informalexample><screen> #### Startup. +# Warning: This preseed file will not work with the version of the Debian +# installer used for the sarge release. It requires a more recent version +# of the installer. + # To use a preseed file, you'll first need to boot the installer, # and tell it what preseed file to use. This is done by passing the # kernel a boot parameter, either manually at boot or by editing the @@ -46,9 +42,8 @@ # If you feel comfortable modifying the installer's initrd image, # you can also place a preseed file in the root directory of the initrd's # filesystem, named "preseed.cfg" -- the installer will always use this -# file if it is present (note: not supported by the Sarge version of the -# installer). Otherwise, be sure to copy this file to the location you -# specify. +# file if it is present. Otherwise, be sure to copy this file to the location +# you specify. # # To make sure the installer gets the right preseed file, you can specify # a checksum for the file. Currently this needs to be a md5sum, and if @@ -90,10 +85,6 @@ # such as debian-installer/locale=en_US d-i debian-installer/locale string en_US -# The sarge installer had two separate values for language and country: -d-i languagechooser/language-name select English -d-i countrychooser/shortlist select US - # To select your keyboard, use this setting. Again it will need to be # passed as a kernel parameter for most preseed setups. d-i console-keymaps-at/keymap select us @@ -149,7 +140,7 @@ # If the system has free space you can choose to only partition that space. #d-i partman-auto/init_automatically_partition \ -# select Use the largest continuous free space +# select Use the largest continuous free space # Alternatively, you can specify a disk to partition. The device name can # be given in either devfs or traditional non-devfs format. @@ -157,8 +148,8 @@ d-i partman-auto/disk string /dev/discs/disc0/disc # You can choose from any of the predefined partitioning recipes: -d-i partman-auto/choose_recipe select \ - All files in one partition (recommended for new users) +d-i partman-auto/choose_recipe \ + select All files in one partition (recommended for new users) #d-i partman-auto/choose_recipe select Desktop machine #d-i partman-auto/choose_recipe select Multi-user workstation @@ -168,36 +159,30 @@ # just point at it. #d-i partman-auto/expert_recipe_file string /hd-media/recipe -# If not, you can put an entire recipe in one line. This example creates -# a small /boot partition, suitable swap, and uses the rest of the space -# for the root partition: -#d-i partman-auto/expert_recipe string boot-root :: \ -# 20 50 100 ext3 $primary{ } $bootable{ } method{ format } format{ } \ -# use_filesystem{ } filesystem{ ext3 } mountpoint{ /boot } . \ -# 500 10000 1000000000 ext3 method{ format } format{ } \ -# use_filesystem{ } filesystem{ ext3 } mountpoint{ / } . \ -# 64 512 300% linux-swap method{ swap } format{ } . -# For reference, here is that same recipe in a more readable form: -# boot-root :: -# 40 50 100 ext3 -# $primary{ } $bootable{ } -# method{ format } format{ } -# use_filesystem{ } filesystem{ ext3 } -# mountpoint{ /boot } -# . -# 500 10000 1000000000 ext3 -# method{ format } format{ } -# use_filesystem{ } filesystem{ ext3 } -# mountpoint{ / } -# . -# 64 512 300% linux-swap -# method{ swap } format{ } -# . +# If not, you can put an entire recipe the preseed file in one (logical) +# line. This example creates a small /boot partition, suitable swap, and +# uses the rest of the space for the root partition: +#d-i partman-auto/expert_recipe string \ +# boot-root :: \ +# 40 50 100 ext3 \ +# $primary{ } $bootable{ } \ +# method{ format } format{ } \ +# use_filesystem{ } filesystem{ ext3 } \ +# mountpoint{ /boot } \ +# . \ +# 500 10000 1000000000 ext3 \ +# method{ format } format{ } \ +# use_filesystem{ } filesystem{ ext3 } \ +# mountpoint{ / } \ +# . \ +# 64 512 300% linux-swap \ +# method{ swap } format{ } \ +# . # This makes partman automatically partition without confirmation. d-i partman/confirm_write_new_label boolean true -d-i partman/choose_partition select \ - Finish partitioning and write changes to disk +d-i partman/choose_partition \ + select Finish partitioning and write changes to disk d-i partman/confirm boolean true #### Boot loader installation. @@ -248,8 +233,8 @@ # This command is run after base-config is done, just before the login: # prompt. This is a good way to install a set of packages you want, or to # tweak the configuration of the system. -#base-config base-config/late_command string \ -# apt-get install zsh; chsh -s /bin/zsh +#base-config base-config/late_command \ +# string apt-get install zsh; chsh -s /bin/zsh ###### Preseeding the 2nd stage of the installation. @@ -279,33 +264,6 @@ # /usr/share/zoneinfo/ for options. d-i time/zone string US/Eastern -# This preseeding used to be more complex; the old method is documented -# here as well for completeness. If you're using sarge, you'll need this -# method. - -# Controls whether or not the hardware clock is set to UTC. -#base-config tzconfig/gmt boolean true -# If you told the installer that you're in the United States, then you -# can set the time zone using this variable. -# (Choices are: Eastern, Central, Mountain, Pacific, Alaska, Hawaii, -# Aleutian, Arizona East-Indiana, Indiana-Starke, Michigan, Samoa, other) -#base-config tzconfig/choose_country_zone/US select Eastern -# If you told it you're in Canada. -# (Choices are: Newfoundland, Atlantic, Eastern, Central, -# East-Saskatchewan, Saskatchewan, Mountain, Pacific, Yukon, other) -#base-config tzconfig/choose_country_zone/CA select Eastern -# If you told it you're in Brazil. (Choices are: East, West, Acre, -# DeNoronha, other) -#base-config tzconfig/choose_country_zone/BR select East -# Many countries have only one time zone. If you told the installer you're -# in one of those countries, you can choose its standard time zone via this -# question. -#base-config tzconfig/choose_country_zone_single boolean true -# This question is asked as a fallback for countries other than those -# listed above, which have more than one time zone. You can preseed one of -# the time zones, or "other". -#base-config tzconfig/choose_country_zone_multiple select - #### Account setup. # To preseed the root password, you have to put it in the clear in this @@ -361,7 +319,7 @@ # During a normal install, exim asks only a few questions. Here's how to # avoid even those. More complicated preseeding is possible. exim4-config exim4/dc_eximconfig_configtype \ - select no configuration at this time + select no configuration at this time exim4-config exim4/no_config boolean true exim4-config exim4/no_config boolean true @@ -393,9 +351,9 @@ # the "medium" path, which is always available. The "simple" path may not # be available, and the "advanced" path asks too many questions. xserver-xfree86 xserver-xfree86/config/monitor/selection-method \ - select medium + select medium xserver-xfree86 xserver-xfree86/config/monitor/mode-list \ - select 1024x768 @ 60 Hz + select 1024x768 @ 60 Hz #### Everything else. @@ -418,15 +376,12 @@ # The installer can optionally verify checksums of preseed files before # using them. Currently only md5sums are supported, list the md5sums # in the same order as the list of files to include. -# (Checksums are not supported in the sarge installer.) #d-i preseed/include/checksum string 5da499872becccfeda2c4872f9171c3d # More flexibly, this runs a shell command and if it outputs the names of -# preseed files, includes those files. For example, to switch configs based -# on a particular usb storage device (in this case, a built-in card reader): -#d-i preseed/include_command string \ -# if $(grep -q "GUID: 0aec3050aec305000001a003" /proc/scsi/usb-storage-*/*); \ -# then echo kraken.cfg; else echo otherusb.cfg; fi +# preseed files, includes those files. +#d-i preseed/include_command \ +# string echo if [ "`hostname`" = bob ]; then echo bob.cfg; fi # To check the format of your preseed file before performing an install, # you can use debconf-set-selections: -- see shy jo
Attachment:
signature.asc
Description: Digital signature