Arexx script that will determine the ip address of your Amiga and the ip
addresses of all hosts on a network that uses DHCP and then add this
information to Roadshow's Hosts database. Allows you to use Samba with DHCP.
You can have this script setup to run every time you boot your Amiga, or like I
do, from a button in DOpus4. IP addresses really don't change that often on my
network. When they do, I just run this script.
Brian Savage,
Mississauga, Ontario, Canada
b.savage()rogers.com
(other Amiga programs by undersigned include
SunCalc, SciCalc, Cal, Convert - all on Aminet)
March 2004
Modified for AmigaOS4 & AmigaOne in January 2005
This script requires:
1. Working Samba installation
2. nmblookup installed (somewhere in the command path)
3. ShowNetStatus in command path (OS4)
What this script does:
1. It copies your existing hosts file (devs:internet/hosts) to ram: (step 1)
2. It will then extract all hosts & ip addresses from this file EXCEPT for those
on your local network and copies them to a new temporary file ("newhost") in
Ram: (step 2)
3. Finds your AmigaOne's ip address using shownetstatus command. AmigaOne
hostname & ip address then written to temporary file "newhost" (step 3)
4. Finds the ip address of all hosts that you have added to the hosts
section (B) below. These host names and their corresponding ips are
then written to temporary file "newhosts" in ram: (step 4)
5. Backup old hosts file and copy "newhosts" file in ram:
to "devs:internet/hosts".
6. Delete all temporary files in ram:
What you need to do:
1. Add ip of your local domain, your AmigaOne's hostname and interface name
to Section A Local Domain below
2. Add names of all hosts on your local network to Section B Hosts below.
Notice: Please make a backup of your original hosts file before you run
this script!!!! It works for me but has not been tried on any other system.
I also have a simliar script for OS3.x that updates Miami's host file.
If there is any interest I can clean up that script too and upload it
to Aminet.
Thjis text is also included in the Arexx script.
Brian Savage
| |