[Fai-commit] r3378 - trunk/bin

fai-repository at svn.debian.org fai-repository at svn.debian.org
Thu Apr 6 15:40:50 UTC 2006


Author: lange
Date: 2006-04-06 15:40:50 +0000 (Thu, 06 Apr 2006)
New Revision: 3378

Modified:
   trunk/bin/fai
Log:
$oclass is in uppercase, $OS_TYPE was in lower case, now $ostype is in
lowercase, set $targetdir (used for dirinst)


Modified: trunk/bin/fai
===================================================================
--- trunk/bin/fai	2006-04-06 15:34:26 UTC (rev 3377)
+++ trunk/bin/fai	2006-04-06 15:40:50 UTC (rev 3378)
@@ -56,7 +56,7 @@
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 fai_init() {
 
-    local sub osname
+    local sub osname ostype
     set -a # now export all variables
 
     umask 022
@@ -77,10 +77,11 @@
     # some variables from are not needed any more
     unset NFSROOT FAI_CONFIGDIR installserver
 
+    ostype=$(uname -s | tr A-Z a-z)
     # read subroutine definitions
     sub=/usr/lib/fai/subroutines
     [ -f $sub ] && . $sub
-    [ -f $sub-$oclass ] && . $sub-oclass
+    [ -f $sub-$ostype ] && . $sub-ostype
 
     [ -f "$stamp" ] && {
        echo "$0 already running, aborting"
@@ -142,7 +143,7 @@
     fi
     export HOSTNAME
 
-    if [ X$oclass = Xlinux ]; then
+    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
@@ -155,7 +156,7 @@
 	    cat /proc/kmsg >/dev/tty4 &
 	fi
     fi
-    if [ X$oclass = Xsunos ]; then
+    if [ X$oclass = XSUNOS ]; then
 	osname='Sun Solaris'
     fi
     unset oclass
@@ -271,10 +272,11 @@
 
 # override FAI_ACTION if a command line argument is given
 [ "$1" ] && FAI_ACTION=$1
+[ "$2" ] && targetdir=$2 # only used for dirinst
 
 task action 2>&1 | tee -a $rcslog
 
-# not quiet happy with it
+# not happy with this at all!
 [ "$FAI_CVSROOT" ] && rm -rf $FAI
 rm -rf $LOGDIR
 




More information about the Fai-commit mailing list