[Fai-commit] r3611 - people/eartoast/features/clean-rcs/lib

fai-commit at lists.alioth.debian.org fai-commit at lists.alioth.debian.org
Sat Jul 22 12:44:12 UTC 2006


Author: glaweh-guest
Date: 2006-07-22 12:44:10 +0000 (Sat, 22 Jul 2006)
New Revision: 3611

Added:
   people/eartoast/features/clean-rcs/lib/get-config-dir
   people/eartoast/features/clean-rcs/lib/get-config-dir-cvs
   people/eartoast/features/clean-rcs/lib/get-config-dir-nfs
Removed:
   people/eartoast/features/clean-rcs/lib/get-fai-cvs
   people/eartoast/features/clean-rcs/lib/get-fai-nfs
Modified:
   people/eartoast/features/clean-rcs/lib/subroutines
   people/eartoast/features/clean-rcs/lib/subroutines-linux
Log:
- move get_fai_dir to its own script get-config-dir
- rename the sub-scripts to match the namespace


Added: people/eartoast/features/clean-rcs/lib/get-config-dir
===================================================================
--- people/eartoast/features/clean-rcs/lib/get-config-dir	2006-07-22 11:13:19 UTC (rev 3610)
+++ people/eartoast/features/clean-rcs/lib/get-config-dir	2006-07-22 12:44:10 UTC (rev 3611)
@@ -0,0 +1,32 @@
+#!/bin/bash
+get_fai_dir() {
+
+    # get /fai directory, using the method specified in $FAI_CONFIG_METHOD
+
+    [ -f /boot/RUNNING_FROM_FAICD ] && mkrw -s 100m $FAI
+    # now you have enough time to make changes to the config space
+    if [ -n "$fl_wait" ]; then
+	echo "Sleeping. Now you may change the config space in $FAI."
+	echo "Continue after killall sleep."
+	sleep 50000
+    fi
+
+	if [ -z "$FAI_CONFIG_METHOD" ]; then
+		sndmon "TASKERROR get_fai_dir 21"
+		die "Error: Provide the method to obtain the fai config storage in \$FAI_CONFIG_METHOD"
+	fi
+
+	# HG: run get-fai-$blah script if it exists
+	if which get-config-dir-$FAI_CONFIG_METHOD &>/dev/null ; then
+		get-config-dir-$FAI_CONFIG_METHOD
+	else
+		sndmon "TASKERROR get_fai_dir 22"
+		die "Error: get-config-dir-$FAI_CONFIG_METHOD not found"
+	fi
+	
+    ln -s $FAI $rundir/current_config
+    if [ ! -d $FAI/class ]; then
+	echo "WARNING: directory $FAI/class not found."
+    fi
+}
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Copied: people/eartoast/features/clean-rcs/lib/get-config-dir-cvs (from rev 3610, people/eartoast/features/clean-rcs/lib/get-fai-cvs)

Copied: people/eartoast/features/clean-rcs/lib/get-config-dir-nfs (from rev 3610, people/eartoast/features/clean-rcs/lib/get-fai-nfs)

Deleted: people/eartoast/features/clean-rcs/lib/get-fai-cvs
===================================================================
--- people/eartoast/features/clean-rcs/lib/get-fai-cvs	2006-07-22 11:13:19 UTC (rev 3610)
+++ people/eartoast/features/clean-rcs/lib/get-fai-cvs	2006-07-22 12:44:10 UTC (rev 3611)
@@ -1,27 +0,0 @@
-#! /bin/bash
-
-# get-fai-cvs -- get fai configuration directory $FAI from a cvs repository.
-# (c) 2002-2006 Henning Glawe
-
-pushd &>/dev/null
-
-local TAG=""
-[ -n "$FAI_CVSTAG" ] && TAG="-r $FAI_CVSTAG"
-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/CVS" -a -z "$FORCE" ] ; then
-   echo "Config found at $FAI_CONFIG_AREA: Copying"
-   cp -a $FAI_CONFIG_AREA/. $FAI
-   echo "Updating CVS"
-   cd $FAI
-       cvs -q -d"$FAI_CVSROOT" up -P $TAG -d -C > $LOGDIR/cvs.log
-else 
-   echo "Checking out CVS"
-   cd /tmp
-   cvs -q -d"$FAI_CVSROOT" co -P -d $(basename "$FAI") \
-     $TAG $FAI_CVSMODULE > $LOGDIR/cvs.log
-fi
-popd &>/dev/null

Deleted: people/eartoast/features/clean-rcs/lib/get-fai-nfs
===================================================================
--- people/eartoast/features/clean-rcs/lib/get-fai-nfs	2006-07-22 11:13:19 UTC (rev 3610)
+++ people/eartoast/features/clean-rcs/lib/get-fai-nfs	2006-07-22 12:44:10 UTC (rev 3611)
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-mount $romountopt $FAI_LOCATION $FAI &&
-echo "Configuration space $FAI mounted from $FAI_LOCATION"

Modified: people/eartoast/features/clean-rcs/lib/subroutines
===================================================================
--- people/eartoast/features/clean-rcs/lib/subroutines	2006-07-22 11:13:19 UTC (rev 3610)
+++ people/eartoast/features/clean-rcs/lib/subroutines	2006-07-22 12:44:10 UTC (rev 3611)
@@ -155,32 +155,6 @@
     done
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-get_fai_dir() {
-
-    # get /fai directory, using the method specified in $FAI_CONFIG_METHOD
-
-    [ -f /boot/RUNNING_FROM_FAICD ] && mkrw -s 100m $FAI
-    # now you have enough time to make changes to the config space
-    if [ -n "$fl_wait" ]; then
-	echo "Sleeping. Now you may change the config space in $FAI."
-	echo "Continue after killall sleep."
-	sleep 50000
-    fi
-
-	if [ -z "$FAI_CONFIG_METHOD" ]; then
-		sndmon "TASKERROR get_fai_dir 21"
-		die "Error: Provide the method to obtain the fai config storage in \$FAI_CONFIG_METHOD"
-	fi
-
-	# HG: source the get-fai-$blah script, as env variables might be defined by it.
-	source get-fai-$FAI_CONFIG_METHOD
-	
-    ln -s $FAI $rundir/current_config
-    if [ ! -d $FAI/class ]; then
-	echo "WARNING: directory $FAI/class not found."
-    fi
-}
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 define_fai_flags() {
 
     local flag

Modified: people/eartoast/features/clean-rcs/lib/subroutines-linux
===================================================================
--- people/eartoast/features/clean-rcs/lib/subroutines-linux	2006-07-22 11:13:19 UTC (rev 3610)
+++ people/eartoast/features/clean-rcs/lib/subroutines-linux	2006-07-22 12:44:10 UTC (rev 3611)
@@ -56,7 +56,7 @@
         create_resolv_conf
     fi
     define_fai_flags
-    get_fai_dir
+    get-config-dir
 
     # check if monitor server is available
     [ -z "$monserver" ] && monserver=$SERVER




More information about the Fai-commit mailing list