[Fai-commit] r3409 - in trunk: bin debian lib

fai-repository at svn.debian.org fai-repository at svn.debian.org
Sat Apr 15 18:42:43 UTC 2006


Author: lange
Date: 2006-04-15 18:42:42 +0000 (Sat, 15 Apr 2006)
New Revision: 3409

Added:
   trunk/lib/prcopyleft
Modified:
   trunk/bin/fai
   trunk/debian/fai-client.install
Log:
move prcopyleft() and additional code into external script


Modified: trunk/bin/fai
===================================================================
--- trunk/bin/fai	2006-04-14 11:27:27 UTC (rev 3408)
+++ trunk/bin/fai	2006-04-15 18:42:42 UTC (rev 3409)
@@ -42,21 +42,9 @@
 classes="DEFAULT $oclass $HOSTNAME LAST"
 faimond=0
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-prcopyleft() {
-
-    cat <<-EOF
-             -----------------------------------------------------
-               Fully Automatic Installation for $osname
-               $FAI_VERSION    Copyright (c) 1999-2006
-
-               Thomas Lange      <lange at informatik.uni-koeln.de>
-             -----------------------------------------------------
-EOF
-}
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 fai_init() {
 
-    local sub osname ostype
+    local sub ostype
     set -a # now export all variables
 
     umask 022
@@ -93,9 +81,6 @@
     [ "$0" = "/etc/init.d/rcS" ] && DO_INIT_TASKS=1
     [ $DO_INIT_TASKS -eq 1 ] && renewclass=1 # always renew class list when installing
 
-    # color logo only if initial install
-    COLOR_FAI_LOGO=$DO_INIT_TASKS
-
     DEBIAN_FRONTEND=noninteractive
     # local disks are mounted to $FAI_ROOT
     if [ -z "$FAI_ROOT" ] ; then
@@ -120,7 +105,6 @@
 
     # several log files
     diskvar=$LOGDIR/disk_var.sh
-    moduleslog=$LOGDIR/modules.log
     rcslog=$LOGDIR/fai.log
 
     # variables for cfengine
@@ -144,7 +128,6 @@
     export HOSTNAME
 
     if [ X$oclass = XLINUX ]; then
-	osname='Debian GNU/Linux'
 	if [ $DO_INIT_TASKS -eq 1 ]; then
 	    grep -q '[[:space:]]sysfs' /proc/filesystems && mount -t sysfs sysfs /sys
 	    ifup lo
@@ -156,26 +139,10 @@
 	    cat /proc/kmsg >/dev/tty4 &
 	fi
     fi
-    if [ X$oclass = XSUNOS ]; then
-	osname='Sun Solaris'
-    fi
+
+    prcopyleft
     unset oclass
 
-    # set red color, but not on some archs
-    [ -e /.nocolorlogo ] && COLOR_FAI_LOGO=0
-    [ -n "$console" ] && COLOR_FAI_LOGO=0  # no red logo if console was defined on the command line
-    case $HOSTTYPE in
-	sparc*|powerpc*) COLOR_FAI_LOGO=0 ;;
-    esac
-
-    [ $COLOR_FAI_LOGO -eq 1 ] && echo -ne "\ec\e[1;31m"
-
-    prcopyleft | tee -a $rcslog
-
-    if [ $COLOR_FAI_LOGO -eq 1 ]; then
-	echo -ne "\e[7;0r"
-	echo -ne "\e[9B\e[1;m"
-    fi
     save_dmesg
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Modified: trunk/debian/fai-client.install
===================================================================
--- trunk/debian/fai-client.install	2006-04-14 11:27:27 UTC (rev 3408)
+++ trunk/debian/fai-client.install	2006-04-15 18:42:42 UTC (rev 3409)
@@ -8,6 +8,7 @@
 usr/lib/fai/subroutines
 usr/lib/fai/subroutines-linux
 usr/lib/fai/updatebase
+usr/lib/fai/prcopyleft
 usr/bin/device2grub
 usr/bin/fai-class
 usr/bin/fai-debconf

Added: trunk/lib/prcopyleft
===================================================================
--- trunk/lib/prcopyleft	2006-04-14 11:27:27 UTC (rev 3408)
+++ trunk/lib/prcopyleft	2006-04-15 18:42:42 UTC (rev 3409)
@@ -0,0 +1,49 @@
+#! /bin/bash
+
+#*********************************************************************
+#
+# This script is part of FAI (Fully Automatic Installation)
+# (c) 2003-2006 by Thomas Lange, lange at informatik.uni-koeln.de
+# Universitaet zu Koeln
+#
+#*********************************************************************
+
+# variables needed: FAI_VERSION, DO_INIT_TASK
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+_prcopyleft() {
+
+    cat <<-EOF
+             -----------------------------------------------------
+               Fully Automatic Installation for $osname
+               $FAI_VERSION    Copyright (c) 1999-2006
+
+               Thomas Lange      <lange at informatik.uni-koeln.de>
+             -----------------------------------------------------
+EOF
+}
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+# color logo only if initial install
+COLOR_FAI_LOGO=$DO_INIT_TASKS
+
+# set red color, but not on some archs
+[ -e /.nocolorlogo ] && COLOR_FAI_LOGO=0
+[ -n "$console" ] && COLOR_FAI_LOGO=0  # no red logo if console was defined on the command line
+case $HOSTTYPE in
+    sparc*|powerpc*) COLOR_FAI_LOGO=0 ;;
+esac
+
+[ $COLOR_FAI_LOGO -eq 1 ] && echo -ne "\ec\e[1;31m"
+
+osname='Debian GNU/Linux'
+if [ X$oclass = XSUNOS ]; then
+    osname='Sun Solaris'
+fi
+
+_prcopyleft | tee -a $rcslog
+
+if [ $COLOR_FAI_LOGO -eq 1 ]; then
+	echo -ne "\e[7;0r"
+	echo -ne "\e[9B\e[1;m"
+fi




More information about the Fai-commit mailing list