Difference between revisions of "Tips and tricks"
Jump to navigation
Jump to search
m |
|||
Line 1: | Line 1: | ||
+ | == User defined subroutines == | ||
+ | |||
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. | 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. | ||
Revision as of 19:38, 19 August 2005
User defined subroutines
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
Fallback to local boot if no install needed
Rather than forcing a netboot when you want to install, you can run fai-chboot -o default once on the install server. If you have netboot as your first boot option, and local boot as second, your new server will check the fai server, if no install is required, it will boot up normally.
- Greenman (Thanks to MrFai on irc)