Difference between revisions of "Tips and tricks"

From FAIWiki
Jump to navigation Jump to search
m (Define user specific subroutines.)
Line 1: Line 1:
If the pre-defined FAI soubroutines don't fit or you need additional soubroutines, <i>place a file called 'soubroutines' in your <b>'$FAI/hooks'</b></i> and it will be sourced by any installation.
+
If the pre-defined FAI subroutines don't fit or you need additional subroutines, <i>place a file called 'subroutines' in your <b>'$FAI/hooks'</b></i> and it will be sourced by any installation.
  
To enable class specific soubroutines, create a hook <b><i>'defvar.DEFAULT.source'</i></b> with following content:
+
To enable class specific subroutines, create a hook <b><i>'defvar.DEFAULT.source'</i></b> with following content:
 
<pre>
 
<pre>
 
#! /bin/bash
 
#! /bin/bash

Revision as of 23:03, 17 August 2005

If the pre-defined FAI subroutines don't fit or you need additional subroutines, place a file called 'subroutines' in your '$FAI/hooks' and it will be sourced by any installation.

To enable class specific subroutines, create a hook 'defvar.DEFAULT.source' with following content:

#! /bin/bash
for class in ${classes}
do
  [ -r ${FAI}/hooks/subroutines.${class} ] && \
  { echo "Reading subroutines.${class}." ; . ${FAI}/hooks/subroutines.${class} ; }
done
return 0