pf-tools commit: r746 [ccaillet-guest] - in /branches/0.33-stable: debian/changelog sbin/mk_grub2opt sbin/mk_pxelinuxcfg sbin/mk_sourceslist templates/ubuntu-installer templates/ubuntu-preseed.tpl templates/ubuntu-sources.list.tpl
parmelan-guest at users.alioth.debian.org
parmelan-guest at users.alioth.debian.org
Fri Jun 4 15:40:10 UTC 2010
Author: ccaillet-guest
Date: Fri Jun 4 15:40:01 2010
New Revision: 746
URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=746
Log:
* sbin/mk_pxelinuxcfg : use specific templates for ubuntu distros
* sbin/mk_grub2opt : small fix on cmdline substitution
* sbin/mk_sourceslist : use specific templates for ubuntu distros
* adding ubuntu specific templates for PXE, preseed and sources.list files
Added:
branches/0.33-stable/templates/ubuntu-installer
branches/0.33-stable/templates/ubuntu-preseed.tpl
branches/0.33-stable/templates/ubuntu-sources.list.tpl
Modified:
branches/0.33-stable/debian/changelog
branches/0.33-stable/sbin/mk_grub2opt
branches/0.33-stable/sbin/mk_pxelinuxcfg
branches/0.33-stable/sbin/mk_sourceslist
Modified: branches/0.33-stable/debian/changelog
URL: http://svn.debian.org/wsvn/pf-tools/branches/0.33-stable/debian/changelog?rev=746&op=diff
==============================================================================
--- branches/0.33-stable/debian/changelog (original)
+++ branches/0.33-stable/debian/changelog Fri Jun 4 15:40:01 2010
@@ -1,4 +1,4 @@
-pf-tools (0.33.20-WIP0) unstable; urgency=low
+pf-tools (0.33.20-1) unstable; urgency=low
[ Christophe Caillet ]
* lib/PFTools/Net.pm
@@ -7,6 +7,10 @@
is commented, waiting for activation if needed.
- in Add_Server : adding the possibility for "undefining" an interface for
a particular numbered host with the special value "NONE"
+ * sbin/mk_pxelinuxcfg : use specific templates for ubuntu distros
+ * sbin/mk_grub2opt : small fix on cmdline substitution
+ * sbin/mk_sourceslist : use specific templates for ubuntu distros
+ * adding ubuntu specific templates for PXE, preseed and sources.list files
[ Thomas Parmelan ]
* lib/PFTools/Net.pm:
@@ -23,7 +27,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> Fri, 14 May 2010 15:03:07 +0200
+ -- Christophe Caillet <quadchris at free.fr> Fri, 04 Jun 2010 17:22:54 +0200
pf-tools (0.33.19-1) unstable; urgency=low
Modified: branches/0.33-stable/sbin/mk_grub2opt
URL: http://svn.debian.org/wsvn/pf-tools/branches/0.33-stable/sbin/mk_grub2opt?rev=746&op=diff
==============================================================================
--- branches/0.33-stable/sbin/mk_grub2opt (original)
+++ branches/0.33-stable/sbin/mk_grub2opt Fri Jun 4 15:40:01 2010
@@ -71,7 +71,7 @@
foreach ( @tmp_grub ) {
chomp ;
next if ( ! /^GRUB_CMDLINE_LINUX_DEFAULT=".*"$/ ) ;
- s/\"$/ $cmd_line\"/ if ( defined $cmd_line && ! /\Q$cmd_line\E$/ ) ;
+ s/\"$/ $cmd_line\"/ if ( defined $cmd_line && ! /\Q$cmd_line\E\"$/ ) ;
}
if ( $dst eq '-' ) {
Modified: branches/0.33-stable/sbin/mk_pxelinuxcfg
URL: http://svn.debian.org/wsvn/pf-tools/branches/0.33-stable/sbin/mk_pxelinuxcfg?rev=746&op=diff
==============================================================================
--- branches/0.33-stable/sbin/mk_pxelinuxcfg (original)
+++ branches/0.33-stable/sbin/mk_pxelinuxcfg Fri Jun 4 15:40:01 2010
@@ -41,7 +41,8 @@
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 ($) {
@@ -57,11 +58,11 @@
}
}
-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" ;
+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> ;
@@ -166,7 +167,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;
@@ -191,7 +197,13 @@
# Building preseed file
$temptemplatecontent =~ s/%DEPLOYMODE%/$M->{'deploymode'}/gs ;
$temptemplatecontent =~ s/%DISTRIB%/$M->{'distrib'}/gs ;
- my $preseed_file = Build_preseed_filename ( $m, $M ) ;
+ 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;
Modified: branches/0.33-stable/sbin/mk_sourceslist
URL: http://svn.debian.org/wsvn/pf-tools/branches/0.33-stable/sbin/mk_sourceslist?rev=746&op=diff
==============================================================================
--- branches/0.33-stable/sbin/mk_sourceslist (original)
+++ branches/0.33-stable/sbin/mk_sourceslist Fri Jun 4 15:40:01 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,8 @@
}
my $SRV = $PF_NET->{'SERVERS'}->{'BY_NAME'}->{$hosttype}->{'SRVLIST'}->{$HOST} ;
+if ( $SRV->{'deploymode'} =~ /^ubuntu/ && $TPL eq "" ) {
+ $TPL = $TPL_DIR."ubuntu-sources.list.tpl";
+}
+
Mk_sourceslist ( $SRV, $DST, $TPL, $SECTIONS ) ;
Added: branches/0.33-stable/templates/ubuntu-installer
URL: http://svn.debian.org/wsvn/pf-tools/branches/0.33-stable/templates/ubuntu-installer?rev=746&op=file
==============================================================================
--- branches/0.33-stable/templates/ubuntu-installer (added)
+++ branches/0.33-stable/templates/ubuntu-installer Fri Jun 4 15:40:01 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 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 -- %CONSOLE% %CMDLINE%
+
+PROMPT 1
+TIMEOUT 100
Added: branches/0.33-stable/templates/ubuntu-preseed.tpl
URL: http://svn.debian.org/wsvn/pf-tools/branches/0.33-stable/templates/ubuntu-preseed.tpl?rev=746&op=file
==============================================================================
--- branches/0.33-stable/templates/ubuntu-preseed.tpl (added)
+++ branches/0.33-stable/templates/ubuntu-preseed.tpl Fri Jun 4 15:40:01 2010
@@ -1,0 +1,156 @@
+#### 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/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: branches/0.33-stable/templates/ubuntu-sources.list.tpl
URL: http://svn.debian.org/wsvn/pf-tools/branches/0.33-stable/templates/ubuntu-sources.list.tpl?rev=746&op=file
==============================================================================
--- branches/0.33-stable/templates/ubuntu-sources.list.tpl (added)
+++ branches/0.33-stable/templates/ubuntu-sources.list.tpl Fri Jun 4 15:40:01 2010
@@ -1,0 +1,10 @@
+# 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% %DISTSRC%-security %DEFAULT_SECTIONS%
+
+deb http://mirrors.private/%DISTSRC%-custom %DISTRIB%-custom %CUSTOM_SECTIONS%
+
+
More information about the pf-tools-commits
mailing list