home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Netzwerk / scream_1.dms / in.adf / inet.lha / inet / s / start-inet < prev   
Encoding:
AmigaDOS Script File  |  1994-05-11  |  2.0 KB  |  102 lines

  1. .key hostname,servers/s
  2. .bra {
  3. .ket }
  4. ;
  5. ; Sample Internet bootstrap script
  6. ;
  7. ; stack should really be set before here
  8. stack 20000
  9.  
  10. failat 21
  11.  
  12. ;
  13. ; If inet: is missing, then things are surely not setup correctly.  Punt.
  14. ;
  15. assign >nil: inet: exists
  16. if warn
  17.    echo "Please assign inet: to directory where network software is loaded"
  18.    quit 20
  19. endif
  20.  
  21. ;
  22. ; Check that c & db directories are present.  If they are missing anything
  23. ; we'll find out later..
  24. ;
  25. if not exists inet:c
  26.    echo "Internet boot fail:  inet:c directory missing"
  27.    quit 20
  28. endif
  29. path inet:c add
  30. if not exists inet:db
  31.    echo "Internet boot fail: inet:db database directory missing"
  32.    quit 20
  33. endif
  34.  
  35. ;
  36. ; Make sure env: is there
  37. ;
  38. assign >nil: env: exists
  39. if warn
  40.    if not exists ram:env
  41.       makedir ram:env
  42.    endif
  43.    assign env: ram:env
  44. endif
  45.  
  46. ;
  47. ; Put up configuration menu
  48. ;
  49. ;inet:c/config
  50. inet:c/config >env:hostname -v hostname
  51. if warn
  52.    echo "Internet boot fail: Hostname is not set"
  53.    quit 20
  54. endif
  55.  
  56. ;
  57. ; Check how user is set
  58. ;
  59. inet:c/config >env:user -v user
  60. if $user eq "nobody"
  61.    echo "Warning: user configuration parameter set to nobody"
  62. endif
  63.  
  64. ;
  65. ; Config local loopback interface
  66. ;
  67. inet:c/ifconfig >nil: lo0 127.1
  68.  
  69. ;
  70. ; Configure first ethernet controller.  This will fail if the board is
  71. ; missing.
  72. ;
  73. inet:c/ifconfig >nil: s0 $hostname -trailers netmask 255.255.255.0 broadcast 192.9.210.255
  74. if warn
  75.    echo "Internet boot fail: could not configure first ethernet controller"
  76.    echo "Is the controller installed properly?"
  77.    quit 20
  78. endif
  79.  
  80. ;
  81. ; Test to see if second ethernet board is present.
  82. ;
  83. inet:c/ifconfig >nil: sanaii1
  84. if not warn
  85.    echo "Warning: second ethernet controller is present (not configured)"
  86. endif
  87.  
  88. ; test to see if arcnet board is present
  89. ;
  90. ;inet:c/ifconfig >nil: aa0 cokeA -trailers up
  91.  
  92. ;
  93. ; If user specified he wants servers (ie by using "servers" keyword)
  94. ; start up inetd & portmapd.
  95. ;
  96. if not "{servers}" eq ""
  97.    echo "Starting inetd and portmapd"
  98.     run >nil: inet:serv/portmapd
  99.    run >nil: inet:serv/inetd
  100. endif
  101.  
  102.