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

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