pf-tools commit: r759 [ccaillet-guest] - in /trunk: debian/ lib/PFTools/ sbin/ templates/

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Wed Jun 9 09:09:02 UTC 2010


Author: ccaillet-guest
Date: Wed Jun  9 09:09:00 2010
New Revision: 759

URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=759
Log:
  - remove Warn when defining initrd if deploymode is debian-installer or
    ubuntu-installer
* forward port from branches/0.33-stable the Ubuntu support

Added:
    trunk/templates/standard-preseed-squeeze.tpl
    trunk/templates/ubuntu-installer
    trunk/templates/ubuntu-preseed.tpl
    trunk/templates/ubuntu-sources.list.tpl
Modified:
    trunk/debian/changelog
    trunk/lib/PFTools/Net.pm
    trunk/sbin/mk_grub2opt
    trunk/sbin/mk_pxelinuxcfg
    trunk/sbin/mk_sourceslist

Modified: trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pf-tools/trunk/debian/changelog?rev=759&op=diff
==============================================================================
--- trunk/debian/changelog (original)
+++ trunk/debian/changelog Wed Jun  9 09:09:00 2010
@@ -55,9 +55,12 @@
     - permit different bonding definition for a specified host number (from 0.33-stable)
     - in Add_Network : fix th check for avoiding duplicate network, replacing
     Abort by Warn. Sometimes we need to have same subnets on differetn sites.
+    - remove Warn when defining initrd if deploymode is debian-installer or
+      ubuntu-installer
   * filters/filter_vlan2if : substitution occured with POPNAME keyword
     according to the value extracted from host parameter (backported from branche
     0.33-stable)
+  * forward port from branches/0.33-stable the Ubuntu support
 
   [ Thomas Parmelan ]
   * debian/control
@@ -84,7 +87,7 @@
     cmdline defined into host definition
   * debian/control : fixing deps for libmd5-perl which is included in perl >= 5.10
 
- -- Christophe Caillet <quadchris at free.fr>  Tue, 01 Jun 2010 13:09:43 +0200
+ -- Christophe Caillet <quadchris at free.fr>  Wed, 09 Jun 2010 11:07:21 +0200
 
 pf-tools (0.33.1-1) unstable; urgency=low
 

Modified: trunk/lib/PFTools/Net.pm
URL: http://svn.debian.org/wsvn/pf-tools/trunk/lib/PFTools/Net.pm?rev=759&op=diff
==============================================================================
--- trunk/lib/PFTools/Net.pm (original)
+++ trunk/lib/PFTools/Net.pm Wed Jun  9 09:09:00 2010
@@ -874,7 +874,6 @@
 		    } elsif ( $key eq 'deploymode' ) {
 			Abort ( $ERR_SYNTAX, "Invalid deploymode key for host ".$srv.$mnamindexnum." : ".$S->{$key}->{$mnamindexnum} )
 				if ( $S->{$key}->{$mnamindexnum} !~ /^$ALLOWED_DEPLOYMODE$/ ) ;
-			Warn ( $ERR_SYNTAX, "No need to defined initrd for host ".$srv.$mnamindexnum ) if ( defined $S->{'initrd'}->{$mnamindexnum} ) ;
 		    }
 		    $M->{$key} = $S->{$key}->{$mnamindexnum} ;
 		}
@@ -884,7 +883,6 @@
 		    } elsif ( $key eq 'deploymode' ) {
 			Abort ( $ERR_SYNTAX, "Invalid default deploymode key ".$S->{$key}->{'default'} )
 				if ( $S->{$key}->{'default'} !~ /^$ALLOWED_DEPLOYMODE$/ ) ;
-			Warn ( $ERR_SYNTAX, "No need to defined initrd for host ".$srv ) if ( defined $S->{'initrd'}->{'default'} ) ;
 		    }
 		    $M->{$key} = $S->{$key}->{'default'} ;
 		}

Modified: trunk/sbin/mk_grub2opt
URL: http://svn.debian.org/wsvn/pf-tools/trunk/sbin/mk_grub2opt?rev=759&op=diff
==============================================================================
--- trunk/sbin/mk_grub2opt (original)
+++ trunk/sbin/mk_grub2opt Wed Jun  9 09:09:00 2010
@@ -71,7 +71,7 @@
 	foreach ( @tmp_grub ) {
 		chomp ;
 		next if ( ! /^GRUB_CMDLINE_LINUX_DEFAULT=".*"$/ ) ;
-		s/\"$/ $cmd_line\"/ if ( defined $cmd_line && ! /$cmd_line$/ ) ;
+		s/\"$/ $cmd_line\"/ if ( defined $cmd_line && ! /\Q$cmd_line\E\"$/ ) ;
 	}
 	
 	if ( $dst eq '-' ) {

Modified: trunk/sbin/mk_pxelinuxcfg
URL: http://svn.debian.org/wsvn/pf-tools/trunk/sbin/mk_pxelinuxcfg?rev=759&op=diff
==============================================================================
--- trunk/sbin/mk_pxelinuxcfg (original)
+++ trunk/sbin/mk_pxelinuxcfg Wed Jun  9 09:09:00 2010
@@ -41,32 +41,39 @@
 	chmod ( oct ( $mode ), $PRESEED_REPOS ) ;
 }
 
-my $TPL_PRESEED		= "/usr/share/pf-tools/templates/standard-preseed.tpl" ;
+my $TPL_PRESEED			= "/usr/share/pf-tools/templates/standard-preseed.tpl" ;
+my $TPL_UBUNTU_PRESEED	= "/usr/share/pf-tools/templates/ubuntu-preseed.tpl" ;
 my $DEFAULT_PRESEED	= $PRESEED_REPOS."/default_preseed.txt" ;
 
-sub Get_kpkg_from_pxefilename ($) {
-	my ( $pxefilename ) = @_ ;
-	
-	if ( $pxefilename =~ /pxe/ ) {
-		my ( $vm, $type, $pxe, $version, @append ) = split ( /-/, $pxefilename ) ;
-		return "linux-image-".$version."-".$type."-".join ( "-", @append )."-grsec" ;
+sub Get_kpkg_from_pxefilename ($$) {
+	my ( $pxefilename, $deploymode ) = @_ ;
+	
+	if ( $deploymode =~ /^ubuntu/ ) {
+		$pxefilename =~ /vmlinuz-(.+)$/;
+		return "linux-image-".$1;
 	}
 	else {
-		my ( $vm, $version, $type, $append_version ) = split ( /-/, $pxefilename ) ;
-		return "linux-image-".$version."-".$type."-".$append_version."-grsec" ;
-	}
-}
-
-sub Build_preseed_filename ($$) {
-	my ( $srv_name, $ref_srv ) = @_ ;
-	
-	if ( ! open ( PRESEED_TPL, $TPL_PRESEED ) ) {
-		warn "Unable to get preseed template from file ".$TPL_PRESEED."\n" ;
+		if ( $pxefilename =~ /pxe/ ) {
+			my ( $vm, $type, $pxe, $version, @append ) = split ( /-/, $pxefilename ) ;
+			return "linux-image-".$version."-".$type."-".join ( "-", @append )."-grsec" ;
+		}
+		else {
+			my ( $vm, $version, $type, $append_version ) = split ( /-/, $pxefilename ) ;
+			return "linux-image-".$version."-".$type."-".$append_version."-grsec" ;
+		}
+	}
+}
+
+sub Build_preseed_filename ($$$) {
+	my ( $srv_name, $preseed_tpl, $ref_srv ) = @_ ;
+
+	if ( ! open ( PRESEED_TPL, $preseed_tpl ) ) {
+		warn "Unable to get preseed template from file ".$preseed_tpl."\n" ;
 		return $DEFAULT_PRESEED ;
 	}
 	my $preseed_content = join '', <PRESEED_TPL> ;
 	close ( PRESEED_TPL ) ;
-	my $deb_kernel = Get_kpkg_from_pxefilename ( $ref_srv->{'pxefilename'} ) ;
+	my $deb_kernel = Get_kpkg_from_pxefilename ( $ref_srv->{'pxefilename'}, $ref_srv->{'deploymode'} ) ;
 	$preseed_content =~ s/%KERNELPKG%/$deb_kernel/gs ;
 	
 	my $distrib	= $ref_srv->{'distrib'} ;
@@ -166,7 +173,12 @@
 
 								my $template_name ;
 								if ( $debian_installer ) {
-									$template_name = 'standard-installer' ;
+									if ( $M->{'deploymode'} =~ /^ubuntu/ ) {
+										$template_name = 'ubuntu-installer' ;
+									}
+									else {
+										$template_name = 'standard-installer' ;
+									}
 								}
 								else {
 									$template_name = $M->{'pxetemplate'} ? $M->{'pxetemplate'} : $default_template;
@@ -190,10 +202,23 @@
 								if ( $debian_installer ) {
 									# Building preseed file
 									$temptemplatecontent =~ s/%DEPLOYMODE%/$M->{'deploymode'}/gs ;
-									my $preseed_file = Build_preseed_filename ( $m, $M ) ;
+									$temptemplatecontent =~ s/%DISTRIB%/$M->{'distrib'}/gs ;
+									if ( defined $M->{'initrd'} ) {
+										$temptemplatecontent =~ s/%INITRD%/$M->{'initrd'}/gs ;
+									}
+									else {
+										$temptemplatecontent =~ s/initrd=([^\s]*)%INITRD%//gs ;
+									}
+									my $preseed_file;
+									if ( $M->{'deploymode'} =~ /^ubuntu/ ) {
+										$preseed_file = Build_preseed_filename ( $m, $TPL_UBUNTU_PRESEED, $M ) ;
+									}
+									else {
+										$preseed_file = Build_preseed_filename ( $m, $TPL_PRESEED, $M ) ;
+									}
 									# MD5sum on generated preseed file
 									$temptemplatecontent =~
-										s/%PRESEED_URL%/\/preseed\/$preseed_file/gs;
+										s/%PRESEED_URL%/preseed\/$preseed_file/gs;
 									my $preseed_md5 = Get_MD5SUM_from_preseedfilename ( $preseed_file ) ;
 									if ( ! defined $preseed_md5 ) {
 										die "Unable to get md5dum for preseed filename "

Modified: trunk/sbin/mk_sourceslist
URL: http://svn.debian.org/wsvn/pf-tools/trunk/sbin/mk_sourceslist?rev=759&op=diff
==============================================================================
--- trunk/sbin/mk_sourceslist (original)
+++ trunk/sbin/mk_sourceslist Wed Jun  9 09:09:00 2010
@@ -31,12 +31,14 @@
 use File::Copy ;
 use Getopt::Long qw( :config ignore_case_always bundling ) ;
 
-my $HELP	= 0 ;
-my $SRC 	= "" ;
-my $DST 	= "" ;
-my $TPL		= "/usr/share/pf-tools/templates/sources.list.tpl" ;
+my $HELP		= 0 ;
+my $SRC 		= "" ;
+my $DST 		= "" ;
+my $TPL_DIR		= "/usr/share/pf-tools/templates/" ;
+my $DEFAULT_TPL	= "sources.list.tpl";
+my $TPL			= "" ;
 my $SECTIONS	= "common" ;
-my $HOST	= '' ;
+my $HOST		= '' ;
 my $BACKPORTS	= 0 ;
 
 my $DEF_SECTIONS = {} ;
@@ -169,4 +171,11 @@
 }
 my $SRV		= $PF_NET->{'SERVERS'}->{'BY_NAME'}->{$hosttype}->{'SRVLIST'}->{$HOST} ;
 
+if ( $SRV->{'deploymode'} =~ /^ubuntu/ && $TPL eq "" ) {
+	$TPL = $TPL_DIR."ubuntu-sources.list.tpl";
+}
+elsif ( $TPL eq "" ) {
+	$TPL = $TPL_DIR.$DEFAULT_TPL;
+}
+
 Mk_sourceslist ( $SRV, $DST, $TPL, $SECTIONS ) ;

Added: trunk/templates/standard-preseed-squeeze.tpl
URL: http://svn.debian.org/wsvn/pf-tools/trunk/templates/standard-preseed-squeeze.tpl?rev=759&op=file
==============================================================================
--- trunk/templates/standard-preseed-squeeze.tpl (added)
+++ trunk/templates/standard-preseed-squeeze.tpl Wed Jun  9 09:09:00 2010
@@ -1,0 +1,218 @@
+#### Contents of the preconfiguration file (for lenny)
+### Localization
+# Locale sets language and country.
+d-i debian-installer/locale string en_US
+
+# Keyboard selection.
+d-i console-keymaps-at/keymap select fr
+
+### Network configuration
+d-i netcfg/choose_interface select eth0
+d-i netcfg/dhcp_timeout string 60
+d-i netcfg/get_hostname string unassigned-hostname
+d-i netcfg/get_domain string unassigned-domain
+# Disable that annoying WEP key dialog.
+d-i netcfg/wireless_wep string
+
+# If non-free firmware is needed for the network or other hardware, you can
+# configure the installer to always try to load it, without prompting. Or
+# change to false to disable asking.
+#d-i hw-detect/load_firmware boolean true
+
+### Network console
+# Use the following settings if you wish to make use of the network-console
+# component for remote installation over SSH. This only makes sense if you
+# intend to perform the remainder of the installation manually.
+#d-i anna/choose_modules string network-console
+#d-i network-console/password password r00tme
+#d-i network-console/password-again password r00tme
+
+### Mirror settings
+d-i mirror/country string manual
+d-i mirror/http/hostname string mirrors.private
+d-i mirror/http/directory string /%DISTSRC%
+d-i mirror/http/proxy string
+
+# Suite to install.
+d-i mirror/suite string %DISTRIB%
+# Suite to use for loading installer components (optional).
+#d-i mirror/udeb/suite string testing
+
+### Clock and time zone setup
+# Controls whether or not the hardware clock is set to UTC.
+d-i clock-setup/utc boolean false
+d-i time/zone string Europe/Paris
+d-i clock-setup/ntp boolean false
+d-i clock-setup/ntp-server string ntp.vlan-systeme.private
+
+### Partitioning
+d-i partman-auto/disk string /dev/sda
+d-i partman-auto/method string regular
+d-i partman-auto/purge_lvm_from_device boolean true
+d-i partman-lvm/confirm boolean true
+#d-i partman-auto/choose_recipe \
+#       select All files in one partition (recommended for new users)
+d-i partman-auto/expert_recipe string                       \
+      boot-root ::                                          \
+              64 72 80 ext3                                 \
+                     $primary{ } $bootable{ }               \
+                     method{ format } format{ }             \
+                     use_filesystem{ } filesystem{ ext3 }   \
+                     mountpoint{ /boot }                    \
+              .                                             \
+              500 10000 1000000000 ext3                     \
+	      	     $primary{ }			    \
+                     method{ format } format{ }             \
+                     use_filesystem{ } filesystem{ ext3 }   \
+                     mountpoint{ / }                        \
+              .                                             \
+              64 512 100% linux-swap                        \
+                     method{ swap } format{ }               \
+              .
+
+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/confirm boolean true
+
+### Base system installation
+# Select the initramfs generator used to generate the initrd for 2.6 kernels.
+#d-i base-installer/kernel/linux/initramfs-generators string yaird
+
+# The kernel image (meta) package to be installed; "none" can be used if no
+# kernel is to be installed.
+#d-i base-installer/kernel/image string linux-image-2.6-486
+
+### Account setup
+d-i passwd/root-login boolean false
+d-i passwd/user-fullname string Auto Installer
+d-i passwd/username string auto
+d-i passwd/user-password password auto
+d-i passwd/user-password-again password auto
+#d-i passwd/user-password-crypted password [MD5 hash]
+
+### Apt setup
+# You can choose to install non-free and contrib software.
+#d-i apt-setup/non-free boolean true
+#d-i apt-setup/contrib boolean true
+# Uncomment this if you don't want to use a network mirror.
+#d-i apt-setup/use_mirror boolean false
+# Select which update services to use; define the mirrors to be used.
+# Values shown below are the normal defaults.
+#d-i apt-setup/services-select multiselect security, volatile
+#d-i apt-setup/security_host string security.debian.org
+#d-i apt-setup/volatile_host string volatile.debian.org
+
+# Additional repositories, local[0-9] available
+#d-i apt-setup/local0/repository string \
+#       http://local.server/debian stable main
+#d-i apt-setup/local0/comment string local server
+# Enable deb-src lines
+#d-i apt-setup/local0/source boolean true
+# URL to the public key of the local repository; you must provide a key or
+# apt will complain about the unauthenticated repository and so the
+# sources.list line will be left commented out
+#d-i apt-setup/local0/key string http://local.server/key
+
+# By default the installer requires that repositories be authenticated
+# using a known gpg key. This setting can be used to disable that
+# authentication. Warning: Insecure, not recommended.
+#d-i debian-installer/allow_unauthenticated string true
+
+### Package selection
+#tasksel tasksel/first multiselect standard, web-server
+# If the desktop task is selected, install the kde and xfce desktops
+# instead of the default gnome desktop.
+#tasksel tasksel/desktop multiselect kde, xfce
+
+# Individual additional packages to install
+#d-i pkgsel/include string openssh-server build-essential
+# Whether to upgrade packages after debootstrap.
+# Allowed values: none, safe-upgrade, full-upgrade
+#d-i pkgsel/upgrade select none
+
+# Some versions of the installer can report back on what software you have
+# installed, and what software you use. The default is not to report back,
+# but sending reports helps the project determine what software is most
+# popular and include it on CDs.
+#popularity-contest popularity-contest/participate boolean false
+
+### Boot loader installation
+# Grub is the default boot loader (for x86). If you want lilo installed
+# instead, uncomment this:
+#d-i grub-installer/skip boolean true
+# To also skip installing lilo, and install no bootloader, uncomment this
+# too:
+#d-i lilo-installer/skip boolean true
+
+# This is fairly safe to set, it makes grub install automatically to the MBR
+# if no other operating system is detected on the machine.
+d-i grub-installer/only_debian boolean true
+
+# This one makes grub-installer install to the MBR if it also finds some other
+# OS, which is less safe as it might not be able to boot that other OS.
+d-i grub-installer/with_other_os boolean true
+
+# Alternatively, if you want to install to a location other than the mbr,
+# uncomment and edit these lines:
+#d-i grub-installer/only_debian boolean false
+#d-i grub-installer/with_other_os boolean false
+#d-i grub-installer/bootdev  string (hd0,0)
+# To install grub to multiple disks:
+#d-i grub-installer/bootdev  string (hd0,0) (hd1,0) (hd2,0)
+
+# Optional password for grub, either in clear text
+#d-i grub-installer/password password r00tme
+#d-i grub-installer/password-again password r00tme
+# or encrypted using an MD5 hash, see grub-md5-crypt(8).
+#d-i grub-installer/password-crypted password [MD5 hash]
+
+### Finishing up the installation
+# During installations from serial console, the regular virtual consoles
+# (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next
+# line to prevent this.
+#d-i finish-install/keep-consoles boolean true
+
+# Avoid that last message about the install being complete.
+d-i finish-install/reboot_in_progress note
+
+# This will prevent the installer from ejecting the CD during the reboot,
+# which is useful in some situations.
+#d-i cdrom-detect/eject boolean false
+
+# This is how to make the installer shutdown when finished, but not
+# reboot into the installed system.
+#d-i debian-installer/exit/halt boolean true
+# This will power off the machine instead of just halting it.
+#d-i debian-installer/exit/poweroff boolean true
+
+### Preseeding other packages
+# Depending on what software you choose to install, or if things go wrong
+# during the installation process, it's possible that other questions may
+# be asked. You can preseed those too, of course. To get a list of every
+# possible question that could be asked during an install, do an
+# installation, and then run these commands:
+#   debconf-get-selections --installer > file
+#   debconf-get-selections >> file
+
+
+#### Advanced options
+### Running custom commands during the installation
+# d-i preseeding is inherently not secure. Nothing in the installer checks
+# for attempts at buffer overflows or other exploits of the values of a
+# preconfiguration file like this one. Only use preconfiguration files from
+# trusted locations! To drive that home, and because it's generally useful,
+# here's a way to run any shell command you'd like inside the installer,
+# automatically.
+
+# This first command is run as early as possible, just after
+# preseeding is read.
+#d-i preseed/early_command string anna-install some-udeb
+
+# This command is run just before the install finishes, but when there is
+# still a usable /target directory. You can chroot to /target and use it
+# directly, or use the apt-install and in-target commands to easily install
+# packages and run commands in the target system.
+#d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh
+
+

Added: trunk/templates/ubuntu-installer
URL: http://svn.debian.org/wsvn/pf-tools/trunk/templates/ubuntu-installer?rev=759&op=file
==============================================================================
--- trunk/templates/ubuntu-installer (added)
+++ trunk/templates/ubuntu-installer Wed Jun  9 09:09:00 2010
@@ -1,0 +1,15 @@
+SERIAL 0 %SERIAL_SPEED% 2
+DISPLAY %DEPLOYMODE%/%ARCH%/boot-screens/myboot.txt
+
+DEFAULT linux
+
+LABEL install
+	kernel %DEPLOYMODE%/%ARCH%/linux
+	append DEBCONF_PRIORITY=critical vga=normal auto=true initrd=%DEPLOYMODE%/%ARCH%/initrd.gz console-setup/ask_detect=false console-setup/layoutcode=fr console-setup/codeset=. interface=eth0 netcfg/no_default_route=true netcfg/get_hostname=unassigned-hostname url=http://vip-deploy.private/%PRESEED_URL% url/checksum=%PRESEED_MD5% -- %CONSOLE% %CMDLINE%
+
+LABEL linux
+	kernel %KERNEL%
+	append vga=normal root=/dev/sda2 initrd=%INITRD% -- %CONSOLE% %CMDLINE%
+
+PROMPT 1
+TIMEOUT 100

Added: trunk/templates/ubuntu-preseed.tpl
URL: http://svn.debian.org/wsvn/pf-tools/trunk/templates/ubuntu-preseed.tpl?rev=759&op=file
==============================================================================
--- trunk/templates/ubuntu-preseed.tpl (added)
+++ trunk/templates/ubuntu-preseed.tpl Wed Jun  9 09:09:00 2010
@@ -1,0 +1,158 @@
+#### Contents of the preconfiguration file
+d-i debconf/priority select critical
+
+### Localization
+# Locale sets language and country.
+d-i debian-installer/locale string en_US
+
+# Keyboard selection.
+# Disable automatic (interactive) keymap detection.
+d-i console-setup/ask_detect boolean false
+#d-i console-setup/modelcode string pc105
+d-i console-setup/layoutcode string fr
+# To select a variant of the selected layout (if you leave this out, the
+# basic form of the layout will be used):
+d-i console-setup/variant select France - Alternative
+d-i console-setup/codeset select . Combined - Latin; Slavic Cyrillic; Hebrew; basic Arabic
+#d-i console-setup/variantcode string dvorak
+
+### Network configuration
+#d-i netcfg/choose_interface select auto
+#d-i interface select eth0
+d-i interface string eth0
+d-i interface seen false
+d-i netcfg/get_hostname string unassigned-hostname
+d-i netcfg/get_domain string unassigned-domain
+d-i netcfg/no_default_route boolean true
+# Disable that annoying WEP key dialog.
+d-i netcfg/wireless_wep string
+
+### Mirror settings
+d-i mirror/protocol string http
+d-i mirror/country string enter information manually
+d-i mirror/http/hostname string mirrors.private
+d-i mirror/http/directory string /%DISTSRC%
+d-i mirror/http/proxy string
+
+# Suite to install.
+d-i mirror/suite string %DISTRIB%
+
+### Clock and time zone setup
+d-i clock-setup/utc boolean false
+d-i time/zone string Europe/Paris
+d-i clock-setup/ntp boolean true
+d-i clock-setup/ntp-server string fwadmin.vlan-systeme.private
+
+### Partitioning
+d-i partman-auto/disk string /dev/sda
+d-i partman-auto/method string regular
+d-i partman-auto/purge_lvm_from_device boolean true
+d-i partman-lvm/confirm boolean true
+#d-i partman-auto/choose_recipe \
+#       select All files in one partition (recommended for new users)
+d-i partman-auto/expert_recipe string                       \
+      boot-root ::                                          \
+              64 72 80 ext3                                 \
+                     $primary{ } $bootable{ }               \
+                     method{ format } format{ }             \
+                     use_filesystem{ } filesystem{ ext3 }   \
+                     mountpoint{ /boot }                    \
+              .                                             \
+              500 10000 1000000000 ext3                     \
+	      	     $primary{ }			    \
+                     method{ format } format{ }             \
+                     use_filesystem{ } filesystem{ ext3 }   \
+                     mountpoint{ / }                        \
+              .                                             \
+              64 512 100% linux-swap                        \
+                     method{ swap } format{ }               \
+              .
+
+d-i partman/confirm_write_new_label boolean true
+d-i partman/choose_partition select finish
+d-i partman/confirm boolean true
+d-i partman/confirm_nooverwrite boolean true
+
+### Base system installation
+d-i base-installer/kernel/image string %KERNELPKG%
+
+### Account setup
+d-i passwd/root-login boolean false
+d-i passwd/user-fullname string Auto Installer
+d-i passwd/username string auto
+#d-i passwd/user-password password auto
+#d-i passwd/user-password-again password auto
+d-i passwd/user-password-crypted password $1$gVC67reb$0jLDco8fU.4PbBIpGzCXm.
+d-i user-setup/allow-password-weak boolean true
+
+
+### Apt setup
+d-i apt-setup/non-free boolean true
+d-i apt-setup/contrib boolean true
+d-i apt-setup/services-select string multi-select security
+d-i apt-setup/security_host string mirrors.private
+#d-i apt-setup/volatile_host string volatile.debian.org
+# Additional repositories, local[0-9] available
+d-i apt-setup/local0/repository string \
+       http://mirrors.private/%DISTSRC%-custom %DISTRIB%-custom common
+#d-i apt-setup/local0/key string http://local.server/key
+# By default the installer requires that repositories be authenticated
+# using a known gpg key. This setting can be used to disable that
+# authentication. Warning: Insecure, not recommended.
+d-i debian-installer/allow_unauthenticated string true
+
+### Package selection
+tasksel tasksel/first string multiselect standard
+# Individual additional packages to install
+#d-i pkgsel/include string openssh-server
+#d-i pkgsel/include string pf-tools
+popularity-contest popularity-contest/participate boolean false
+
+### Boot loader installation
+# Grub is the default boot loader (for x86). If you want lilo installed
+# instead, uncomment this:
+#d-i grub-installer/skip boolean true
+# To also skip installing lilo, and install no bootloader, uncomment this
+# too:
+#d-i lilo-installer/skip boolean true
+# This is fairly safe to set, it makes grub install automatically to the MBR
+# if no other operating system is detected on the machine.
+#d-i grub-installer/only_debian boolean true
+# This one makes grub-installer install to the MBR if it also finds some other
+# OS, which is less safe as it might not be able to boot that other OS.
+#d-i grub-installer/with_other_os boolean false
+# Alternatively, if you want to install to a location other than the mbr,
+# uncomment and edit these lines:
+#d-i grub-installer/only_debian boolean false
+#d-i grub-installer/with_other_os boolean false
+#d-i grub-installer/bootdev  string (hd0,0)
+# To install grub to multiple disks:
+#d-i grub-installer/bootdev  string (hd0,0) (hd1,0) (hd2,0)
+
+### Post-install command before reboot
+d-i preseed/late_command string apt-install %KERNELPKG% ; apt-install nfs-common ; apt-install pf-tools ; in-target wget http://mirrors.private/pf-tools-config.sh -O /tmp/pf-tools-config.sh ; in-target sh /tmp/pf-tools-config.sh 
+
+### Finishing up the installation
+# Avoid that last message about the install being complete.
+d-i finish-install/reboot_in_progress note
+
+#### Advanced options
+### Running custom commands during the installation
+# d-i preseeding is inherently not secure. Nothing in the installer checks
+# for attempts at buffer overflows or other exploits of the values of a
+# preconfiguration file like this one. Only use preconfiguration files from
+# trusted locations! To drive that home, and because it's generally useful,
+# here's a way to run any shell command you'd like inside the installer,
+# automatically.
+
+# This first command is run as early as possible, just after
+# preseeding is read.
+#d-i preseed/early_command string anna-install some-udeb
+
+# This command is run just before the install finishes, but when there is
+# still a usable /target directory. You can chroot to /target and use it
+# directly, or use the apt-install and in-target commands to easily install
+# packages and run commands in the target system.
+#d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh
+#d-i preseed/late_command string apt-install pf-tools; in-target update-config
+

Added: trunk/templates/ubuntu-sources.list.tpl
URL: http://svn.debian.org/wsvn/pf-tools/trunk/templates/ubuntu-sources.list.tpl?rev=759&op=file
==============================================================================
--- trunk/templates/ubuntu-sources.list.tpl (added)
+++ trunk/templates/ubuntu-sources.list.tpl Wed Jun  9 09:09:00 2010
@@ -1,0 +1,8 @@
+# Generated by mk_sourceslist : DO NOT EDIT MANUALLY !
+# Except if you know what you're doing
+
+deb http://mirrors.private/%DISTSRC% %DISTRIB% %DEFAULT_SECTIONS%
+
+deb http://mirrors.private/%DISTSRC% %DISTRIB%-security %DEFAULT_SECTIONS%
+
+deb http://mirrors.private/%DISTSRC%-custom %DISTRIB%-custom %CUSTOM_SECTIONS%




More information about the pf-tools-commits mailing list