home *** CD-ROM | disk | FTP | other *** search
/ ftp.jcu.edu.au / 2014.06.ftp.jcu.edu.au.tar / ftp.jcu.edu.au / v6.3.2b / SWBD63 / fabos-6.3.2b-10.ppc.rpm / fabos-6.3.2b.10.cpio.gz / fabos-6.3.2b.10.cpio / fabos / bin / pdul_misc_pre.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  2010-11-10  |  1KB  |  41 lines

  1. #!/bin/sh
  2. #
  3. #  Panic Dump - UP Load Pre-Fabos parameters.
  4. #  Certain parameters can be obtained before fabos and we should
  5. #  collect them and process before fabos.
  6. #  Typically this script is called in /etc/init.d/fabos, just after
  7. #  loading panicdump-module and consolelog-module
  8. #
  9.  
  10. MISC_FILE=/core_files/panic/system_sym  # if you change this, also change
  11.                                 # corresponding entry in pdul_misc_pre.sh and
  12.                                 # pdul_misc_post.sh and pdcheck.sh
  13.  
  14. PD_TEMP_ERRLOG_FILE=/tmp/pd_temp_errlog
  15.  
  16. #
  17. # Let us record our start date
  18. #
  19. printf "Section=Startup time: `/bin/date`\n" > /proc/consolelog
  20.  
  21. #
  22. # Log the Version in pd_misc
  23. #
  24.  
  25. consolelog(){
  26.     # copy a line at a time to /proc/consolelog
  27.     # We need to do this because of the "interesting" way consolelog is
  28.     # implemented. If we have a later version of GNU sed that
  29.     # implements the "-u" switch we could use that instead.
  30.     while read -r line
  31.     do
  32.         printf "%s\n" "$line" > /proc/consolelog
  33.     done
  34. }
  35. /fabos/bin/version | /bin/sed -e 's/:/=/' -e '/^[ \t]*$/q' | consolelog
  36.  
  37. # remove older file if it exists
  38. /bin/rm -f /core_files/.misc_file
  39. # This can be deleted after 6.1, bld 24 is dead
  40. /bin/rm -f /core_files/misc_file.core
  41.