[Fai-commit] r3254 - in people/lazyboy/fai-2.9-multidistribution:
debian examples/simple/class
examples/simple/files/boot/grub/menu.lst
examples/simple/files/etc examples/simple/files/etc/hosts
examples/simple/scripts/FAIBASE lib
fai-repository at svn.debian.org
fai-repository at svn.debian.org
Thu Jan 19 22:45:53 UTC 2006
Author: lazyboy-guest
Date: 2006-01-19 22:45:52 +0000 (Thu, 19 Jan 2006)
New Revision: 3254
Added:
people/lazyboy/fai-2.9-multidistribution/examples/simple/class/FRENCH.var
people/lazyboy/fai-2.9-multidistribution/examples/simple/class/centos
people/lazyboy/fai-2.9-multidistribution/examples/simple/class/fedora
people/lazyboy/fai-2.9-multidistribution/examples/simple/class/mandriva
people/lazyboy/fai-2.9-multidistribution/examples/simple/files/etc/hosts/
people/lazyboy/fai-2.9-multidistribution/examples/simple/files/etc/hosts/LINUX
Modified:
people/lazyboy/fai-2.9-multidistribution/debian/changelog
people/lazyboy/fai-2.9-multidistribution/examples/simple/class/10-base-classes
people/lazyboy/fai-2.9-multidistribution/examples/simple/class/20-hwdetect.source
people/lazyboy/fai-2.9-multidistribution/examples/simple/files/boot/grub/menu.lst/postinst
people/lazyboy/fai-2.9-multidistribution/examples/simple/scripts/FAIBASE/40-misc
people/lazyboy/fai-2.9-multidistribution/lib/subroutines-linux
Log:
adding minimal changes for enabling different install implementations and keeping backward compatible, plus some example classes
Modified: people/lazyboy/fai-2.9-multidistribution/debian/changelog
===================================================================
--- people/lazyboy/fai-2.9-multidistribution/debian/changelog 2006-01-19 22:43:14 UTC (rev 3253)
+++ people/lazyboy/fai-2.9-multidistribution/debian/changelog 2006-01-19 22:45:52 UTC (rev 3254)
@@ -1,3 +1,10 @@
+fai (2.9-multi-distribution-0.1-07) unstable; urgency=low
+
+ * put florent vuillemins 2.8.4 multi-distribution stuff in here and in the
+ fai-distributions package
+
+ -- Henning Sprang <henning at sprang.de> Thu, 19 Jan 2006 20:00:33 +0100
+
fai (2.9-multi-distribution-0.1-06) unstable; urgency=low
* remove distribution specific stuff into an extra package
Modified: people/lazyboy/fai-2.9-multidistribution/examples/simple/class/10-base-classes
===================================================================
--- people/lazyboy/fai-2.9-multidistribution/examples/simple/class/10-base-classes 2006-01-19 22:43:14 UTC (rev 3253)
+++ people/lazyboy/fai-2.9-multidistribution/examples/simple/class/10-base-classes 2006-01-19 22:45:52 UTC (rev 3254)
@@ -1,8 +1,18 @@
#! /bin/sh
-# echo architecture and OS name in upper case. Do NOT remove these two lines
+# echo architecture, OS name and distribution in upper case.
+# Do NOT remove these lines
+
uname -s | tr '[:lower:]' '[:upper:]'
-[ -x "`which dpkg`" ] && dpkg --print-installation-architecture | tr a-z A-Z
+#### SMITH
+echo $DISTRIBUTION | tr '[:lower:]' '[:upper:]'
+case $DISTRIBUTION in
+ debian)
+ [ -x "`which dpkg`" ] && dpkg --print-installation-architecture | tr /a-z/ /A-Z/ ;;
+ *)
+ uname -i | tr '[:lower:]' '[:upper:]'
+esac
+
[ -f /boot/RUNNING_FROM_FAICD ] && echo "FAICD"
-exit 0
\ No newline at end of file
+exit 0
Modified: people/lazyboy/fai-2.9-multidistribution/examples/simple/class/20-hwdetect.source
===================================================================
--- people/lazyboy/fai-2.9-multidistribution/examples/simple/class/20-hwdetect.source 2006-01-19 22:43:14 UTC (rev 3253)
+++ people/lazyboy/fai-2.9-multidistribution/examples/simple/class/20-hwdetect.source 2006-01-19 22:45:52 UTC (rev 3254)
@@ -32,8 +32,16 @@
modprobe -a $mod 1>/dev/null 2>&1
done
-# let discover do most of the job
-/etc/init.d/discover start
+#### SMITH
+case $DISTRIBUTION in
+ debian)
+ # let discover do most of the job
+ /etc/init.d/discover start ;;
+ centos3)
+ kudzu -q ;;
+ *)
+ # what can I do ?
+esac
# now we can mount the usb file system
mount -t usbfs usbfs /proc/bus/usb
@@ -44,13 +52,17 @@
# try to detect graphics card
# the variable videodrv may be used to generate the XF86config file
-if discover --version | grep "discover \(version \)*1\." ; then
- videodrv=$(discover --xdriver video 2> /dev/null)
-else
- videodrv=$(discover --data-path=xfree86/server/device/driver display)
-fi
-[ -n "$videodrv" ] && echo "videodrv=$videodrv" >> $LOGDIR/additional.var
-echo "Video card detected: $videodrv"
+#### SMITH
+case $DISTRIBUTION in
+ debian)
+ if discover --version | grep "discover \(version \)*1\." ; then
+ videodrv=$(discover --xdriver video 2> /dev/null)
+ else
+ videodrv=$(discover --data-path=xfree86/server/device/driver display)
+ fi
+ [ -n "$videodrv" ] && echo "videodrv=$videodrv" >> $LOGDIR/additional.var
+ echo "Video card detected: $videodrv" ;;
+esac
set_disk_info # calculate number of available disks
save_dmesg # save new boot messages (from loading modules)
Added: people/lazyboy/fai-2.9-multidistribution/examples/simple/class/FRENCH.var
===================================================================
--- people/lazyboy/fai-2.9-multidistribution/examples/simple/class/FRENCH.var 2006-01-19 22:43:14 UTC (rev 3253)
+++ people/lazyboy/fai-2.9-multidistribution/examples/simple/class/FRENCH.var 2006-01-19 22:45:52 UTC (rev 3254)
@@ -0,0 +1,3 @@
+
+FAI_KEYMAP=fr-latin1
+time_zone=Europe/Paris
Added: people/lazyboy/fai-2.9-multidistribution/examples/simple/class/centos
===================================================================
--- people/lazyboy/fai-2.9-multidistribution/examples/simple/class/centos 2006-01-19 22:43:14 UTC (rev 3253)
+++ people/lazyboy/fai-2.9-multidistribution/examples/simple/class/centos 2006-01-19 22:45:52 UTC (rev 3254)
@@ -0,0 +1,17 @@
+
+#DEFAULT
+CENTOS3
+
+# Package groups to install
+BASE
+CORE
+ADMINISTRATION_TOOLS
+DEVELOPMENT_TOOLS
+SYSTEM_TOOLS
+EDITORS
+
+# Miscellaneous FAI configuration scripts
+GRUB
+DEFAULT_HARDDISK
+
+DEFAULT_VARIABLES
Added: people/lazyboy/fai-2.9-multidistribution/examples/simple/class/fedora
===================================================================
--- people/lazyboy/fai-2.9-multidistribution/examples/simple/class/fedora 2006-01-19 22:43:14 UTC (rev 3253)
+++ people/lazyboy/fai-2.9-multidistribution/examples/simple/class/fedora 2006-01-19 22:45:52 UTC (rev 3254)
@@ -0,0 +1,16 @@
+# fedora example host for use with fai-distributions
+
+#DEFAULT
+FEDORA4
+
+# Package groups to install
+CORE
+BASE
+MISCELLANEOUS_INCLUDED_PACKAGES
+SYSTEM_TOOLS
+
+# Miscellaneous FAI configuration scripts
+GRUB
+
+DEFAULT_HARDDISK
+DEFAULT_VARIABLES
Added: people/lazyboy/fai-2.9-multidistribution/examples/simple/class/mandriva
===================================================================
--- people/lazyboy/fai-2.9-multidistribution/examples/simple/class/mandriva 2006-01-19 22:43:14 UTC (rev 3253)
+++ people/lazyboy/fai-2.9-multidistribution/examples/simple/class/mandriva 2006-01-19 22:45:52 UTC (rev 3254)
@@ -0,0 +1,20 @@
+# mandriva example host - only useful when fai-distributions package is
+# installed
+
+#DEFAULT
+MANDRIVA
+
+# Package groups to install
+#SHELLS
+SYSTEM_BASE
+SYSTEM_CONFIGURATION_BOOT_AND_INIT
+SYSTEM_CONFIGURATION_HARDWARE
+#SYSTEM_NETWORKING_REMOTE_ACCESS
+#EDITORS
+#FILE_TOOLS
+
+# Miscellaneous FAI configuration scripts
+GRUB
+DEFAULT_HARDDISK
+
+DEFAULT_VARIABLES
Modified: people/lazyboy/fai-2.9-multidistribution/examples/simple/files/boot/grub/menu.lst/postinst
===================================================================
--- people/lazyboy/fai-2.9-multidistribution/examples/simple/files/boot/grub/menu.lst/postinst 2006-01-19 22:43:14 UTC (rev 3253)
+++ people/lazyboy/fai-2.9-multidistribution/examples/simple/files/boot/grub/menu.lst/postinst 2006-01-19 22:45:52 UTC (rev 3254)
@@ -2,16 +2,27 @@
error=0 ; trap "error=$((error|1))" ERR
+#### SMITH:set -a
set -a
[ -r $target/etc/fai/disk_var.sh ] && . $target/etc/fai/disk_var.sh
# if class NOMBR is defined, write boot loader into root partition, not into mbr
ifclass NOMBR && BOOT_DEVICE=$BOOT_PARTITION
-grub-install --no-floppy --root-directory=$target $BOOT_DEVICE
-GROOT=$(device2grub $BOOT_PARTITION)
+case $DISTRIBUTION in
+ debian)
+ grub-install --no-floppy --root-directory=$target $BOOT_DEVICE ;;
+ *)
+ grub-install --root-directory=$target $BOOT_DEVICE ;;
+esac
+
+GROOT=$(/usr/lib/fai/device2grub $BOOT_PARTITION)
perl -pi -e 's/#(\w+)#/$ENV{$1}/' $2
$ROOTCMD /sbin/update-grub
+
+#### found a problem where GRUB doesn't want to boot (Error 1) if 'savedefault'
+#### is written several times in menu.lst => I remove them all
+sed -i 's/^savedefault$//g' $FAI_ROOT/boot/grub/menu.lst
echo "Grub installed on $BOOT_DEVICE on $GROOT"
exit $error
Added: people/lazyboy/fai-2.9-multidistribution/examples/simple/files/etc/hosts/LINUX
===================================================================
--- people/lazyboy/fai-2.9-multidistribution/examples/simple/files/etc/hosts/LINUX 2006-01-19 22:43:14 UTC (rev 3253)
+++ people/lazyboy/fai-2.9-multidistribution/examples/simple/files/etc/hosts/LINUX 2006-01-19 22:45:52 UTC (rev 3254)
@@ -0,0 +1 @@
+127.0.0.1 localhost.localdomain localhost
Modified: people/lazyboy/fai-2.9-multidistribution/examples/simple/scripts/FAIBASE/40-misc
===================================================================
--- people/lazyboy/fai-2.9-multidistribution/examples/simple/scripts/FAIBASE/40-misc 2006-01-19 22:43:14 UTC (rev 3253)
+++ people/lazyboy/fai-2.9-multidistribution/examples/simple/scripts/FAIBASE/40-misc 2006-01-19 22:45:52 UTC (rev 3254)
@@ -24,6 +24,7 @@
}
{ ${target}/etc/fstab
+ AppendIfNoSuchLine "none /proc/bus/usb usbdevfs defaults"
AppendIfNoSuchLine "/dev/fd0 /floppy auto users,noauto 0 0"
}
Modified: people/lazyboy/fai-2.9-multidistribution/lib/subroutines-linux
===================================================================
--- people/lazyboy/fai-2.9-multidistribution/lib/subroutines-linux 2006-01-19 22:43:14 UTC (rev 3253)
+++ people/lazyboy/fai-2.9-multidistribution/lib/subroutines-linux 2006-01-19 22:45:52 UTC (rev 3254)
@@ -132,6 +132,9 @@
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# FIXME: will break as soon somebody start using DISTRIBUTION=debian_sarge!!!
+# you need to have a prepareapt hook that does this job. but we are
+# backward-compatible like that and I don't want have the code duplicated...
+# errm, move to a library?
task_prepareapt () {
# run this only for default distribution
if ! [ -z $DISTRIBUTION ]; then
@@ -153,6 +156,7 @@
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# FIXME: will break as soon somebody start using DISTRIBUTION=debian_sarge!!!
+# see prepareapt...
task_updatebase() {
# run this only for default distribution
if ! [ -z $DISTRIBUTION ]; then
@@ -173,6 +177,10 @@
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
task_instsoft() {
+ if ! [ -z $DISTRIBUTION ]; then
+ echo "not running instsoft because we are installing DISTRIBUTION=$DISTRIBUTION"
+ return 0
+ fi
echo "Installing software may take a while"
if [ "$debug" ]; then
More information about the Fai-commit
mailing list