Author: arighi
Date: 2008-02-24 05:36:53 -0600 (Sun, 24 Feb 2008)
New Revision: 4401
Added:
branches/4.0.x/debian/patches/
Removed:
branches/4.0.x/doc/man/si_pushupdate.content.sgml
branches/4.0.x/doc/man/si_pushupdate.sgml
branches/4.0.x/patches/raidtools.10chkactive.patch
branches/4.0.x/patches/raidtools.20gcc3_3fix.patch
Modified:
branches/4.0.x/TODO
branches/4.0.x/debian/control.arch.in
branches/4.0.x/debian/rules
branches/4.0.x/debian/systemimager-initrd-template-alpha.postinst
branches/4.0.x/debian/systemimager-initrd-template-amd64.postinst
branches/4.0.x/debian/systemimager-initrd-template-i386.postinst
branches/4.0.x/debian/systemimager-initrd-template-ia64.postinst
branches/4.0.x/debian/systemimager-initrd-template-parisc.postinst
branches/4.0.x/debian/systemimager-initrd-template-ppc.postinst
branches/4.0.x/debian/systemimager-initrd-template-ppc64-iSeries.postinst
branches/4.0.x/debian/systemimager-initrd-template-ppc64.postinst
branches/4.0.x/debian/systemimager-initrd-template-ppc64ydl.postinst
branches/4.0.x/doc/man/Makefile
branches/4.0.x/doc/manual_source/ssh-howto.sgml
branches/4.0.x/doc/manual_source/systemimager-manual.sgml
branches/4.0.x/doc/manual_source/usage.sgml
branches/4.0.x/etc/autoinstallscript.template
branches/4.0.x/etc/getimage.exclude
branches/4.0.x/initrd_source/make.d/rsync.rul
branches/4.0.x/initrd_source/skel/etc/init.d/functions
branches/4.0.x/lib/SystemImager/Server.pm
branches/4.0.x/lib/SystemImager/UseYourOwnKernel.pm
branches/4.0.x/sbin/si_clusterconfig
branches/4.0.x/sbin/si_mkautoinstallscript
branches/4.0.x/sbin/si_mkdhcpstatic
branches/4.0.x/sbin/si_netbootmond
branches/4.0.x/sbin/si_pushupdate
branches/4.0.x/sbin/si_updateclient
Log:
This commit is a merge of several commits from trunk -> 4.0.x
Summary of the changes
======================
r4366:
- fix: netbootmond generates a wrong localboot file when deploying over a ssh
tunnel
r4367:
- fix: hard-code architecture for initrd_template deb packages
r4368:
- if no argument is passed to si_clusterconfig show all clients, instead of
exiting with an error
r4370:
- removing unused patches for raidtools
r4371:
- fix: correctly saves all the files that could be modified by
systemconfigurator before running it
r4372:
fixed a typo (initre -> initrd)
r4373:
updated TODO list
r4374:
- re-implemented si_pushupdate to work over si_psh
r4380:
fix: added the correct path of dhcpd.leases in RHEL5
r4381:
- rewrite editor detection code in si_clusterconfig in a more portable way
r4383:
added the directory debian/patches to include Debian-specific patches.
r4386:
As delivered, si_updateclient was updating every file on the harddisk of the
client even if these files have not been modified in the image. It comes from
the '-I' option of rsync (ignore dates of files) which was added for the
overrides. But it is also used for the main files. I have added the var
$rsyncopt which is '-av' for the main files of the image and '-aIv' for the
overrides.
Signed-off-by: Philippe Poilbarbe <Phi...@cl...>
r4388:
- fix disk names in /boot/grub/device.map if it exists in the image
r4390:
allow si_clusterconfig to show the image associated to each client
r4391:
- rewritten UYOK kernel detection routine
This also allows to properly detect Xen kernels.
r4392:
- allow to auto-detect disks when imaging Xen VMs
r4393:
- properly detect UYOK kernel version also when the build string contains the
the build date in the yyyy/mm/dd format
r4394:
- fix: automaticaly exclude blkid.tab from images
r4395:
- allow to auto-detect disks when imaging Xen VMs
r4396:
- fix: correctly skip non-kernel files in UYOK kernel detection
r4397:
- fix: set correct disk names for systemconfigurator
r4398:
- any change in autoinstallscript.conf now automatically fixes the boot-loader
configuration, so the warning in si_mkautoinstallscript is no more needed,
just remove it.
r4399:
updated rsync to 3.0.0pre10
r4400:
- print image size on the console before starting imaging
Modified: branches/4.0.x/TODO
===================================================================
--- branches/4.0.x/TODO 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/TODO 2008-02-24 11:36:53 UTC (rev 4401)
@@ -18,6 +18,9 @@
TODO list for SystemImager
==========================
+(8) Introduce a new command (si_power) to control the power of the clients
+ (turn on/off/reboot, etc.), see also: ipmitool, BMC.
+
(8) Create a new module called SystemImager::Monitor to implement all the common
monitoring functions.
@@ -29,21 +32,6 @@
- si_monitorcurses: ncurses-based interface
- si_monitortk: perl-Tk interface
-(8) Implement a wrapper (i.e. si_ssh) to start an ssh session on a imaging
- client (to be used with SSHD=y installation parameter).
-
- When a client is imaging and the ssh daemon is started a temporary host key
- is generated and the fingerprint of this key must be not included in the
- known_hosts file of the image server.
-
- A workaround is to execute ssh from the image server with the following options:
-
- ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null <target_host>
-
- Another approach could be to implement a --imaging option in si_psh, to
- execute remote commands on the imaging clients. This would be also
- host-groups, host-ranges, group-ranges, etc compliant.
-
(7) Split boel_binaries.tar.gz in:
- boel_modules.tar.gz: that contains only the default BOEL modules
Modified: branches/4.0.x/debian/control.arch.in
===================================================================
--- branches/4.0.x/debian/control.arch.in 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/debian/control.arch.in 2008-02-24 11:36:53 UTC (rev 4401)
@@ -17,7 +17,7 @@
Architecture: all
Recommends: systemimager-server | systemimager-client
Conflicts: systemimager-bin-${misc:Package-Arch}, systemimager-kernel-${misc:Package-Arch}, systemimager-initrd-${misc:Package-Arch}, systemimager-boot-standard-${misc:Package-Arch}, systemimager-ssh-${misc:Package-Arch}, systemimager-server (<< 3.8.0), systemimager-client (<< 3.8.0)
-Description: SystemImager initre template for ${misc:Package-Arch} client nodes
+Description: SystemImager initrd template for ${misc:Package-Arch} client nodes
SystemImager is a set of utilities for installing GNU/Linux software images to
client machines over the network. Images are stored in flat
files on the server, making updates easy. The rsync protocol is used for
Copied: branches/4.0.x/debian/patches (from rev 4383, trunk/debian/patches)
Modified: branches/4.0.x/debian/rules
===================================================================
--- branches/4.0.x/debian/rules 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/debian/rules 2008-02-24 11:36:53 UTC (rev 4401)
@@ -46,13 +46,18 @@
-p $(PKG)-server-flamethrowerd \
-p $(PKG)-server-bittorrent
-BOOTARCHS = alpha i386 ia64 parisc ppc64-iSeries ppc64-ps3 ppc64 ppc64ydl ppc amd64
+BOOTARCHS = alpha i386 ia64 parisc ppc64-iSeries ppc64-ps3 ppc64 ppc64ydl ppc amd64
-PATCHES=$(sort $(shell find $(CURDIR)/patches -name "*.patch"))
+PATCHES=$(sort $(shell find $(CURDIR)/debian/patches -name "*.patch"))
configure: configure-stamp
configure-stamp:
dh_testdir
+ @cd $(BUILD_DIR) && \
+ $(foreach patch, $(PATCHES), \
+ echo -n Applying `basename $(patch)`... && cat $(patch) | \
+ patch -s -p1 && echo done. &&) /bin/true
+
cd $(BUILD_DIR) && ./configure
touch configure-stamp
Modified: branches/4.0.x/debian/systemimager-initrd-template-alpha.postinst
===================================================================
--- branches/4.0.x/debian/systemimager-initrd-template-alpha.postinst 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/debian/systemimager-initrd-template-alpha.postinst 2008-02-24 11:36:53 UTC (rev 4401)
@@ -1,6 +1,6 @@
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=alpha
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
@@ -8,7 +8,7 @@
#DEBHELPER#
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=alpha
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
Modified: branches/4.0.x/debian/systemimager-initrd-template-amd64.postinst
===================================================================
--- branches/4.0.x/debian/systemimager-initrd-template-amd64.postinst 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/debian/systemimager-initrd-template-amd64.postinst 2008-02-24 11:36:53 UTC (rev 4401)
@@ -1,6 +1,6 @@
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=x86_64
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
@@ -8,7 +8,7 @@
#DEBHELPER#
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=x86_64
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
Modified: branches/4.0.x/debian/systemimager-initrd-template-i386.postinst
===================================================================
--- branches/4.0.x/debian/systemimager-initrd-template-i386.postinst 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/debian/systemimager-initrd-template-i386.postinst 2008-02-24 11:36:53 UTC (rev 4401)
@@ -1,6 +1,6 @@
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=i386
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
@@ -8,7 +8,7 @@
#DEBHELPER#
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=i386
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
Modified: branches/4.0.x/debian/systemimager-initrd-template-ia64.postinst
===================================================================
--- branches/4.0.x/debian/systemimager-initrd-template-ia64.postinst 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/debian/systemimager-initrd-template-ia64.postinst 2008-02-24 11:36:53 UTC (rev 4401)
@@ -1,6 +1,6 @@
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=ia64
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
@@ -8,7 +8,7 @@
#DEBHELPER#
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=ia64
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
Modified: branches/4.0.x/debian/systemimager-initrd-template-parisc.postinst
===================================================================
--- branches/4.0.x/debian/systemimager-initrd-template-parisc.postinst 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/debian/systemimager-initrd-template-parisc.postinst 2008-02-24 11:36:53 UTC (rev 4401)
@@ -1,6 +1,6 @@
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=parisc
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
@@ -8,7 +8,7 @@
#DEBHELPER#
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=parisc
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
Modified: branches/4.0.x/debian/systemimager-initrd-template-ppc.postinst
===================================================================
--- branches/4.0.x/debian/systemimager-initrd-template-ppc.postinst 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/debian/systemimager-initrd-template-ppc.postinst 2008-02-24 11:36:53 UTC (rev 4401)
@@ -1,6 +1,6 @@
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=ppc
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
@@ -8,7 +8,7 @@
#DEBHELPER#
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=ppc
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
Modified: branches/4.0.x/debian/systemimager-initrd-template-ppc64-iSeries.postinst
===================================================================
--- branches/4.0.x/debian/systemimager-initrd-template-ppc64-iSeries.postinst 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/debian/systemimager-initrd-template-ppc64-iSeries.postinst 2008-02-24 11:36:53 UTC (rev 4401)
@@ -1,6 +1,6 @@
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=ppc64-iSeries
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
@@ -8,7 +8,7 @@
#DEBHELPER#
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=ppc64-iSeries
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
Modified: branches/4.0.x/debian/systemimager-initrd-template-ppc64.postinst
===================================================================
--- branches/4.0.x/debian/systemimager-initrd-template-ppc64.postinst 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/debian/systemimager-initrd-template-ppc64.postinst 2008-02-24 11:36:53 UTC (rev 4401)
@@ -1,6 +1,6 @@
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=ppc64
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
@@ -8,7 +8,7 @@
#DEBHELPER#
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=ppc64
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
Modified: branches/4.0.x/debian/systemimager-initrd-template-ppc64ydl.postinst
===================================================================
--- branches/4.0.x/debian/systemimager-initrd-template-ppc64ydl.postinst 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/debian/systemimager-initrd-template-ppc64ydl.postinst 2008-02-24 11:36:53 UTC (rev 4401)
@@ -1,6 +1,6 @@
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=ppc64ydl
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
@@ -8,7 +8,7 @@
#DEBHELPER#
#!/bin/sh
-ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`
+ARCH=ppc64ydl
INITRD_TEMPLATE_DIR=/usr/share/systemimager/boot/${ARCH}/standard/initrd_template
cd ${INITRD_TEMPLATE_DIR}/dev && MAKEDEV std tty1 tty2 tty3 tty4 tty5 tty6
Modified: branches/4.0.x/doc/man/Makefile
===================================================================
--- branches/4.0.x/doc/man/Makefile 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/doc/man/Makefile 2008-02-24 11:36:53 UTC (rev 4401)
@@ -29,7 +29,6 @@
systemimager.conf.5 \
systemimager-rsyncd.conf.5 \
si_mkrsyncd_conf.8 \
- si_pushupdate.8 \
si_mkclientnetboot.8 \
si_mkbootpackage.8 \
\
@@ -42,7 +41,8 @@
si_pushoverrides.8 \
si_mkautoinstalldisk.8 \
si_netbootmond.8 \
- si_clusterconfig.8
+ si_clusterconfig.8 \
+ si_pushupdate.8
CLIENT_MAN = si_prepareclient.8 si_updateclient.8
@@ -91,6 +91,9 @@
si_clusterconfig.8: $(TOPDIR)/sbin/si_clusterconfig
pod2man --release=$(SYSTEMIMAGER_VERSION) -s 8 -c "SystemImager" $< $@
+si_pushupdate.8: $(TOPDIR)/sbin/si_pushupdate
+ pod2man --release=$(SYSTEMIMAGER_VERSION) -s 8 -c "SystemImager" $< $@
+
%.5 %.8: %.sgml %.content.sgml
docbook2man $<
mv $(shell echo $@ | tr '[:lower:]' '[:upper:]') $@
Deleted: branches/4.0.x/doc/man/si_pushupdate.content.sgml
===================================================================
--- branches/4.0.x/doc/man/si_pushupdate.content.sgml 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/doc/man/si_pushupdate.content.sgml 2008-02-24 11:36:53 UTC (rev 4401)
@@ -1,249 +0,0 @@
- <refentryinfo>
- <address>
- &dhemail;
- </address>
- <author>
- &dhfirstname;
- &dhsurname;
- </author>
- <copyright>
- <year>2001</year>
- <holder>&dhusername;</holder>
- </copyright>
- &dhdate;
- </refentryinfo>
- <refmeta>
- <refentrytitle>SI_PUSHUPDATE</refentrytitle>
-
- &dhsection;
- </refmeta>
- <refnamediv>
- <refname>si_pushupdate</refname>
-
- <refpurpose>update the image of one or more remote clients</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>si_pushupdate</command>
-
- <arg><option>-help</option></arg>
- <arg><option>-version</option></arg>
- <arg><option>-client <replaceable>HOSTNAME</replaceable></option></arg>
- <arg><option>-range <replaceable>X-Y</replaceable></option></arg>
- <arg>
- <option>-domain <replaceable>DOMAINNAME</replaceable></option>
- </arg>
- <arg><option>-clients-file <replaceable>FILE</replaceable></option></arg>
- <arg>
- <option>-concurrent-processes <replaceable>N</replaceable></option>
- </arg>
- <arg><option>-ssh-user</option></arg>
- <arg><option>-continue-install</option></arg>
- <arg><option>-reboot</option></arg>
-
- </cmdsynopsis>
- <para>
- Options for updateclient: (The following options will be passed on to the
- <command>si_updateclient</command> command)
- </para>
- <cmdsynopsis>
- <arg><option>-server <replaceable>HOSTNAME</replaceable></option></arg>
- <arg><option>-image <replaceable>IMAGENAME</replaceable></option></arg>
- <arg>
- <option>-directory <replaceable>DIRECTORY</replaceable></option>
- </arg>
- <arg><option>-nolilo</option></arg>
- <arg><option>-autoinstall</option></arg>
- <arg>
- <option>-configure-from <replaceable>DEVICE</replaceable></option>
- </arg>
- <arg><option>-reboot</option></arg>
- <arg><option>-log <replaceable>"STRING"</replaceable></option></arg>
- </cmdsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>DESCRIPTION</title>
-
- <para>This manual page documents briefly the
- <command>si_pushupdate</command> command.</para>
-
- <para>
- <command>si_pushupdate</command> is a tool for updating the image on one or
- more client nodes. It relies on the availability of ssh as a transport
- layer for communicating with client nodes.
- </para>
-
- </refsect1>
- <refsect1>
- <title>OPTIONS</title>
-
- <para>A summary of options is included below.</para>
-
- <variablelist>
- <varlistentry>
- <term><option>-help</option></term>
- <listitem>
- <para>Show summary of options</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-version</option></term>
- <listitem>
- <para>Display version and copyright information</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-client HOSTNAME</option></term>
- <listitem>
- <para>
- Host name of the client you want to update. When used
- with -continue-install, the name of the client to autoinstall.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-range X-Y</option></term>
- <listitem>
- <para>
- Number range used to create a series of host names based on the
- -client option. For example, "-client www -range 1-3" will cause
- si_pushupdate to use www1, www2, and www3 as host names. If no -range
- is given with -client, then si_pushupdate assumes that only one client
- is to be updated.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-domain DOMAINNAME</option></term>
- <listitem>
- <para>
- If this option is used, DOMAINNAME will be appended to the client
- host name(s).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-clients-file FILE</option></term>
- <listitem>
- <para>
- Read host names and images to process from FILE.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-concurrent-processes N</option></term>
- <listitem>
- <para>
- Number of concurrent process to run. If this option is not used,
- N will default to 1.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-ssh-user</option></term>
- <listitem>
- <para>
- Username for ssh connection to client.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-continue-install</option></term>
- <listitem>
- <para>
- Hosts should be treated as autoinstall clients waiting for further
- instruction.
- </para>
- <para>
- WARNING: deprecated option!
- </para>
- <para>
- See "perldoc si_pushinstall" for more details.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-server HOSTNAME</option></term>
- <listitem>
- <para>Hostname or IP address of the imageserver. (-imageserver is
- a deprecated option and will go away soon.)</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-image IMAGENAME</option></term>
- <listitem>
- <para>Image from which the client should be updated</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-directory DIRECTORY</option></term>
- <listitem>
- <para>Absolute path of the directory to be updated (defaults to "/")
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-nolilo</option></term>
- <listitem>
- <para>Don't run lilo after update completes. (lilo is always run
- unless specified)</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-autoinstall</option></term>
- <listitem>
- <para>Autoinstall this client the next time it reboots.
- (can't be run with -nolilo)</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-configure-from DEVICE</option></term>
- <listitem>
- <para>Only used with -autoinstall. Stores the network configuration
- for DEVICE in the /local.cfg file so that the same settings will be
- used during the autoinstall process.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-reboot</option></term>
- <listitem>
- <para>Reboot client after update completes</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-log "STRING"</option></term>
- <listitem>
- <para>
- Quoted string for log file format. See the rsyncd.conf man page
- for options.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1>
- <title>SEE ALSO</title>
-
- <para>
- <command>si_updateclient</command>(8)
- </para>
-
- <para>More details can be found in the <citetitle>SystemImager
- manual.</citetitle>
- </para>
- </refsect1>
- <refsect1>
- <title>AUTHOR</title>
-
- <para>This manual page was compiled by &dhusername; <&dhemail;> for
- the &debian; system (but may be used by others).</para>
-
- <!-- <para>Permission is granted to copy, distribute and/or modify
- this document under the terms of the <acronym>GNU</acronym> Free
- Documentation License, Version 1.1 or any later version
- published by the Free Software Foundation; with no Invariant
- Sections, no Front-Cover Texts and no Back-Cover Texts. A copy
- of the license can be found under
- <filename>/usr/share/common-licenses/FDL</filename>.</para> -->
-
- </refsect1>
Deleted: branches/4.0.x/doc/man/si_pushupdate.sgml
===================================================================
--- branches/4.0.x/doc/man/si_pushupdate.sgml 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/doc/man/si_pushupdate.sgml 2008-02-24 11:36:53 UTC (rev 4401)
@@ -1,37 +0,0 @@
-<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
- <!ENTITY content SYSTEM "si_pushupdate.content.sgml">
- <!-- Fill in your name for FIRSTNAME and SURNAME. -->
- <!ENTITY dhfirstname "<firstname>dann</firstname>">
- <!ENTITY dhsurname "<surname>frazier</surname>">
- <!-- Please adjust the date whenever revising the manpage. -->
- <!ENTITY dhdate "<date>March 4, 2001</date>">
- <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
- allowed: see man(7), man(1). -->
- <!ENTITY dhsection "<manvolnum>8</manvolnum>">
- <!ENTITY dhemail "<email>da...@de...</email>">
- <!ENTITY dhusername "dann">
-
- <!ENTITY debian "<productname>Debian GNU/Linux</productname>">
- <!ENTITY gnu "<acronym>GNU</acronym>">
-]>
-
-<refentry>
- &content;
-</refentry>
-
-<!-- Keep this comment at the end of the file
-Local variables:
-mode: sgml
-sgml-omittag:t
-sgml-shorttag:t
-sgml-minimize-attributes:nil
-sgml-always-quote-attributes:t
-sgml-indent-step:2
-sgml-indent-data:t
-sgml-parent-document:nil
-sgml-default-dtd-file:nil
-sgml-exposed-tags:nil
-sgml-local-catalogs:nil
-sgml-local-ecat-files:nil
-End:
--->
Modified: branches/4.0.x/doc/manual_source/ssh-howto.sgml
===================================================================
--- branches/4.0.x/doc/manual_source/ssh-howto.sgml 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/doc/manual_source/ssh-howto.sgml 2008-02-24 11:36:53 UTC (rev 4401)
@@ -211,7 +211,7 @@
a single shot. For example if you have to image from node01 up to node20 run:
<programlisting>
- # si_pushupdate --hosts node01-node020
+ # si_pushinstall --hosts node01-node20
</programlisting>
Then boot the clients with the autoinstall CD / USB drive or via PXE and enjoy
Modified: branches/4.0.x/doc/manual_source/systemimager-manual.sgml
===================================================================
--- branches/4.0.x/doc/manual_source/systemimager-manual.sgml 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/doc/manual_source/systemimager-manual.sgml 2008-02-24 11:36:53 UTC (rev 4401)
@@ -11,11 +11,10 @@
<!ENTITY simkdhcpstatic SYSTEM "../man/si_mkdhcpstatic.content.sgml">
<!ENTITY simvimage SYSTEM "../man/si_mvimage.content.sgml">
<!ENTITY siprepareclient SYSTEM "../man/si_prepareclient.content.sgml">
- <!ENTITY sipushupdate SYSTEM "../man/si_pushupdate.content.sgml">
<!ENTITY sirmimage SYSTEM "../man/si_rmimage.content.sgml">
<!ENTITY simkrsyncdconf SYSTEM "../man/si_mkrsyncd_conf.content.sgml">
<!ENTITY siupdateclient SYSTEM "../man/si_updateclient.content.sgml">
-
+
<!ENTITY chapter1 SYSTEM "intro.sgml">
<!ENTITY chapter2 SYSTEM "installation.sgml">
<!ENTITY chapter3 SYSTEM "usage.sgml">
@@ -42,7 +41,7 @@
<!ENTITY manemail "<email>da...@da...</email>">
<!ENTITY dhusername "dann">
<!ENTITY manusername "dann">
-
+
<!ENTITY debian "<productname>Debian GNU/Linux</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
]>
Modified: branches/4.0.x/doc/manual_source/usage.sgml
===================================================================
--- branches/4.0.x/doc/manual_source/usage.sgml 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/doc/manual_source/usage.sgml 2008-02-24 11:36:53 UTC (rev 4401)
@@ -343,7 +343,8 @@
</para>
<para>
<command>si_clusterconfig</command> can be used also to show the
- defined groups with the list of clients that belong to each group.
+ defined groups with the list of clients that belong to each group
+ and/or the image associated to each client or group of clients.
In show-mode the command accepts as argument a list of hostnames,
host-ranges and/or host-group, it resolves them in the equivalent
list of hostnames and prints them to stdout. The edit-mode can be
Modified: branches/4.0.x/etc/autoinstallscript.template
===================================================================
--- branches/4.0.x/etc/autoinstallscript.template 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/etc/autoinstallscript.template 2008-02-24 11:36:53 UTC (rev 4401)
@@ -118,7 +118,7 @@
DISKS=`expr $DISKS + 1`
done
;;
- hd | sd )
+ hd | sd | xvd )
for dev in `cat $diskfile | sed -ne "s/.*\($type[a-z]\+\).*/\1/p" | sort -u` ; do
skip=0
for cdrom in $cdroms; do
@@ -389,31 +389,6 @@
beep
-#
-################################################################################
-
-################################################################################
-# BEGIN disk edits
-#
-[ -z $DISKORDER ] || {
- echo "Editing files for actual disk configuration..."
-##SHOW_DISK_EDITS##
- for file in /etc/fstab /etc/systemconfig/systemconfig.conf /boot/grub/menu.lst /etc/lilo.conf /etc/grub.conf; do
- [ -f /a/$file ] || continue
- echo " $file"
- cp /a/$file /a/$file.image
- cat /a/$file.image |
-##EDIT_DISK_NAMES##
- cat > /a/$file
- done
- echo
- beep
-}
-#
-# END disk edits
-################################################################################
-
-
##################################################################
#
# Uncomment the line below to leave your hostname blank.
@@ -473,7 +448,7 @@
cat /etc/mtab | grep -v '/dev/ram' | grep -v -E '^\/dev\s+\/a\/dev\s' | sed 's,/a/*,/,g' | sort -u > /a/etc/mtab
# Save original boot-loader configurations before running systemconfigurator
-for file in /boot/grub/menu.lst /etc/lilo.conf /etc/grub.conf; do
+for file in /a/boot/grub/menu.lst /a/etc/lilo.conf /a/etc/grub.conf; do
if [ -e ${file} ]; then
if [ ! -e ${file}.pre-systemimager ]; then
cp -f ${file} ${file}.pre-systemimager
@@ -481,13 +456,36 @@
fi
done
+##SYSTEMCONFIGURATOR_PRE##
+
+################################################################################
+# BEGIN disk edits
+#
+[ -z $DISKORDER ] || {
+ echo "Editing files for actual disk configuration..."
+##SHOW_DISK_EDITS##
+ for file in /etc/fstab /etc/systemconfig/systemconfig.conf /boot/grub/menu.lst /etc/lilo.conf /etc/grub.conf /boot/grub/device.map; do
+ [ -f /a/$file ] || continue
+ echo " $file"
+ cp /a/$file /a/$file.image
+##EDIT_DISK_NAMES##
+ done
+ echo
+ beep
+}
+#
+# END disk edits
+################################################################################
+
export PATH=/usr/local/sbin:/usr/local/bin:$PATH
logmsg "Detecting systemconfigurator:"
logmsg "---"
chroot /a/ systemconfigurator --version || \
logmsg "WARNING: systemconfigurator was not found in the image $IMAGENAME"
logmsg "---"
-##SYSTEMCONFIGURATOR##
+
+##SYSTEMCONFIGURATOR_POST##
+
#
################################################################################
@@ -540,7 +538,7 @@
#
# Tell the image server we are done
#
-rsync $IMAGESERVER::scripts/imaging_complete > /dev/null 2>&1
+rsync $IMAGESERVER::scripts/imaging_complete_$IPADDR > /dev/null 2>&1
logmsg "Imaging completed"
#
################################################################################
Modified: branches/4.0.x/etc/getimage.exclude
===================================================================
--- branches/4.0.x/etc/getimage.exclude 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/etc/getimage.exclude 2008-02-24 11:36:53 UTC (rev 4401)
@@ -25,3 +25,9 @@
# udev network persistent naming rules (Debian).
/etc/udev/rules.d/z25_persistent-net.rules
/etc/udev/rules.d/z45_persistent-net-generator.rules
+
+# remove blkid mappings: this allows to use images cloned from golden clients
+# with raid, lvm, etc. block devices and image other clients that use different
+# block device types (non-raid, non-lvm, etc.) or vice versa.
+/etc/blkid/blkid.tab
+/etc/blkid.tab
Modified: branches/4.0.x/initrd_source/make.d/rsync.rul
===================================================================
--- branches/4.0.x/initrd_source/make.d/rsync.rul 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/initrd_source/make.d/rsync.rul 2008-02-24 11:36:53 UTC (rev 4401)
@@ -3,7 +3,7 @@
# vi: set filetype=make:
#
-RSYNC_VERSION = 3.0.0pre6
+RSYNC_VERSION = 3.0.0pre10
RSYNC_TARBALL = rsync-$(RSYNC_VERSION).tar.gz
#RSYNC_URL = http://rsync.samba.org/ftp/rsync/$(RSYNC_TARBALL)
RSYNC_URL = http://download.systemimager.org/pub/rsync/$(RSYNC_TARBALL)
Modified: branches/4.0.x/initrd_source/skel/etc/init.d/functions
===================================================================
--- branches/4.0.x/initrd_source/skel/etc/init.d/functions 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/initrd_source/skel/etc/init.d/functions 2008-02-24 11:36:53 UTC (rev 4401)
@@ -1774,7 +1774,7 @@
REPORT_INTERVAL=10
# Evaluate image size.
- logmsg "Evaluating image size."
+ logmsg "Evaluating image size..."
if [ ! "x$BITTORRENT" = "xy" ]; then
IMAGESIZE=`rsync -av $IMAGESERVER::$IMAGENAME | grep "total size" | sed -e "s/total size is \([0-9]*\).*/\1/"`
else
@@ -1789,6 +1789,7 @@
IMAGESIZE=`/bin/torrentinfo-console $torrent_file | sed -ne "s/file size\.*: \([0-9]*\) .*$/\1/p"`
fi
IMAGESIZE=`expr $IMAGESIZE / 1024`
+ logmsg " --> Image size = `expr $IMAGESIZE / 1024`MiB"
# Evaluate disks size.
LIST=`df 2>/dev/null | grep "/" | sed "s/ */ /g" | cut -d' ' -f3 | sed -ne 's/^\([0-9]*\)$/\1+/p'`0
Modified: branches/4.0.x/lib/SystemImager/Server.pm
===================================================================
--- branches/4.0.x/lib/SystemImager/Server.pm 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/lib/SystemImager/Server.pm 2008-02-24 11:36:53 UTC (rev 4401)
@@ -1789,11 +1789,8 @@
sub edit_disk_names{
my ($out) = shift;
foreach (reverse sort keys %dev2disk) {
- print $out qq( sed s:$_:%$dev2disk{$_}%:g |\n);
+ print $out qq( sed -i s:$_:\$$dev2disk{$_}:g /a/\$file\n);
}
- for (my $i = 0; $i < scalar keys %dev2disk; $i++) {
- print $out qq( sed s:%DISK$i%:\$DISK$i:g |\n);
- }
}
# Prep the client for kexec
@@ -1809,7 +1806,7 @@
print $out "kexec_initrd=`basename \$kexec_initrd`\n";
}
-sub write_sc_command {
+sub write_sc_command_pre {
my ( $out, $ip_assignment_method ) = @_;
# Fix device names in systemconfigurator config.
@@ -1820,8 +1817,8 @@
$bootdev = $rootdev;
}
my $bootdev_disk = $bootdev;
- if ($bootdev_disk =~ /^\/dev\/([hs]|ps3)d/) {
- # Standard disk naming (hd*, sd*, ps3d*).
+ if ($bootdev_disk =~ /^\/dev\/([hs]|ps3|xv)d/) {
+ # Standard disk naming (hd*, sd*, xvd*, ps3d*).
$bootdev_disk =~ s/[0-9]+$//;
} elsif ($bootdev_disk =~ /^UUID|^LABEL/) {
# XXX: Boot device in UUID or LABEL form: do nothing,
@@ -1836,11 +1833,15 @@
print $out " sed -i \"s:DEFAULTBOOT = systemimager:DEFAULTBOOT = \$IMAGENAME:g\" $sc_conf_file\n";
print $out " sed -i \"s:LABEL = systemimager:LABEL = \$IMAGENAME:g\" $sc_conf_file\n";
print $out "fi\n";
+}
+sub write_sc_command_post {
+ my ( $out, $ip_assignment_method ) = @_;
+
# Configure the network device used to contact the image-server -AR-
print $out "\n# Configure the network interface used during the auto-installation.\n";
print $out "[ -z \$DEVICE ] && DEVICE=eth0\n";
-
+
my $sc_excludes_to = "/etc/systemimager/systemconfig.local.exclude";
my $sc_cmd = "chroot /a/ systemconfigurator --verbose --excludesto=$sc_excludes_to";
my $sc_options = '';
@@ -1849,8 +1850,7 @@
$sc_options = " --runboot";
$sc_ps3_options = '';
} else {
- ## FIXME - is --excludesto only for the static method?
- ## currently,
+ ## FIXME - is --excludesto only for the static method?
$sc_options = '--confighw --confignet --configboot --runboot';
# PS3 doesn't need hardware and boot-loader configuration.
$sc_ps3_options = '--confignet';
@@ -1891,6 +1891,8 @@
}
+
+
sub create_autoinstall_script{
my (
@@ -1969,7 +1971,7 @@
if (/^\s*${delim}SET_DISKORDER${delim}\s*$/) {
# Set or unset disk autodetection.
if ($autodetect_disks) {
- print $MASTER_SCRIPT qq(DISKORDER=sd,cciss,ida,rd,hd\n);
+ print $MASTER_SCRIPT qq(DISKORDER=sd,cciss,ida,rd,hd,xvd\n);
} else {
print $MASTER_SCRIPT qq(DISKORDER=\n);
}
@@ -2035,11 +2037,16 @@
last SWITCH;
}
- if (/^\s*${delim}SYSTEMCONFIGURATOR${delim}\s*$/) {
- write_sc_command($MASTER_SCRIPT, $ip_assignment_method);
+ if (/^\s*${delim}SYSTEMCONFIGURATOR_PRE${delim}\s*$/) {
+ write_sc_command_pre($MASTER_SCRIPT, $ip_assignment_method);
last SWITCH;
}
+ if (/^\s*${delim}SYSTEMCONFIGURATOR_POST${delim}\s*$/) {
+ write_sc_command_post($MASTER_SCRIPT, $ip_assignment_method);
+ last SWITCH;
+ }
+
if (/^\s*${delim}UMOUNT_FILESYSTEMS${delim}\s*$/) {
_write_out_umount_commands( $MASTER_SCRIPT,
$image_dir,
Modified: branches/4.0.x/lib/SystemImager/UseYourOwnKernel.pm
===================================================================
--- branches/4.0.x/lib/SystemImager/UseYourOwnKernel.pm 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/lib/SystemImager/UseYourOwnKernel.pm 2008-02-24 11:36:53 UTC (rev 4401)
@@ -22,6 +22,7 @@
package SystemImager::UseYourOwnKernel;
use strict;
+use File::Basename;
use SystemImager::Config qw($config);
our $verbose;
@@ -338,6 +339,7 @@
# -BEF-
my $file = shift;
+ my $filename = basename($file);
#
# Make sure it's binary
@@ -345,18 +347,30 @@
#
# and not a directory
if( -d $file ) { return undef; }
+ #
+ # skip symlinks
+ if( -l $file ) { return undef; }
+ #
+ # skip .bak files
+ if( $filename =~ /\.bak$/ ) { return undef; }
+ #
+ # eliminate ramdisks
+ if( $filename =~ m/initrd/ ) { return undef; }
+ #
+ # eliminate vmlinux files
+ if( $filename =~ m/^vmlinux/ ) { return undef; }
+ #
+ # eliminate memtest
+ if( $filename =~ m/^memtest/ ) { return undef; }
+ #
+ # eliminate message
+ if( $filename =~ m/^message/ ) { return undef; }
#
# Get output from "file" for elimination by identification tests
- my $cmd = "file -b $file";
+ my $cmd = "file -bz $file";
open(INPUT,"$cmd|") or die("Couldn't run $cmd to get INPUT");
my ($input) = (<INPUT>);
- #
- # eliminate vmlinux files on RH
- if( $input =~ m/ELF (32|64)-bit LSB executable,/ ) { return undef; }
- #
- # eliminate compressed data (eg. ramdisk)
- if( $input =~ m/gzip compressed data,/ ) { return undef; }
# eliminate cpio archives (eg. ramdisk)
if( $input =~ m/cpio archive/ ) { return undef; }
# eliminate cramfs files (eg. ramdisk)
@@ -373,7 +387,7 @@
# Usage:
# my $kernel_file = _choose_kernel_file( $uname_r, $image_dir );
#
-sub _choose_kernel_file($) {
+sub _choose_kernel_file {
my $uname_r = shift;
my $image_dir = shift;
@@ -445,8 +459,20 @@
# 2.4.24 (root@mantis) #2 Fri Jan 16 19:51:43 CST 2004^
# 2.4.19-mantis-2002.11.20 (root@mantis) #6 Tue Nov 19 15:15:43 CST 2002
# 2.6.7-1-686 (dil...@to...) #1 Thu Jul 8 05:36:53 EDT 2004
+ # 2.6.22.5-31-default (geeko@buildhost) #1 SMP 2007/09/21 22:29:00 UTC
#
- my $regex = '(2\.[46]\.\d[^\/]*?) \(.*@.*\) [#]\d+.*\w{3} \w{3} \d{1,2} \d{2}:\d{2}:\d{2} \w{3,4} \d{4}';
+ my $regex =
+ # | kernel version + build machine
+ # `---------------------------------------
+ '(2\.[46]\.\d[^\/]*?) \(.*@.*\) [#]\d+.*' .
+ #
+ # | build date
+ # `---------------------------------------
+ '(\w{3} \w{3} \d{1,2}|\d{4}\/\d{2}\/\d{2}) '.
+ #
+ # | build time
+ # `---------------------------------------
+ '\d{2}:\d{2}:\d{2} \w{3,4}( \d{4})?';
while(<IN>) {
# extract the `uname -r` string from the kernel file
if(m/$regex/o) {
Deleted: branches/4.0.x/patches/raidtools.10chkactive.patch
===================================================================
--- branches/4.0.x/patches/raidtools.10chkactive.patch 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/patches/raidtools.10chkactive.patch 2008-02-24 11:36:53 UTC (rev 4401)
@@ -1,11 +0,0 @@
---- raidtools-1.00.3/mkraid.c~ 2003-01-15 01:58:25.000000000 -0700
-+++ raidtools-1.00.3/mkraid.c 2003-03-28 14:14:25.000000000 -0700
-@@ -244,7 +244,7 @@
- while (*args) {
- for (p = cfg_head; p; p = p->next) {
- if (strcmp(p->md_name, *args)) continue;
-- if (check_active(cfg))
-+ if (check_active(p))
- goto abort;
- if (force_flag) {
- fprintf(stderr, "DESTROYING the contents of %s in 5 seconds, Ctrl-C if unsure!\n", *args);
Deleted: branches/4.0.x/patches/raidtools.20gcc3_3fix.patch
===================================================================
--- branches/4.0.x/patches/raidtools.20gcc3_3fix.patch 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/patches/raidtools.20gcc3_3fix.patch 2008-02-24 11:36:53 UTC (rev 4401)
@@ -1,60 +0,0 @@
---- raidtools-1.00.3/mkraid.c~ 2003-01-15 01:58:25.000000000 -0700
-+++ raidtools-1.00.3/mkraid.c 2003-06-30 23:00:48.000000000 -0600
-@@ -169,34 +169,29 @@
- return EXIT_FAILURE;
-
- if (old_force_flag && (func == mkraid)) {
-- fprintf(stderr,
--
--"
-- WARNING!
--
-- NOTE: if you are recovering a double-disk error or some other failure mode
-- that made your array unrunnable but data is still intact then it's strongly
-- recommended to use the lsraid utility and to read the lsraid HOWTO.
--
-- If your RAID array holds useful and not yet backed up data then --force
-- and the hot-add/hot-remove functionality should be used with extreme care!
-- If your /etc/raidtab file is not in sync with the real array configuration,
-- then --force might DESTROY ALL YOUR DATA. It's especially dangerous to use
-- -f if the array is in degraded mode.
--
-- If your /etc/raidtab file matches the real layout of on-disk data then
-- recreating the array will not hurt your data, but be aware of the risks
-- of doing this anyway: freshly created RAID1 and RAID5 arrays do a full
-- resync of their mirror/parity blocks, which, if the raidtab is incorrect,
-- the resync will wipe out data irrecoverably. Also, if your array is in
-- degraded mode then the raidtab must match the degraded config exactly,
-- otherwise you'll get the same kind of data destruction during resync.
-- (see the failed-disk raidtab option.) You have been warned!
--
-- [ If your array holds no data, or you have it all backed up, or if you
-- know precisely what you are doing and you still want to proceed then use
-- the --really-force (or -R) flag. ]
--");
-+ fprintf(stderr, "WARNING!\n"
-+"NOTE: if you are recovering a double-disk error or some other failure mode\n"
-+"that made your array unrunnable but data is still intact then it's strongly\n"
-+"recommended to use the lsraid utility and to read the lsraid HOWTO.\n"
-+"\n"
-+"If your RAID array holds useful and not yet backed up data then --force\n"
-+"and the hot-add/hot-remove functionality should be used with extreme care!\n"
-+"If your /etc/raidtab file is not in sync with the real array configuration,\n"
-+"then --force might DESTROY ALL YOUR DATA. It's especially dangerous to use\n"
-+"-f if the array is in degraded mode.\n"
-+"\n"
-+"If your /etc/raidtab file matches the real layout of on-disk data then\n"
-+"recreating the array will not hurt your data, but be aware of the risks\n"
-+"of doing this anyway: freshly created RAID1 and RAID5 arrays do a full\n"
-+"resync of their mirror/parity blocks, which, if the raidtab is incorrect,\n"
-+"the resync will wipe out data irrecoverably. Also, if your array is in\n"
-+"degraded mode then the raidtab must match the degraded config exactly,\n"
-+"otherwise you'll get the same kind of data destruction during resync.\n"
-+"(see the failed-disk raidtab option.) You have been warned!\n"
-+"\n"
-+"[ If your array holds no data, or you have it all backed up, or if you\n"
-+"know precisely what you are doing and you still want to proceed then use\n"
-+"the --really-force (or -R) flag. ]\n");
- return EXIT_FAILURE;
- }
-
Modified: branches/4.0.x/sbin/si_clusterconfig
===================================================================
--- branches/4.0.x/sbin/si_clusterconfig 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/sbin/si_clusterconfig 2008-02-24 11:36:53 UTC (rev 4401)
@@ -45,6 +45,9 @@
--groups, -g Show group associations for each node (this option
works only in show-mode).
+ --image, -i Show image associations for each node (this option
+ works only in show-mode).
+
EOF
Getopt::Long::Configure("posix_default");
@@ -57,6 +60,7 @@
"update|u" => \my $update,
"edit|e" => \my $edit,
"groups|g" => \my $show_groups,
+ "image|i" => \my $show_image,
) or die("$help_info");
select(STDERR);
@@ -99,27 +103,38 @@
{
# Cache hosts/groups associations in a single memory hash.
my $groups;
- if ($show_groups) {
+ if ($show_groups || $show_image) {
foreach my $group (SystemImager::HostRange::sort_group(@{($xml->{'group'})})) {
my $name = $group->{'name'}[0];
- map { push(@{$groups->{$_}}, $name) }
- SystemImager::HostRange::expand_groups_xml($xml, $name);
+ if ($show_groups) {
+ map { push(@{$groups->{'name'}->{$_}}, $name) }
+ SystemImager::HostRange::expand_groups_xml($xml, $name);
+ }
+ my $image = $group->{'image'}[0];
+ if (defined($image) && $show_image) {
+ map { push(@{$groups->{'image'}->{$_}}, $image) }
+ SystemImager::HostRange::expand_groups_xml($xml, $name);
+ }
}
}
+
# Print group/host/host-range info.
unless (@ARGV) {
- print "$help_info";
- exit(1);
+ # If no argument are passed show all clients.
+ push(@ARGV, $xml->{'name'}[0]);
}
foreach (SystemImager::HostRange::expand_groups_xml($xml, join(' ', @ARGV))) {
print "$_";
+ if ($show_image) {
+ print ':image=' . ($groups->{'image'}->{$_}[0] || '<NULL>');
+ }
if ($show_groups) {
- if (defined($groups->{$_})) {
- print ':' . join(',', @{$groups->{$_}});
+ if (defined($groups->{'name'}->{$_})) {
+ print ':groups=' . join(',', @{$groups->{'name'}->{$_}});
} else {
print ': does not belong to any group!';
}
- }
+ }
print "\n";
}
}
@@ -145,7 +160,13 @@
if (defined($ENV{'EDITOR'})) {
$editor = $ENV{'EDITOR'};
} else {
- chomp($editor = `(type -p vim || type -p vi || type -p nano || type -p nano-tiny) 2>/dev/null`);
+ my @ed_list = ('vim', 'vi', 'nano', 'nano-tiny');
+ foreach my $e (@ed_list) {
+ if (system("$e --version &>/dev/null") == 0) {
+ $editor = $e;
+ last;
+ }
+ }
}
unless ($editor) {
die("FATAL: couldn't find a valid editor (vi, vim, nano or nano-tiny)!\n");
@@ -216,17 +237,17 @@
# Check if a global name has been defined.
unless ($xml->{'name'}[0]) {
print "WARNING: the global name is undefined! " .
- "Please add a <name>...</name> tag to identify all your clients.\n";
+ "Please add a <name>...</name> tag to identify all your clients.\n";
return -1;
}
# Check if a base override has been defined.
unless ($xml->{'override'}) {
- print "WARNING: a global override was not defined! " .
+ print "WARNING: a global override was not defined! " .
"Please define it (even empty if you don't need it).\n";
return -1;
}
-
+
foreach my $group (@{$xml->{'group'}}) {
# Every group must have a name.
unless (defined($group->{'name'}[0])) {
@@ -277,7 +298,7 @@
foreach my $node (SystemImager::HostRange::expand_groups_xml($xml, $name)) {
unless ($groups->{$name}->{'override'}) {
# If no override is defined, simply print the image.
- print OUT $node .
+ print OUT $node .
':' . $name .
':' . ($groups->{$name}->{'image'}[0] or '') .
":\n";
@@ -286,7 +307,7 @@
# Print an entry for each override (reporting also the
# image in all the entries).
foreach (@{$groups->{$name}->{'override'}}) {
- print OUT $node .
+ print OUT $node .
':' . $name .
':' . ($groups->{$name}->{'image'}[0] or '') .
':' . ($_) .
@@ -347,7 +368,7 @@
=head1 OPTIONS
=over 8
-
+
=item B<--help | -h>
Display a short help.
@@ -368,6 +389,10 @@
Show groups associations for each node (this option works only in show-mode).
+=item B<--image | -i>
+
+Show image associations for each node (this option works only in show-mode).
+
=head1 SEE ALSO
systemimager(8), si_pcp(8), si_psh(8), si_pushoverrides(8),
@@ -392,4 +417,3 @@
GNU General Public License for more details.
=cut
-
Modified: branches/4.0.x/sbin/si_mkautoinstallscript
===================================================================
--- branches/4.0.x/sbin/si_mkautoinstallscript 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/sbin/si_mkautoinstallscript 2008-02-24 11:36:53 UTC (rev 4401)
@@ -244,14 +244,5 @@
$file = "$autoinstall_script_dir/$script_name.master";
unless ($quiet) { print qq(\nYour new autoinstall script has been created:\n\n); }
unless ($quiet) { print qq("$file"\n\n); }
-unless ($quiet) {
- print qq(WARNING: If you made a change to your autoinstallscript.conf file that could\n);
- print qq( affect the boot process, for example, changing your root device, then\n);
- print qq( you must also modify your boot loader's configuration file. This \n);
- print qq( file can be modified either directly in the image, or in an override\n);
- print qq( directory. For more information on override directories, see the\n);
- print qq( full manual in /usr/share/doc/systemimager-doc/ or at\n);
- print qq( http://wiki.systemimager.org.\n);
-}
exit 0;
Modified: branches/4.0.x/sbin/si_mkdhcpstatic
===================================================================
--- branches/4.0.x/sbin/si_mkdhcpstatic 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/sbin/si_mkdhcpstatic 2008-02-24 11:36:53 UTC (rev 4401)
@@ -28,7 +28,8 @@
"/var/state/dhcp/dhcpd.leases",
"/var/lib/dhcp/dhcpd.leases",
"/var/lib/dhcp/db/dhcpd.leases",
- "/etc/dhcpd.leases"
+ "/etc/dhcpd.leases",
+ "/var/lib/dhcpd/dhcpd.leases",
);
foreach my $file (@lease_files_du_jour) {
Modified: branches/4.0.x/sbin/si_netbootmond
===================================================================
--- branches/4.0.x/sbin/si_netbootmond 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/sbin/si_netbootmond 2008-02-24 11:36:53 UTC (rev 4401)
@@ -112,12 +112,18 @@
# Get individual field values for this line
my @array = split(/\s+/);
- if ("$array[5]" eq "scripts/imaging_complete") {
+ if ($array[5] =~ /scripts\/imaging_complete_?([\.0-9]+)?/) {
- my $client_ip = $array[8];
- $client_ip =~ s/\(//g;
- $client_ip =~ s/\)//g;
+ my $client_ip;
+ if (defined($1)) {
+ $client_ip = $1;
+ } else {
+ $client_ip = $array[8];
+ $client_ip =~ s/\(//g;
+ $client_ip =~ s/\)//g;
+ }
+
# diagnostic output
#print "Configuring $client_ip for local booting.\n";
create_no_boot_symlink($client_ip);
Modified: branches/4.0.x/sbin/si_pushupdate
===================================================================
--- branches/4.0.x/sbin/si_pushupdate 2008-02-24 10:55:31 UTC (rev 4400)
+++ branches/4.0.x/sbin/si_pushupdate 2008-02-24 11:36:53 UTC (rev 4401)
@@ -1,469 +1,320 @@
#!/usr/bin/perl -w
#
-# "SystemImager"
+# "SystemImager"
#
-# Copyright (C) 1999-2003 Brian Elliott Finley <br...@bg...>
-#
-# $Id$
-#
-# Others who have contributed to this code (in alphabetical order):
-# Curtis Zinzilieta <czi...@va...>
-#
-# 2005.07.12 Brian Elliott Finley; patch from Daniel Widyono
-# - Handle --server and --image options. If --server provided, forward to
-# updateclient.
-# - If --clients-file not provided, don't die.
-# - Correct erroneous array variable names (hostnames -> hostnames_and_images).
-#
+# Copyright (C) 2008 Andrea Righi <a....@ci...>
use lib "USR_PREFIX/lib/systemimager/perl";
-
-use Socket;
-use IO::Handle;
-use FileHandle;
-use Time::Local;
+use strict;
use Getopt::Long;
-use SystemImager::Options;
-use POSIX qw(strftime);
+use Sys::Hostname;
+use SystemImager::HostRange;
-### BEGIN Parameters to be read from /etc/systemimager/systemimager.conf
-$si_logdir = "/var/log/systemimager";
-$si_log_format = "%t %o %f";
-### END Parameters ###
+my $VERSION = "SYSTEMIMAGER_VERSION_STRING";
-$program_name="si_pushupdate";
+my $program_name = "si_pushupdate";
+my $version_info = << "EOF";
+$program_name (part of SystemImager) v$VERSION
+Copyright (C) 2008 Andrea Righi <a.righi\@cineca.it>
-### BEGIN Program ###
-# set version information
-$version_number = "SYSTEMIMAGER_VERSION_STRING";
-$version_info = <<"EOF";
-si_pushupdate (part of SystemImager) version $version_number
-
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
EOF
-$version_info .= SystemImager::Options->copyright();
+my $help_info = $version_info . <<"EOF";
+Usage: $program_name --hosts host_range [OPTION]...
-# set help information
-$get_help = " Try \"si_pushupdate --help\" for more options.";
-$help_info = $version_info . SystemImager::Options->pushupdate_options_header();
-$help_info = $help_info . SystemImager::Options->generic_options_help_version();
-$help_info = $help_info . SystemImager::Options->pushupdate_options_body();
-$help_info = $help_info . SystemImager::Options->updateclient_options_body();
-$help_info = $help_info . SystemImager::Options->generic_footer();
+Options: (options can be presented in any order and can be abbreviated)
+ --help, -h Display this output.
-# setup generic logging info message for detail client logs if needed
-$logging_blurb = <<"EOF";
+ --version, -v Display version and copyright information.
-Check out the --log option with the command si_pushupdate --help
-to get information for capturing detailed file transfer logging
-from each client si_pushupdate targets.
+ --max, -m=NUM Set the maximum number of concurrent sessions
+ to NUM (default=32).
+
+ --hosts, -n=HOST_LIST List of target nodes. List can be separated by
+ comma, spaces or new line and can include
+ ranges or host groups
+ (e.g. "node001-node256 node300,Login,Storage").
+ Host groups must be defined by si_clusterconfig(8).
+
+ --hosts-file, -f=FILE File that contains the list of the target host.
+ Every line can include one or more ranges or
+ host groups
+ (e.g. "node001-node256 node300,Login,Storage").
+ Host groups must be defined by si_clusterconfig(8).
+
+ --timeout, -t=NUM Set the timeout of the ssh sessions (default=15s).
+
+ --ssh-user, -l=USER Run the command as user USER.
+
+ --image, -i=IMAGE Image from which the client should be updated (if not
+ specified use the si_clusterconfig(8) settings).
+
+ --override, -o=OVERRIDES
+ Override module(s) from which to copy additional files
+ (if not specified use the si_clusterconfig(8) settings).
+
+ --server, -s=HOST Hostname or IP address of the imageserver (if not
+ specified use the image server's hostname).
+
+ --directory DIR, -D=DIR
+ Absolute path of the directory to be updated (if not
+ specified use "/").
+
+ --no-bootloader, -b Don't run the bootloader (lilo, elilo, grub, etc)
+ after update completes.
+
+ --autoinstall, -a Autoinstall this client the next time it reboots.
+
+ --flavor , -F=FLAVOR The boot flavor to be used for doing an autoinstall
+ (only valid with -autoinstall).
+
+ --configure-from, -c=DEVICE
+ Stores the network configuration for DEVICE in the
+ /local.cfg file so that the same settings will be used
+ during the autoinstall process (only valid with
+ -autoinstall).
+
+ --reboot, -r Reboot client after update completes.
+
+ --dry-run, -d Don't actually modify anything, just show what would be
+ done.
+
EOF
-#
-# default values
-#
-my $concurrent=1;
+Getopt::Long::Configure("posix_default");
+Getopt::Long::Configure("no_gnu_compat");
+Getopt::Long::Configure("bundling");
-# interpret command line options
GetOptions(
+ "help|h" => \my $help,
+ "version|v" => \my $version,
+ "max|m=i" => \my $concurrents,
+ "hosts|n=s" => \my $hostlist,
+ "hosts-file|f=s" => \my $hostlist_file,
+ "timeout|t=i" => \my $timeout,
+ "ssh-user|l=s" => \my $ssh_user,
+ "image|i=s" => \my $image,
+ "override|o=s" => \my $override,
+ "server|s=s" => \my $server,
+ "directory|D=s" => \my $directory,
+ "no-bootloader|b" => \my $no_bootloader,
+ "autoinstall|a" => \my $autoinstall,
+ "flavor|F=s" => \my ...
[truncated message content] |