home *** CD-ROM | disk | FTP | other *** search
/ pc.louisiana.edu/pub/unix/ / Louisiana_UNIX.tar / Louisiana_UNIX / newvers.diff < prev    next >
Text File  |  1996-09-20  |  3KB  |  81 lines

  1. Context diff of changes to /sys/conf.common/newvers, to scan for
  2. symlinks in the /sys/sun4*/OBJ dir, so that patches can be named in the
  3. generated vmunix file, and shown by the ident program.
  4. -- James Dugal, jpd@usl.edu
  5. ========================================================================
  6. *** newvers.sh.orig    Wed Oct  6 19:37:36 1993
  7. --- newvers.sh    Tue May 17 15:54:31 1994
  8. ***************
  9. *** 1,3 ****
  10. --- 1,23 ----
  11. + #
  12. + # $Header: /h1/staff/RCS/newvers.sh,v 1.2 1991/11/11 16:40:34 root Exp $
  13. + #
  14. + # $Log: newvers.sh,v $
  15. + # Revision 1.2  1991/11/11  16:40:34  root
  16. + # Applied mods to track patches applied to kernel.
  17. + # Essentially, in the OBJ dir, create a synbolic link to the actual .o file,
  18. + #  and name it with the patch number, as in: ln -s foo.o foo.o-100956-02
  19. + #
  20. + # Revision 1.3  1991/10/08  06:37:59  kernel
  21. + # Added code to insert version of configuration file
  22. + # Added code to build dummy rcsid string with indications of patched
  23. + # objects
  24. + #
  25. + # Revision 1.2  1991/10/07  17:12:23  kernel
  26. + # Added RCS identification string
  27. + #
  28. + #
  29. + #
  30.   # called by:  newvers.sh <release_file> <arch>
  31.   
  32.   PATH=/usr/ucb:/bin:/usr/bin
  33. ***************
  34. *** 18,24 ****
  35.   echo '#include <sys/utsname.h>' > vers.c
  36.   echo >> vers.c
  37.   
  38. ! echo $VERS `basename \`pwd\`` `cat $1` | \
  39.   awk '    {    version = $1; system = $2; release = $3; }\
  40.   END    {    printf "char version[] = \"SunOS Release %s (%s) #%d: ", release, system, version >> "vers.c";\
  41.           printf "%d\n", version > "version"; }' 
  42. --- 38,46 ----
  43.   echo '#include <sys/utsname.h>' > vers.c
  44.   echo >> vers.c
  45.   
  46. ! SNAME=`basename \`pwd\`` 
  47. ! SLINE=`grep "^ident" ../conf/$SNAME | awk '{print $2}' | sed 's/"//g'`
  48. ! echo $VERS $SLINE `cat $1` | \
  49.   awk '    {    version = $1; system = $2; release = $3; }\
  50.   END    {    printf "char version[] = \"SunOS Release %s (%s) #%d: ", release, system, version >> "vers.c";\
  51.           printf "%d\n", version > "version"; }' 
  52. ***************
  53. *** 32,34 ****
  54. --- 54,61 ----
  55.   END    {    printf "struct utsname utsname =\n\t{ \"%s\", \"\", \"\", \"%s\", \"%s\", \"%s\" };\n\n", \
  56.   sysname, release, version, arch >> "vers.c" ; } '
  57.   
  58. + # Create dummy variable containing identification for patched objects
  59. + #
  60. + (cd ../OBJ; echo 'static char *rcsid[] = {'; ls -l * | grep lrwx | \
  61. + cut -c46-500 | sed 's/^/    "\$Id: /' | \
  62. + sed 's/$/ \$",/'; echo '""};') >> vers.c
  63. ====================================================================
  64.  
  65. Example - here are the entries in OBJ for nfs* modules (3.1.3_U1):
  66.  
  67. -r--r--r--  1 root     staff        4620 Jan  4  1995 nfs_client.o
  68. lrwxrwxrwx  1 root     wheel          12 Sep 11 18:06 nfs_client.o-102177-02 -> nfs_client.o
  69. -r--r--r--  1 root     staff        3036 Nov 13  1992 nfs_client.o.FCS
  70. -r--r--r--  1 root     staff         960 Nov 13  1992 nfs_common.o
  71. -r--r--r--  1 root     staff        5760 Nov 13  1992 nfs_dump.o
  72. -r--r--r--  1 root     staff        5096 Nov 13  1992 nfs_export.o
  73. -r--r--r--  1 root     staff       18900 Oct 13  1993 nfs_server.o
  74. -r--r--r--  1 root     staff       16590 Oct 13  1993 nfs_subr.o
  75. -r--r--r--  1 root     staff       14612 Nov 13  1992 nfs_vfsops.o
  76. -r--r--r--  1 root     staff       41938 Jan  4  1995 nfs_vnodeops.o
  77. lrwxrwxrwx  1 root     wheel          14 Sep 11 18:06 nfs_vnodeops.o-102177-02 -> nfs_vnodeops.o
  78. -r--r--r--  1 root     staff       41598 Oct 13  1993 nfs_vnodeops.o.FCS
  79. -r--r--r--  1 root     staff        8112 Oct 13  1993 nfs_xdr.o
  80.