[Fai-commit] r6691 - in trunk: bin lib

Thomas Lange lange at alioth.debian.org
Tue Oct 18 15:07:16 UTC 2011


Author: lange
Date: 2011-10-18 15:07:15 +0000 (Tue, 18 Oct 2011)
New Revision: 6691

Modified:
   trunk/bin/faimond-gui
   trunk/lib/subroutines
Log:
rename task prepareapt to repository, add warnings for hooks using the old name


Modified: trunk/bin/faimond-gui
===================================================================
--- trunk/bin/faimond-gui	2011-10-18 14:49:16 UTC (rev 6690)
+++ trunk/bin/faimond-gui	2011-10-18 15:07:15 UTC (rev 6691)
@@ -6,7 +6,7 @@
 # faimond-gui: graphical FAI monitor daemon
 #
 # This script is part of FAI (Fully Automatic Installation)
-# Copyright (C) 2007-2010 Thomas Lange, lange at informatik.uni-koeln.de
+# Copyright (C) 2007-2011 Thomas Lange, lange at informatik.uni-koeln.de
 # Universitaet zu Koeln
 #
 #*********************************************************************
@@ -41,7 +41,7 @@
 
 $debug = 0;
 
-#@tasklist = qw/hostname confdir defclass action partition mountdisks extrbase mirror debconf prepareapt instsoft configure chboot savelog faiend reboot/;
+#@tasklist = qw/hostname confdir defclass action partition mountdisks extrbase mirror debconf repository instsoft configure chboot savelog faiend reboot/;
 @tasklist = qw/hostname confdir defclass partition extrbase debconf instsoft configure tests savelog faiend reboot/;
 $tasklist[0] = ' 'x15 . 'hostname'. ' 'x15;
 

Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines	2011-10-18 14:49:16 UTC (rev 6690)
+++ trunk/lib/subroutines	2011-10-18 15:07:15 UTC (rev 6691)
@@ -552,7 +552,7 @@
     task extrbase
     task mirror
     task debconf
-    task prepareapt
+    task repository
     task updatebase
     task instsoft
     task configure
@@ -620,7 +620,7 @@
     [ -f $target/etc/fstab ] || touch $target/etc/fstab
     task mirror
     task debconf
-    task prepareapt
+    task repository
     task updatebase
     task instsoft
     task configure
@@ -889,8 +889,23 @@
 # Short-Description: prepare package repository access
 ### END SUBROUTINE INFO
 
-task_prepareapt () {
+task_repository () {
 
+    # check for old hooks for task prepareapt
+    local hook cl hfile
+    hook=prepareapt
+    for cl in $classes; do
+	hfile=$FAI/hooks/$hook.$cl
+	if [ -f $hfile ]; then
+	    echo "WARNING: The task prepareapt is obsolete. It was renamed to task repository. Please rename your hook $hfile to repository.$cl."
+	    continue
+	fi
+	if [ -f $hfile.source ]; then
+	    echo "WARNING: The task prepareapt is obsolete. It was renamed to task repository. Please rename your hook $hfile.source to repository.$cl.source."
+	    continue
+	fi
+    done
+
     [ $do_init_tasks -eq 1 ] && FAI_ETC_DIR=/etc
 
     # some generale network files are needed on the client




More information about the Fai-commit mailing list