home *** CD-ROM | disk | FTP | other *** search
/ chilidog.highland.cc.ks.us / chilidog.highland.cc.ks.us.zip / chilidog.highland.cc.ks.us / backup / bradford.20120305.etc.tar.gz / bradford.20120305.etc.tar / etc / sysconfig / hardware / scripts / functions.subsystem.template < prev    next >
Text File  |  2006-06-02  |  2KB  |  45 lines

  1. # This is a template for individual subsystem functions.
  2. #
  3. # hwup checks for certain individual subsystem functions and calls them if they
  4. # are defined. These functions must reside in a file named functions.SUBSYSTEM
  5. # in /etc/sysconfig/hardware/scripts/. Subsystem may be e.g. pci, usb, ieee1394
  6. # or any other subsystem known by hwup. Look at function 'is_known_subsystem' in
  7. # /sbin/hwup. hwup will only source the matching function.SUBSYSTEM file.
  8. #
  9. # You don't have to define all functions. Just these that you need.
  10. # And replace SUBSYSTEM with your subsystems name of course.
  11. #
  12. # Possible functions are:
  13.  
  14. # Get all necessary information that hwup need here. E.g. read some value from
  15. # sysfs or any other place specific
  16. get_SUBSYSTEM_information() {
  17.     SUBSYS_SPECIAL_VALUE="`get it somehow`"
  18.     COMMON_HWUP_VAR="`needs to be overwritten`"
  19. }
  20.  
  21. # After hwup collected all needed information and possibly sourced a
  22. # configuration file it prints some info lines (depending on log level).
  23. # Add your desired output here. This function wil be called if LOG_LEVEL>=6.
  24. show_SUBSYSTEM_information() {
  25.     info_mesg "..."
  26. }
  27.  
  28. # hwup will mostly load modules. Immediately before and after loading modules,
  29. # these functions are called. It does not matter if we load a module via
  30. # MODALIAS or a from a hwcfg-* file.
  31. # All pre/post scripts are called before/after these functions.
  32. pre_init_SUBSYSTEM() {
  33.     prepare something ...
  34. }
  35. post_init_SUBSYSTEM() {
  36.     clean up something ...
  37. }
  38.  
  39. # You may also skip the usage of getcfg (which will be removed completely soon)
  40. # with:
  41. get_config_getcfg() {
  42.     get_config_fast
  43. }
  44.  
  45.