rough sketch of .../sbin/rcS_fai control-flow

mod+linux-fai at std.com mod+linux-fai at std.com
Sun Aug 18 23:37:00 CEST 2002


Here's a *very* rough sketch of FAI control-flow when
executing on the client on a linux box.  From notes
I created when I discovered I'd be obliged to
reverse-engineer FAI in order to use it...  ;->


 ##################
 rcS_fai CALL_GRAPH - just a sketch
 ##################
 Note: task_xxx is really a call to task() with xxx as
       the arg, providing an opportunity to skip or
       else do a call_hook() of task_xxx()

 .../sbin/rcS_fai  {                                                          #
     rcS_fai:create_ramdisk()                                                 #
     rcS_fai:fai_init()                                                       #
         /etc/fai/fai.conf                                                    #
         /sbin/portmap                                                        #
         subroutines:save_dmesg()                                             #
     subroutines-linux:task_confdir()                                         #
         subroutines-linux:eval_cmdline()                                     #
         subroutines-linux:netdevice_info()                                   #
         subroutines:create_resolv_conf()                                     #
         subroutines:get_fai_dir()                                            #
     subroutines:task_setup()          # Open VTs, start SSHD, update rcsfaivar
         subroutines:define_fai_flags()                            # from DHCPD
         subroutines-linux:disk_info()                                        #
             subroutines-linux:diskandsize()                                  #
             subroutines-linux:list_disks()                                   #
     subroutines:task_defclass()                                              #
        cd $FAI/class                                                         #
        process S[0-9]*.{sh,pl,source}                                        #
        process $LOGDIR/additional-classes                                    #
     subroutines:task_defvar()                                                #
         cd $FAI/class                                                        #
         source all $class.var                                                #
         source $LOGDIR/additional.var                                        #
     subroutines:task_action()                                                #
         subroutines-linux:task_sysinfo()          # when FAI_ACTION is sysinfo
 --OR--
         subroutines:task_install()                # when FAI_ACTION is install
             subroutines:save_dmesg()
             subroutines-linux:task_partition()                               #
             subroutines:task_mountdisks()
                 /sbin/mount2dir           # All in $LOGDIR/$fstab to $FAI_ROOT
             subroutines-linux:task_extrbase()      # Extract /var/tmp/base.tgz
             subroutines-linux:task_mirror()       # maybe mount $FAI_DEBMIRROR
             subroutines-linux:task_updatebase()
                 subroutines-linux:prepare_apt()
                   # Setup for chroot'd /etc/{resolv.conf,hosts,hostname,apt/*}
                     CHROOT apt-get update
                     CHROOT apt-get check
                     CHROOT dpkg -C
                     CHROOT apt-cache dumpavail / dpkg --update-avail
                     CHROOT apt-get -f -y upgrade
             subroutines-linux:task_instsoft()
                 /sbin/install_packages.pl      # Process $FAI/package_config/*
             subroutines:task_configure()       # Process $FAI/scripts/$classes
                 subroutines:do_script()
             subroutines-linux:task_finish()             # swapoff, rmalldivert
             subroutines-linux:task_chboot()         # Handle $TFTPLINK  - WTF?
             subroutines:save_dmesg()
             subroutines:task_savelog()
             subroutines:task_faiend()
 }



Regards,
 -------------------------------------------
 Michael O'Donnell     mod+linux-fai at std.com
 -------------------------------------------























  ###########################################
  # This transmission has not been approved #
  #   by the Office of Homeland Security.   #
  ###########################################



More information about the linux-fai mailing list