Package: fai-client Version: 3.4.8 Severity: wishlist From: "Matthews, Solomon (TI)" <solomon.matth...@riotinto.com>
It would be excellent to have support for Python scripting in fai-do-scripts. This would allow anyone who wishes to use Python in configuration scripts to do so simply by including Python in the NFSROOT packages. Here is an implementation based on the existing support for Perl scripting. Index: bin/fai-do-scripts =================================================================== --- bin/fai-do-scripts (revision 6633) +++ bin/fai-do-scripts (working copy) @@ -157,6 +157,14 @@ fc_check_status $file $exitcode | tee -a $LOGDIR/expect.log ;; + *"python"*"script"*) + echo "Executing python: $file" + echo "===== python: $file =====" >> $LOGDIR/python.log 2>&1 + ./$file >> $LOGDIR/python.log 2>&1 + savemaxstatus $? + fc_check_status $file $exitcode | tee -a $LOGDIR/python.log + ;; + *) echo "File $file has unsupported type $filetype." ;; esac } Currently I am manually adding this support to the instance of fai-do-scripts in each NFSROOT created by fai-setup (I don?t wish to edit the system fai-do-scripts instance as it is under package management). I have successfully used this approach over the past year to build many Lenny, Squeeze and Wheezy systems, so I am confident that Python scripting works as expected. Please feel free to use my example implementation above if desired. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org