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 / libexec / hosts_convert < prev    next >
Text File  |  2010-11-10  |  5KB  |  104 lines

  1.  
  2. #!/bin/sh
  3. #
  4. #    Copyright (c) 2009 Brocade Communications Systems, Inc.
  5. #    All rights reserved.
  6. #
  7. #    Description:
  8. #    This script append the IP addresses for the BP blades
  9. #    to the /etc/hosts.
  10. #
  11. #
  12.  
  13. PATH=/bin:/usr/bin:/sbin:/usr/sbin
  14.  
  15. cp /mnt/etc/hosts /etc/hosts
  16.  
  17. # for consistentsy, hostname is set using existing sysname()
  18. source /etc/init.d/functions
  19. hostname $(sysname "#sw0" < /etc/hosts)
  20.  
  21. # This is for Defect 237999 to update /etc/hosts on the Standby
  22. # when IpaddrSet is issued on the Active CP.
  23. cp /mnt/etc/hosts /etc/hosts
  24.  
  25. # Grep for the latest addition (IP address or internal name)
  26. # in the current release for the /etc/hosts to be updated properly.
  27.  
  28. grep "spear_dpf" /mnt/etc/hosts > /dev/null 2>&1
  29. h1=$?
  30. if [ $h1 -ne 0 ]; then
  31. sed /cp_1_inteth/q /mnt/etc/hosts > /mnt/etc/hosts.new
  32. echo "
  33. 127.1.1.5        cp4_eth1            # cp0 internal for pluto
  34. 127.1.1.6        cp5_eth1            # cp1 internal for pluto
  35. 127.1.2.14        cp4_eth3            # cp0 internal for pluto
  36. 127.1.2.15        cp5_eth3            # cp1 internal for pluto
  37. 127.1.14.40        cp4_cocp_eth2       # cocp0 internal for pluto
  38. 127.1.15.50        cp5_cocp_eth2       # cocp1 internal for pluto
  39.  
  40. 127.1.1.7        cp6_eth1            # cp0 internal for netpune
  41. 127.1.1.8        cp7_eth1            # cp1 internal for neptune
  42. 127.1.2.16        cp6_eth3            # cp0 internal for neptune
  43. 127.1.2.17        cp7_eth3            # cp1 internal for neptune
  44. 127.1.16.60        cp6_cocp_eth2       # cocp0 internal for neptune
  45. 127.1.17.70        cp7_cocp_eth2       # cocp1 internal for neptune
  46.  
  47. 127.1.14.2        cp4_s1              #cp6_slot1 for cp in pluto slot4
  48. 127.1.14.3        cp4_s2              #cp6_slot2 for cp in pluto slot4
  49. 127.1.14.4        cp4_s3              #cp6_slot3 for cp in pluto slot4
  50. 127.1.14.5        cp4_s4              #cp6_slot4 for cp in pluto slot4
  51. 127.1.14.6        cp4_s5              #cp6_slot5 for cp in pluto slot4
  52. 127.1.14.7        cp4_s6              #cp6_slot6 for cp in pluto slot4
  53. 127.1.14.8        cp4_s7              #cp6_slot7 for cp in pluto slot4
  54. 127.1.14.9        cp4_s8              #cp6_slot8 for cp in pluto slot4
  55.  
  56. 127.1.15.2        cp5_s1              #cp7_slot1 for cp in pluto slot5
  57. 127.1.15.3        cp5_s2              #cp7_slot2 for cp in pluto slot5
  58. 127.1.15.4        cp5_s3              #cp7_slot3 for cp in pluto slot5
  59. 127.1.15.5        cp5_s4              #cp7_slot4 for cp in pluto slot5
  60. 127.1.15.6        cp5_s5              #cp7_slot5 for cp in pluto slot5
  61. 127.1.15.7        cp5_s6              #cp7_slot6 for cp in pluto slot5
  62. 127.1.15.8        cp5_s7              #cp7_slot7 for cp in pluto slot5
  63. 127.1.15.9        cp5_s8              #cp7_slot8 for cp in pluto slot5
  64.  
  65. 127.1.16.2        cp6_s1              #cp6_slot1 for cp in Neptune slot 6
  66. 127.1.16.3        cp6_s2              #cp6_slot2 for cp in Neptune slot 6
  67. 127.1.16.4        cp6_s3              #cp6_slot3 for cp in Neptune slot 6
  68. 127.1.16.5        cp6_s4              #cp6_slot4 for cp in Neptune slot 6
  69. 127.1.16.6        cp6_s5              #cp6_slot5 for cp in Neptune slot 6
  70. 127.1.16.7        cp6_s6              #cp6_slot6 for cp in Neptune slot 6
  71. 127.1.16.8        cp6_s7              #cp6_slot7 for cp in Neptune slot 6
  72. 127.1.16.9        cp6_s8              #cp6_slot8 for cp in Neptune slot 6
  73. 127.1.16.10        cp6_s9              #cp6_slot9 for cp in Neptune slot 6
  74. 127.1.16.11        cp6_s10             #cp6_slot10 for cp in Neptune slot 6
  75. 127.1.16.12        cp6_s11             #cp6_slot11 for cp in Neptune slot 6
  76. 127.1.16.13        cp6_s12             #cp6_slot12 for cp in Neptune slot 6
  77. 127.1.16.14        cp6_s13             #cp6_slot13 for cp in Neptune slot 6
  78. 127.1.16.15        cp6_s14             #cp6_slot14 for cp in Neptune slot 6
  79. 127.1.16.16        cp6_s15             #cp6_slot15 for cp in Neptune slot 6
  80. 127.1.16.17        cp6_s16             #cp6_slot16 for cp in Neptune slot 6
  81.  
  82. 127.1.17.2        cp7_s1              #cp7_slot1 for cp in Neptune slot7
  83. 127.1.17.3        cp7_s2              #cp7_slot2 for cp in Neptune slot7
  84. 127.1.17.4        cp7_s3              #cp7_slot3 for cp in Neptune slot7
  85. 127.1.17.5        cp7_s4              #cp7_slot4 for cp in Neptune slot7
  86. 127.1.17.6        cp7_s5              #cp7_slot5 for cp in Neptune slot7
  87. 127.1.17.7        cp7_s6              #cp7_slot6 for cp in Neptune slot7
  88. 127.1.17.8        cp7_s7              #cp7_slot7 for cp in Neptune slot7
  89. 127.1.17.9        cp7_s8              #cp7_slot8 for cp in Neptune slot7
  90. 127.1.17.10        cp7_s9              #cp7_slot9 for cp in Neptune slot7
  91. 127.1.17.11        cp7_s10             #cp7_slot10 for cp in Neptune slot7
  92. 127.1.17.12        cp7_s11             #cp7_slot11 for cp in Neptune slot7
  93. 127.1.17.13        cp7_s12             #cp7_slot12 for cp in Neptune slot7
  94. 127.1.17.14        cp7_s13             #cp7_slot13 for cp in Neptune slot7
  95. 127.1.17.15        cp7_s14             #cp7_slot14 for cp in Neptune slot7
  96. 127.1.17.16        cp7_s15             #cp7_slot15 for cp in Neptune slot7
  97. 127.1.17.17        cp7_s16             #cp7_slot16 for cp in Neptune slot7
  98.  
  99. 127.1.10.1        sprint_bp           #sprint_bp
  100. 127.1.10.10        spear_cpf           #FCIP cp
  101. 127.1.10.21        spear_dpf           #FCIP dp" >> /mnt/etc/hosts.new
  102. mv /mnt/etc/hosts.new /mnt/etc/hosts
  103. fi
  104.