host.sh 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/sh
  2. # file: scripts/host.sh
  3. # edit a PIB file then kick off the INT6300 Host Emulator; if you do
  4. # not want to edit the PIB file before starting then comment out the
  5. # line that does that;
  6. # ====================================================================
  7. # host symbols;
  8. # --------------------------------------------------------------------
  9. . ${SCRIPTS}/hardware.sh
  10. . ${SCRIPTS}/firmware.sh
  11. # ====================================================================
  12. # file symbols;
  13. # --------------------------------------------------------------------
  14. MAC=auto
  15. DAK=$(rkey secret.key -D)
  16. NMK=$(rkey secret.key -M)
  17. # ====================================================================
  18. # confirm MAC;
  19. # --------------------------------------------------------------------
  20. echo -n "MAC Address [${MAC}]: "; read
  21. if [ ! -z ${REPLY} ]; then
  22. MAC="${REPLY}"
  23. fi
  24. # ====================================================================
  25. # modify PIB;
  26. # --------------------------------------------------------------------
  27. modpib ${PIB} -C0 -M ${MAC} -N ${NMK} -D ${DAK}
  28. if [ ${?} != 0 ]; then
  29. exit 1
  30. fi
  31. # ====================================================================
  32. # service host action request messages;
  33. # --------------------------------------------------------------------
  34. # int6khost -i ${ETH} -C ${CFG} -P ${PIB} -N ${NVM} -p abc.pib -n abc.nvm -FF
  35. # int6khost -i ${ETH} -C ${CFG} -P ${PIB} -N ${NVM} -p abc.pib -n abc.nvm -F
  36. int6khost -i ${ETH} -C ${CFG} -P ${PIB} -N ${NVM} -p abc.pib -n abc.nvm
  37. if [ ${?} != 0 ]; then
  38. exit 1
  39. fi