[Fai-commit] r3270 - in people/h01ger/fai-sarge: conf debian doc doc/entities examples/etc examples/simple/class examples/simple/hooks man scripts share utils

fai-repository at svn.debian.org fai-repository at svn.debian.org
Wed Feb 8 17:07:06 UTC 2006


Author: h01ger-guest
Date: 2006-02-08 17:06:54 +0000 (Wed, 08 Feb 2006)
New Revision: 3270

Modified:
   people/h01ger/fai-sarge/conf/fai.conf
   people/h01ger/fai-sarge/debian/changelog
   people/h01ger/fai-sarge/debian/control
   people/h01ger/fai-sarge/doc/classes_description.txt
   people/h01ger/fai-sarge/doc/entities/bootexample.sgml
   people/h01ger/fai-sarge/doc/entities/faisetup.sgml
   people/h01ger/fai-sarge/doc/fai-guide.sgml
   people/h01ger/fai-sarge/examples/etc/bootptab
   people/h01ger/fai-sarge/examples/etc/dhcpd.conf
   people/h01ger/fai-sarge/examples/simple/class/10-base-classes
   people/h01ger/fai-sarge/examples/simple/class/50-host-classes
   people/h01ger/fai-sarge/examples/simple/hooks/savelog.LAST
   people/h01ger/fai-sarge/man/fai-cd.8
   people/h01ger/fai-sarge/man/fai-mirror.1
   people/h01ger/fai-sarge/man/install_packages.8
   people/h01ger/fai-sarge/scripts/fai-setup
   people/h01ger/fai-sarge/share/subroutines
   people/h01ger/fai-sarge/utils/create-nfsroot-tar
Log:
- merged 2.8.4sarge1 with my 2.8.4 branch (fai-2.8.4.0.holger.2 used at debconf5 last year)
    


Modified: people/h01ger/fai-sarge/conf/fai.conf
===================================================================
--- people/h01ger/fai-sarge/conf/fai.conf	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/conf/fai.conf	2006-02-08 17:06:54 UTC (rev 3270)
@@ -3,7 +3,7 @@
 # /etc/fai/fai.conf -- configuration for FAI (Fully Automatic Installation)
 
 # installserver must be the name seen by the install clients
-installserver=INSTALLSERVER
+#installserver=INSTALLSERVER
 # the name of the Debian mirror, this is also hardcoded in /etc/fai/sources.list
 mirrorhost=ftp.debian.org
 
@@ -43,11 +43,14 @@
 LOGPASSWD=
 
 # the configuration space on the install server
-FAI_CONFIGDIR=/usr/local/share/fai
+FAI_CONFIGDIR=/var/lib/fai/config
 # the location of the config space, as seen by the install client
 # it can also be overwritten with T170 via BOOTP 
-FAI_LOCATION=$installserver:$FAI_CONFIGDIR
+#FAI_LOCATION=$installserver:$FAI_CONFIGDIR
 
+# to get the configdir via subversion
+FAI_SVNREPO="svn://develserver2/srv/svn/fai-config-dir/trunk/debconf5"
+
 # the following variables are read only for most users
 
 # mount point where the mirror will be mounted
@@ -55,7 +58,7 @@
 
 # directory on the install server where the nfsroot for FAI is
 # created, approx size: 160MB, also defined in bootptab or dhcp.conf
-NFSROOT=/usr/lib/fai/nfsroot
+NFSROOT=/var/lib/fai/nfsroot
 
 # the local configuration directory on the install client
 FAI=/fai

Modified: people/h01ger/fai-sarge/debian/changelog
===================================================================
--- people/h01ger/fai-sarge/debian/changelog	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/debian/changelog	2006-02-08 17:06:54 UTC (rev 3270)
@@ -1,3 +1,10 @@
+fai (2.8.4sarge0.h01ger.1) stable; urgency=low
+
+  * merged 2.8.4sarge1 with my 2.8.4 branch (fai-2.8.4.0.holger.2 used at
+    debconf5 last year)
+
+ -- Holger Levsen <debian at layer-acht.org>  Wed,  8 Feb 2006 18:04:04 +0100
+
 fai (2.8.4sarge1) stable; urgency=medium
 
    * closes three important bugs
@@ -12,6 +19,37 @@
 
  -- Thomas Lange <lange at debian.org>  Wed,  4 Jan 2006 13:29:39 +0100
 
+fai (2.8.4.0.holger.2) unstable; urgency=high
+
+  * modified examples/simple/hoooks/savelog.LAST to keep the config dir local 
+    working copy after successful use so updates (and local edits) become 
+    possible
+  * changed default svn repository as anonymous svn currently doesn't work at 
+    debconf5 - so we use a local svn server instead of alioth :-(
+
+ -- Holger Levsen <debian at layer-acht.org>  Sun,  4 July 2005 16:34:28 +0300
+ 
+fai (2.8.4.0.holger.1) unstable; urgency=high
+
+  * add $FAI_ACTION class (closes: #313440)
+  * access fai_configdir with svn (closes: #314991)
+  * define GRUB only on fai installs (closes: #313069, #314995)
+  * don't call task_prepareapt on softupdates (closes: #315000)  
+  * propose /var/lib/fai/config and /v/l/f/nfsroot instead of
+    /usr/local/share/fai and /usr/lib/fai/nfsroot (closes: #309554)
+  * use fai_configdir from alioth-project fai-config-dir as default
+    this is target at debconf5 and does not really belong into this
+    branch!
+  * disabled catch-all classes in examples/simple/class/50-host-classes
+    (was allready present in 2.8.4.0.holger.1 but forget to save
+    the changelog in another term...)
+  * added subversion to depends (for debconf5), in the end, it should
+    only be recommended
+  * sometimes I only addressed the bug somehow - so the above "closes"
+    might be inaccurate wordings.
+
+ -- Holger Levsen <debian at layer-acht.org>  Sun, 21 June 2005 15:29:31 +0200
+
 fai (2.8.4) unstable; urgency=high
 
   * fix important bug: remove non-US entry (closes: #310392)

Modified: people/h01ger/fai-sarge/debian/control
===================================================================
--- people/h01ger/fai-sarge/debian/control	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/debian/control	2006-02-08 17:06:54 UTC (rev 3270)
@@ -7,7 +7,7 @@
 
 Package: fai
 Architecture: all
-Depends: perl, libapt-pkg-perl
+Depends: perl, libapt-pkg-perl, subversion
 Recommends: debootstrap, nfs-kernel-server | nfs-server, fai-kernels, dhcp3-server | bootp, tftpd-hpa | tftpd, rsh-server, wget, syslinux
 Suggests: ssh, debmirror, mknbi, apt-move, mkinitrd-cd, grub
 Description:  Fully Automatic Installation

Modified: people/h01ger/fai-sarge/doc/classes_description.txt
===================================================================
--- people/h01ger/fai-sarge/doc/classes_description.txt	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/doc/classes_description.txt	2006-02-08 17:06:54 UTC (rev 3270)
@@ -2,13 +2,13 @@
 --------------------------
 
 If you want to find all files (except hostnames) that are classes try:
-   find /usr/local/share/fai -type f | egrep '/[[:upper:][:digit:]_]+$'
+   find /var/lib/fai/config -type f | egrep '/[[:upper:][:digit:]_]+$'
 
 In cfengine scripts you can find class names using:
-   egrep -r '[[:upper:][:digit:]_]+::' /usr/local/share/fai
+   egrep -r '[[:upper:][:digit:]_]+::' /var/lib/fai/config
 
 Shell scripts are using the commad ifclass. So use:
-   egrep -r 'ifclass[[:space:]]+[[:upper:][:digit:]_]+' /usr/local/share/fai
+   egrep -r 'ifclass[[:space:]]+[[:upper:][:digit:]_]+' /var/lib/fai/config
 
 
 Class name       used in  Description

Modified: people/h01ger/fai-sarge/doc/entities/bootexample.sgml
===================================================================
--- people/h01ger/fai-sarge/doc/entities/bootexample.sgml	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/doc/entities/bootexample.sgml	2006-02-08 17:06:54 UTC (rev 3270)
@@ -32,7 +32,7 @@
 IP-Config: Complete:
    device=eth0, addr=192.168.1.12, mask=255.255.255.0, gw=192.168.1.254,
    host=demohost, domain=localdomain, nis-domain=(none),
-   bootserver=192.168.1.250, rootserver=192.168.1.250, rootpath=/usr/lib/fai/nfsroot,rw,rsize=8192,wsize=8192,acregmin=1800,acregmax=1800,acdirmin=1800,acdirmax=1800
+   bootserver=192.168.1.250, rootserver=192.168.1.250, rootpath=/var/lib/fai/nfsroot,rw,rsize=8192,wsize=8192,acregmin=1800,acregmax=1800,acdirmin=1800,acdirmax=1800
 Looking up port of RPC 1000003/2 on 192.168.1.250
 Looking up port of RPC 1000005/1 on 192.168.1.250
 VFS: Mounted root (nfs filesystem).
@@ -48,7 +48,7 @@
 Calling task_confdir
 Kernel parameters: ip=dhcp devfs=nomount FAI_ACTION=install root=/dev/nfs FAI_FLAGS=verbose,sshd,createvt,syslogd BOOT_IMAGE=vmlinuz-install 
 Reading /tmp/fai/boot.log
-Configuration space /fai mounted from faiserver:/usr/local/share/fai
+Configuration space /fai mounted from faiserver:/var/lib/fai/config
 Can't connect daemon on faiserver. Monitoring disabled.
 Calling task_setup
 FAI_FLAGS: verbose sshd createvt syslogd

Modified: people/h01ger/fai-sarge/doc/entities/faisetup.sgml
===================================================================
--- people/h01ger/fai-sarge/doc/entities/faisetup.sgml	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/doc/entities/faisetup.sgml	2006-02-08 17:06:54 UTC (rev 3270)
@@ -1,7 +1,7 @@
 <example>
 faiserver[~]# fai-setup
 Creating FAI nfsroot can take a long time and will
-need more than &nfsrootsize disk space in /usr/lib/fai/nfsroot.
+need more than &nfsrootsize disk space in /var/lib/fai/nfsroot.
 Creating nfsroot for sarge using debootstrap
 dpkg: base-passwd: dependency problems, but configuring anyway as you request:
  base-passwd depends on libc6 (>= 2.3.2.ds1-4); however:
@@ -11,9 +11,9 @@
 .
 .
 Creating base.tgz
-`/etc/fai/sources.list' -> `/usr/lib/fai/nfsroot/etc/apt/sources.list'
-Upgrading /usr/lib/fai/nfsroot
-Adding additional packages to /usr/lib/fai/nfsroot:
+`/etc/fai/sources.list' -> `/var/lib/fai/nfsroot/etc/apt/sources.list'
+Upgrading /var/lib/fai/nfsroot
+Adding additional packages to /var/lib/fai/nfsroot:
 module-init-tools dhcp3-client ssh file rdate hwinfo portmap
 bootpc rsync wget rsh-client less dump reiserfsprogs usbutils
 hdparm smartmontools parted mdadm lvm2
@@ -30,10 +30,10 @@
 Updating rmt.8.gz (/usr/share/man/man8/rmt.8.gz) to point to /usr/share/man/man8/rmt-dump.8.gz.
 Recovering jove files ... Done.
 Error : Temporary failure in name resolution
-`/etc/fai/fai.conf' -> `/usr/lib/fai/nfsroot/etc/fai/fai.conf'
-`/etc/fai/make-fai-nfsroot.conf' -> `/usr/lib/fai/nfsroot/etc/fai/make-fai-nfsroot.conf'
-`/etc/fai/menu.lst' -> `/usr/lib/fai/nfsroot/etc/fai/menu.lst'
-`/etc/fai/sources.list' -> `/usr/lib/fai/nfsroot/etc/fai/sources.list'
+`/etc/fai/fai.conf' -> `/var/lib/fai/nfsroot/etc/fai/fai.conf'
+`/etc/fai/make-fai-nfsroot.conf' -> `/var/lib/fai/nfsroot/etc/fai/make-fai-nfsroot.conf'
+`/etc/fai/menu.lst' -> `/var/lib/fai/nfsroot/etc/fai/menu.lst'
+`/etc/fai/sources.list' -> `/var/lib/fai/nfsroot/etc/fai/sources.list'
 Shadow passwords are now on.
 DHCP environment prepared. If you want to use it, you have to enable the dhcpd and the tftp-hpa daemon.
 
@@ -53,7 +53,7 @@
 make-fai-nfsroot finished properly.     <= *
 Re-exporting directories for NFS kernel daemon...done.
 You have no FAI configuration. Copy the simple examples with:
-cp -a /usr/share/doc/fai/examples/simple/* /usr/local/share/fai
+cp -a /usr/share/doc/fai/examples/simple/* /var/lib/fai/config
 Then change the configuration files to meet your local needs.
 FAI setup finished.                     <= *
 </example>

Modified: people/h01ger/fai-sarge/doc/fai-guide.sgml
===================================================================
--- people/h01ger/fai-sarge/doc/fai-guide.sgml	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/doc/fai-guide.sgml	2006-02-08 17:06:54 UTC (rev 3270)
@@ -253,7 +253,7 @@
    
 <item><p>
 Install the simple examples into the configuration space:
-<p><tt>cp -a /usr/share/doc/fai/examples/simple/* /usr/local/share/fai/</tt>
+<p><tt>cp -a /usr/share/doc/fai/examples/simple/* /var/lib/fai/config/</tt>
 </p></item>
 
 <item><p>Get the MAC address of your demo host.</p></item>
@@ -430,7 +430,7 @@
 	    <tag><var>FAI_LOCATION</var></tag>
 	    <item><p>This is the host name and the remote directory of
 	  the configuration space, which will be mounted via NFS. Its
-	  default value is <file>/usr/local/share/fai</file> but some
+	  default value is <file>/var/lib/fai/config</file> but some
 	  like to use <file>/home/fai/config</file> or
 	  <file>/var/fai/config</file>. Remember that this directory
 	  must be exported to all install clients, so that all files
@@ -453,7 +453,7 @@
 server name which is known by the install clients.<p>
 
 FAI uses <manref name="apt-get" section="8"> to create the nfsroot
-filesystem in <file>/usr/lib/fai/nfsroot</file>. It needs about
+filesystem in <file>/var/lib/fai/nfsroot</file>. It needs about
 &nfsrootsize of free disk space. Before setting up FAI, you should get
 the program <prgn>imggen</prgn>,<footnote>Available at the download
 page <httpsite>www.ltsp.org</httpsite> or from the FAI download
@@ -484,7 +484,7 @@
 </tt><p>
 It may help to enter the chroot environment manually
 <example>
-sudo chroot /usr/lib/fai/nfsroot
+sudo chroot /var/lib/fai/nfsroot
 </example>
 The setup routine adds some lines to <file>/etc/exports</file> to export
 the nfsroot and the configuration space to all hosts that belong to
@@ -734,7 +734,7 @@
  :ms=1024:\
  :hd=/boot/fai:\
  :hn:bs=auto:\
- :rp=/usr/lib/fai/nfsroot:
+ :rp=/var/lib/fai/nfsroot:
 
 .failocal:\
  :tc=.faiglobal:\
@@ -826,7 +826,7 @@
 One issue to bear in mind when configuring your DHCP daemon is that the
 daemon needs to supply the nfsroot path to the client because
 the kernel uses a path different from 
-<file>/usr/lib/fai/nfsroot</file> by default.
+<file>/var/lib/fai/nfsroot</file> by default.
 
 If you make any changes
 to the DHCP daemon configuration, you must restart the daemon.
@@ -860,7 +860,7 @@
 &bootexample
 
 When the copyright message of fai is shown, the install client has mounted
-the nfsroot<footnote> <p><file>/usr/lib/fai/nfsroot</file> from the
+the nfsroot<footnote> <p><file>/var/lib/fai/nfsroot</file> from the
 install server</p> </footnote> to the clients' root directory
 <file>/</file>. This is the whole filesystem for the client at this
 moment. 
@@ -879,7 +879,7 @@
 space directory to the install clients, mostly a problem of missing
 permissions on the server side.
 <example>
-Root-NFS: Server returned error -13 while mounting /usr/lib/fai/nfsroot
+Root-NFS: Server returned error -13 while mounting /var/lib/fai/nfsroot
 VFS: Unable to mount root fs via NFS, trying floppy.
 VFS: Cannot open root device "nfs" or 02:00
 Kernel panic: VFS Unable to mount root fs on 02:00
@@ -982,7 +982,7 @@
 rootfs       2064192  1071184    888152  55% /
 /dev/root    2064192  1071184    888152  55% /
 shm            63548       76     63472   1% /tmp
-kueppers:/usr/local/share/fai
+kueppers:/var/lib/fai/config
              2064192   994480   964856   51% /fai
 /dev/hda1      54447     9859    41777   19% /tmp/target
 /dev/hda10   1153576       20  1141992    0% /tmp/target/files/install
@@ -1071,7 +1071,7 @@
 After the install client has booted, only the script
 <file>/usr/sbin/fai</file><footnote><p>Since the root filesystem on
 the clients is mounted via NFS, <prgn>fai</prgn> is located in
-<file>/usr/lib/fai/nfsroot/usr/sbin</file> on the install server.</p>
+<file>/var/lib/fai/nfsroot/usr/sbin</file> on the install server.</p>
 </footnote> is executed. This is the main script which controls the
 sequence of tasks for FAI. No other scripts in
 <file>/etc/init.d/</file> are executed.
@@ -1273,10 +1273,10 @@
 
 The configuration is the collection of information about how exactly to
 install a computer. The central configuration space for all install
-clients is located on the install server in <file>/usr/local/share/fai</file>
+clients is located on the install server in <file>/var/lib/fai/config</file>
 and its subdirectories. This will be mounted by the install clients to
 <file>/fai</file>. It's also possible to receive all the
-configuration data from a <manref name="cvs" section="1"> repository.
+configuration data from a <manref name="cvs" section="1"> or <manref name="svn" section="1"> repository.
 The following subdirectories are present and include
 several files:
 
@@ -1329,7 +1329,7 @@
    <file>files/packages</file> on the install server, then from the
    files directory execute the following command:
 <example>
-# cd /usr/local/share/fai/files
+# cd /var/lib/fai/config/files
 # dpkg-scanpackages packages /dev/null | \
   gzip -9 > packages/Packages.gz
 </example>
@@ -1350,8 +1350,8 @@
 then edit the configuration with a normal user account.
 
 <example>
-# cp -a /usr/share/doc/fai/examples/simple/* /usr/local/share/fai
-# chown -R fai /usr/local/share/fai
+# cp -a /usr/share/doc/fai/examples/simple/* /var/lib/fai/config
+# chown -R fai /var/lib/fai/config/
 </example>
 
 These files contain simple configuration for some example
@@ -1409,7 +1409,8 @@
 <file>/fai</file> or it is checked out from the corresponding <manref
 name="cvs" section="1"> repository. To use a cvs repository, you have
 to set the variables <var>$FAI_CVSROOT, $FAI_CVSTAG,
-$FAI_CVSMODULE</var>. For details look a the subroutine
+$FAI_CVSMODULE</var>. To use a svn repository, you have to set the variable 
+<var>$FAI_SVNREPO</var>, tags will follow soon. For details look a the subroutine
 <prgn>get_fai_cvs()</prgn>. After that, the file
 <file>/fai/hooks/subroutines</file> is sourced if it exists. Using
 this file, you can define your own subroutines or override the
@@ -1850,7 +1851,7 @@
 configuration files with the utility <prgn>chkdebnames</prgn>, which
 is available in <file>/usr/share/doc/fai/examples/utils/</file>.
 <example>
-> chkdebnames stable /usr/local/share/fai/package_config/*
+> chkdebnames stable /var/lib/fai/config/package_config/*
 </example>
 
 <sect id=cscripts>Scripts in <tt>/fai/scripts</tt><p>
@@ -1984,7 +1985,7 @@
 default task <tt>confdir</tt>, the hooks for this task are the only
 hooks located in <var>$nfsroot</var><file>/fai/hooks</file> on the
 install server. All other hooks are found in
-<file>/usr/local/share/fai/hooks</file> on the install server.
+<file>/var/lib/fai/config/hooks</file> on the install server.
 
 All hooks that are called before classes are defined can only use the
 following classes: <tt>DEFAULT $HOSTNAME LAST</tt>. If a hook for
@@ -2245,7 +2246,7 @@
 Now boot the first client node for the first
 time. Then start to adjust the configuration for your client
 nodes. Don't forget to build the kernel for the cluster nodes using
-<manref name="make-kpkg" section="8"> and store it in <file>/usr/local/share/fai/files/packages</file>.
+<manref name="make-kpkg" section="8"> and store it in <file>/var/lib/fai/config/files/packages</file>.
 
 <sect id=beotools> Tools for Beowulf clusters<p>
 
@@ -2476,6 +2477,48 @@
 the generated line from your <file>~/.cvspass</file> into
 <file>/root/.cvspass</file> in the nfsroot.</p>
 </sect1>
+
+<sect1 id=svn>Setting up FAI for Subversion based configuration<p>
+First you should setup a Subversion repository to store the
+FAI configuration files. In this example an anonymously accessable Subversion Repository 
+on alioth.debian.org will be used for 
+<em>read-only</em> access to the configuration files by the clients, while
+ssh is used for the developers access (rw)<footnote>Subversion is very flexible 
+when it comes to different methods of access, so I recommend you to read 
+further documentation to find the optimal solution in your
+environment</footnote>. </p>
+
+<p>The relevant variables in &fc and &mfnc; for Subversion are:
+<taglist>
+  <tag><var>FAI_LOCATION</var></tag>
+    <item>
+    This variable <strong>must not</strong> be set if you want to use Subversion.
+    </item>
+  <tag><var>FAI_SVNREPO</var></tag>
+    <item>
+    contains the cvsroot where the configuration is stored.
+	<example>
+	FAI_SVNREPO="svn://svn.debian.org/svn/fai-config-dir/trunk/debconf5"
+	</example>
+    </item>
+  <tag><var>FAI_SVNTAG</var></tag>
+    <item>
+      is not currently implemented. For the moment we'll only use trunk.
+    </item>
+<!--  <tag><var>FAI</var></tag>
+    <item><p>
+      Before checking out the configuration, the code copies the contents of
+      this directory after a sanity check (i
+      to <file>/tmp/$FAI_CVSMODULE</file>, then enters the
+      directory and does a <example>cvs update</example> instead of a
+      <example>cvs checkout</example>. This behaviour is used in connection
+      with system updates to record the changes within configuration files.
+    </p></item>
+    -->
+</taglist></p>
+
+</sect1>
+
 </sect>
 
 <sect id=softupdate>Using FAI for online updates

Modified: people/h01ger/fai-sarge/examples/etc/bootptab
===================================================================
--- people/h01ger/fai-sarge/examples/etc/bootptab	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/examples/etc/bootptab	2006-02-08 17:06:54 UTC (rev 3270)
@@ -5,7 +5,7 @@
 	:ms=1024:\
 	:hd=/boot/fai:\
 	:hn:bs=auto:\
-	:rp=/usr/lib/fai/nfsroot:
+	:rp=/var/lib/fai/nfsroot:
 
 # rp: the nfsroot on the install server
 # your local values

Modified: people/h01ger/fai-sarge/examples/etc/dhcpd.conf
===================================================================
--- people/h01ger/fai-sarge/examples/etc/dhcpd.conf	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/examples/etc/dhcpd.conf	2006-02-08 17:06:54 UTC (rev 3270)
@@ -23,7 +23,7 @@
 #   option nis-domain "beowulf";
 #   option nis-servers faiserver; 
    server-name "faiserver";
-   option root-path "/usr/lib/fai/nfsroot,rsize=8192,wsize=8192,acregmin=1800,acregmax=1800,acdirmin=1800,acdirmax=1800";
+   option root-path "/var/lib/fai/nfsroot,rsize=8192,wsize=8192,acregmin=1800,acregmax=1800,acdirmin=1800,acdirmax=1800";
 }
 
 # perl -ane ' {print "host atom {hardware ethernet $1;fixed-address atom}";}'

Modified: people/h01ger/fai-sarge/examples/simple/class/10-base-classes
===================================================================
--- people/h01ger/fai-sarge/examples/simple/class/10-base-classes	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/examples/simple/class/10-base-classes	2006-02-08 17:06:54 UTC (rev 3270)
@@ -4,5 +4,9 @@
 uname -s | tr '[:lower:]' '[:upper:]'
 [ -x "`which dpkg`" ] && dpkg --print-installation-architecture | tr /a-z/ /A-Z/
 
+# define a class named after $FAI_ACTION
+[ $ROOTCMD ] && echo "FAI_INSTALL"
+[ ! $ROOTCMD ] && echo "FAI_SOFTUPDATE"
+
 [ -f /boot/RUNNING_FROM_FAICD ] && echo "FAICD"
-exit 0
\ No newline at end of file
+exit 0

Modified: people/h01ger/fai-sarge/examples/simple/class/50-host-classes
===================================================================
--- people/h01ger/fai-sarge/examples/simple/class/50-host-classes	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/examples/simple/class/50-host-classes	2006-02-08 17:06:54 UTC (rev 3270)
@@ -8,9 +8,9 @@
 	echo "FAIBASE DHCPC DEMO" ;;
     gnomehost)
 	echo "FAIBASE DHCPC DEMO XFREE GNOME";;
-    *)
-	echo "FAIBASE DHCPC" ;;
+#    *)
+#	echo "FAIBASE DHCPC" ;;
 esac
 
-ifclass I386 && echo "GRUB"
+ifclass I386 && ifclass FAI_INSTALL && echo "GRUB"
 exit 0

Modified: people/h01ger/fai-sarge/examples/simple/hooks/savelog.LAST
===================================================================
--- people/h01ger/fai-sarge/examples/simple/hooks/savelog.LAST	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/examples/simple/hooks/savelog.LAST	2006-02-08 17:06:54 UTC (rev 3270)
@@ -109,3 +109,21 @@
 else
    echo "Congratulations! No errors found in log files."
 fi
+
+#!/bin/bash
+# code snipplet by Henning Glawe
+#
+# FAI_CONFIG_AREA is set by subroutines/get_fai_cvs to the directory where the
+# configuration is to be stored
+# 
+# the old contents are rotated to $FAI_CONFIG_AREA.old
+
+
+if [ -n "$FAI_CONFIG_AREA" ] ; then
+	echo "Saving installtime configuration to $FAI_CONFIG_AREA"
+       
+	cp -a "$FAI" "${FAI_CONFIG_AREA}.new"
+	[ -d "${FAI_CONFIG_AREA}.old" ] && rm -rf "${FAI_CONFIG_AREA}.old"
+	mv "$FAI_CONFIG_AREA" "${FAI_CONFIG_AREA}.old"
+	mv "${FAI_CONFIG_AREA}.new" "$FAI_CONFIG_AREA"
+fi

Modified: people/h01ger/fai-sarge/man/fai-cd.8
===================================================================
--- people/h01ger/fai-sarge/man/fai-cd.8	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/man/fai-cd.8	2006-02-08 17:06:54 UTC (rev 3270)
@@ -75,7 +75,7 @@
 .FN /etc/fai/menu.lst
 The default grub menu configuration file for fai-cd.
 .TP
-.FN /usr/local/share/fai/package_config/
+.FN /var/lib/fai/config/package_config/
 The FAI package configuration directory. This directory is defined by
 the variable FAI_CONFIGDIR.
 .SH AUTHOR

Modified: people/h01ger/fai-sarge/man/fai-mirror.1
===================================================================
--- people/h01ger/fai-sarge/man/fai-mirror.1	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/man/fai-mirror.1	2006-02-08 17:06:54 UTC (rev 3270)
@@ -47,7 +47,7 @@
 This command creates a partitial mirror of Debian packages. It can
 be used to create the fai CD or as a local mirror when you can't
 download the whole Debian mirror. By default, the mirror will contain
-all packages of all classes used in the configuration space (/usr/local/share/fai/package_config).
+all packages of all classes used in the configuration space (/var/lib/fai/config/package_config).
 
 .SH OPTIONS
 .TP
@@ -117,7 +117,7 @@
 Package resource definition for FAI.
 .TP
 
-.FN /usr/local/share/fai/package_config/
+.FN /var/lib/fai/config/package_config/
 The FAI package configuration directory. This directory is defined by
 the variable FAI_CONFIGDIR.
 

Modified: people/h01ger/fai-sarge/man/install_packages.8
===================================================================
--- people/h01ger/fai-sarge/man/install_packages.8	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/man/install_packages.8	2006-02-08 17:06:54 UTC (rev 3270)
@@ -80,7 +80,7 @@
 install_packages expects to find the FAI_ROOT directory, the location of class
 definitions, package configurations, and custom install scripts, somewhere in
 the filesystem.  This location is configurable in /etc/fai/fai.conf and defaults to
-/usr/local/share/fai.
+/var/lib/fai/config.
 .PD
 .SH SEE ALSO
 .PD 0
@@ -97,7 +97,7 @@
 The FAI configuration file.
 
 .TP
-.FN /usr/local/share/fai/package_config/
+.FN /var/lib/fai/config/package_config/
 The FAI package configuration directory.
 
 .SH AUTHOR

Modified: people/h01ger/fai-sarge/scripts/fai-setup
===================================================================
--- people/h01ger/fai-sarge/scripts/fai-setup	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/scripts/fai-setup	2006-02-08 17:06:54 UTC (rev 3270)
@@ -144,8 +144,8 @@
 
 if [ -z "$FAI_CONFIGDIR" ]; then
     echo "FAI_CONFIGDIR not set in /etc/fai/fai.conf."
-    echo "Using /usr/local/share/fai as default."
-    FAI_CONFIGDIR=/usr/local/share/fai
+    echo "Using /var/lib/fai/config as default."
+    FAI_CONFIGDIR=/var/lib/fai/config
 fi
 mkdir -p $FAI_CONFIGDIR || true
 

Modified: people/h01ger/fai-sarge/share/subroutines
===================================================================
--- people/h01ger/fai-sarge/share/subroutines	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/share/subroutines	2006-02-08 17:06:54 UTC (rev 3270)
@@ -189,6 +189,24 @@
 	   cvs -q -d"$FAI_CVSROOT" co -P -d $(basename "$FAI") \
 	     $TAG $FAI_CVSMODULE > $LOGDIR/cvs.log
 	fi
+    elif [ "$FAI_SVNREPO" ] ; then
+	export FAI_CONFIG_AREA=$FAI_ROOT$FAI
+	export FAI=$(mktemp -t -d fai-config.XXXXXX)
+ 
+	[ "$debug" ] && echo "\$FAI now points to $FAI"
+
+	if [ -d "$FAI_CONFIG_AREA/.svn" -a -z "$FORCE" ] ; then
+	   echo "Config found at $FAI_CONFIG_AREA: Copying"
+	   mkdir -p $FAI	# not really sure if this is appropriate (here)
+           cp -a $FAI_CONFIG_AREA/. $FAI
+           echo "Updating SVN"
+           cd $FAI
+           svn up > $LOGDIR/svn.log
+        else
+           echo "Checking out SVN"
+           cd /tmp
+           svn co "$FAI_SVNREPO" $(basename "$FAI")  > $LOGDIR/cvs.log
+        fi
     else
 	echo "Warning $0: Neither \$FAI_LOCATION nor \$FAI_CVSROOT are defined."
     fi
@@ -426,7 +444,7 @@
     local start_seconds=$(cut -d . -f 1 /proc/uptime)
     task mirror
     task debconf
-    task prepareapt
+    #task prepareapt
     task updatebase
     task instsoft
     task configure

Modified: people/h01ger/fai-sarge/utils/create-nfsroot-tar
===================================================================
--- people/h01ger/fai-sarge/utils/create-nfsroot-tar	2006-02-08 16:32:57 UTC (rev 3269)
+++ people/h01ger/fai-sarge/utils/create-nfsroot-tar	2006-02-08 17:06:54 UTC (rev 3270)
@@ -10,8 +10,8 @@
 # After unpacking copy base2_2.tgz to $nfsroot/var/tmp, set up bootpd
 
 tarball=/tmp/fai-tarball.tar.bz2
-nfsroot=/usr/lib/fai/nfsroot
+nfsroot=/var/lib/fai/nfsroot
 
 cd /
-tar -cvf - $nfsroot /boot/fai /usr/local/share/fai | bzip2 > $tarball
+tar -cvf - $nfsroot /boot/fai /var/lib/fai/config | bzip2 > $tarball
 echo $tarball created.




More information about the Fai-commit mailing list