============================================================== PDL for UML config script: uml.sh ============================================================== - Ian! D. Allen - idallen@idallen.ca - www.idallen.com This PDL for the UML uml.sh is cumulative up through Lab 9. Lab 9 entries are marked. ----------------- START PDL for UML config script: uml.sh SET up shell environment (#!, PATH, umask, etc.) SET shell variables for use in rest of script IF df /dev/udb0 fails PRINT error message on stderr about not a UML machine EXIT script with non-zero exit status ENDIF REMOVE the 10-second boot delay from the start-up symlinks directory IF "netstat -ia" doesn't output "eth3" PRINT error message on stderr about missing hub EXIT script with non-zero exit status ENDIF Enable ip_forward and log_martians; disable rp_filter Make sure each of these has the correct value Set up /etc/hosts with UML machine interface names Fix the Daylight Savings problem using a new localtime file Create a system log directory and fix system logging to use it (Lab 9) Restart both log daemons Check DNS /etc/resolv.conf and possibly replace it (Lab 9) CASE hostname IN red: PRINT configuring Red CONFIGURE all four network interfaces (eth0-eth3) DOWN FLUSH network routes (should be none) CONFIGURE eth1 with IP address SET DEFAULT ROUTE via Green green: PRINT configuring Green CONFIGURE all four network interfaces (eth0-eth3) DOWN FLUSH network routes (should be none) CONFIGURE eth1 with IP address CONFIGURE eth2 with IP address SET DEFAULT ROUTE via Yellow yellow: PRINT configuring Yellow CONFIGURE all four network interfaces (eth0-eth3) DOWN FLUSH network routes (should be none) CONFIGURE eth2 with IP address CONFIGURE eth3 with IP address SET DEFAULT ROUTE via Magenta SET ROUTE to Red/Green net via Green magenta: PRINT configuring Magenta CONFIGURE all four network interfaces (eth0-eth3) DOWN FLUSH network routes (should be none) CONFIGURE eth3 with IP address SET ROUTE to Red/Green net via Yellow SET ROUTE to Green/Yellow net via Yellow CONFIGURE eth0 UP (preconfigured; do not give it any address) SET DEFAULT ROUTE via IP of tap5 in VNS base default: PRINT error message about unknown machine name EXIT script with non-zero exit status ENDCASE EXIT the script with zero status END PDL for uml.sh