home *** CD-ROM | disk | FTP | other *** search
- .key hostname,servers/s
- .bra {
- .ket }
- ;
- ; Sample Internet bootstrap script
- ;
- ; stack should really be set before here
- stack 20000
-
- failat 21
-
- ;
- ; If inet: is missing, then things are surely not setup correctly. Punt.
- ;
- assign >nil: inet: exists
- if warn
- echo "Please assign inet: to directory where network software is loaded"
- quit 20
- endif
-
- ;
- ; Check that c & db directories are present. If they are missing anything
- ; we'll find out later..
- ;
- if not exists inet:c
- echo "Internet boot fail: inet:c directory missing"
- quit 20
- endif
- path inet:c add
- if not exists inet:db
- echo "Internet boot fail: inet:db database directory missing"
- quit 20
- endif
-
- ;
- ; Make sure env: is there
- ;
- assign >nil: env: exists
- if warn
- if not exists ram:env
- makedir ram:env
- endif
- assign env: ram:env
- endif
-
- ;
- ; Put up configuration menu
- ;
- ;inet:c/config
- inet:c/config >env:hostname -v hostname
- if warn
- echo "Internet boot fail: Hostname is not set"
- quit 20
- endif
-
- ;
- ; Check how user is set
- ;
- inet:c/config >env:user -v user
- if $user eq "nobody"
- echo "Warning: user configuration parameter set to nobody"
- endif
-
- ;
- ; Config local loopback interface
- ;
- inet:c/ifconfig >nil: lo0 127.1
-
- ;
- ; Configure first ethernet controller. This will fail if the board is
- ; missing.
- ;
- inet:c/ifconfig >nil: s0 $hostname -trailers netmask 255.255.255.0 broadcast 192.9.210.255
- if warn
- echo "Internet boot fail: could not configure first ethernet controller"
- echo "Is the controller installed properly?"
- quit 20
- endif
-
- ;
- ; Test to see if second ethernet board is present.
- ;
- inet:c/ifconfig >nil: sanaii1
- if not warn
- echo "Warning: second ethernet controller is present (not configured)"
- endif
-
- ; test to see if arcnet board is present
- ;
- ;inet:c/ifconfig >nil: aa0 cokeA -trailers up
-
- ;
- ; If user specified he wants servers (ie by using "servers" keyword)
- ; start up inetd & portmapd.
- ;
- if not "{servers}" eq ""
- echo "Starting inetd and portmapd"
- run >nil: inet:serv/portmapd
- run >nil: inet:serv/inetd
- endif
-
-