From owner-freebsd-questions Sat Mar 29 09:27:06 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id JAA03574 for questions-outgoing; Sat, 29 Mar 1997 09:27:06 -0800 (PST) Received: from mail.tm.net.my (janeway.tm.net.my [202.188.0.155]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA03566 for ; Sat, 29 Mar 1997 09:27:01 -0800 (PST) From: sweeting@tm.net.my Received: from [202.184.153.110] ([202.184.153.110]) by mail.tm.net.my (8.8.5/8.8.4) with SMTP id BAA17056 for ; Sun, 30 Mar 1997 01:25:39 +0800 (SGT) Date: Sun, 30 Mar 1997 01:25:39 +0800 (SGT) X-Sender: sweeting@mail.tm.net.my Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: freebsd-questions@freebsd.org Subject: [Q] proper way to configure startup scripts for tcp/ip ? Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I previously installed FreeBSD over a network on 2 machines without any trouble whatsoever. As part of that installation process, tcp/ip was configured via the installation menu and configuration files (e.g /etc/resolv.conf) created autmatically. I have now installed FreeBSD via CD ROM on another machine and then configured tcp/ip manually - i kept getting "network unreachable" errors on bootup (using 3com NIC) but managed to cure it with the following : [/etc/resolv.conf] domain hell.com.my nameserver 202.184.153.3 [/etc/host.conf] bind hosts [/etc/hosts] 127.0.0.1 localhost localhost.hell.com.my [/etc/sysconfig] hostname="devil.hell.com.my" defaultdomainname="NO" network_interfaces="lo0 ep0" ifconfig_lo0="inet localhost" ifconfig_ep0="inet 202.184.153.13 netmask 255.255.255.0" # ifconfig_ep0="inet 202.184.153.5 netmask 255.255.255.255 alias" # ifconfig_ep0="inet 202.184.153.30 netmask 255.255.255.255 alias" # ifconfig_ep0="inet 202.184.153.31 netmask 255.255.255.255 alias" static_routes="" router="NO" Now, this works OK but I was trying to get virtual domains to work and found that if i uncomment the ifonfig aliases in /etc/sysconfig above, nothing works at all... (yet I saw a reference to doing ifconfig aliasing in /etc/sysconfig in an earlier post) So, I have created a simple script to do the aliasing : ifconfig ep0 202.184.153.5 netmask 255.255.255.255 alias ifconfig ep0 202.184.153.30 netmask 255.255.255.255 alias ifconfig ep0 202.184.153.31 netmask 255.255.255.255 alias route add -host 202.184.153.13 127.0.0.1 /usr/local/sbin/httpd This works but is it the proper way to go about this ? How can i invoke my script automatically at start up ? (simply append to /etc/sysconfig ?) Should I incorporate that route command into the sysconfig file ? eg. static_routes="202.184.153.13 127.0.0.1" And since just to clean things up, freebsd calls httpd on bootup and fails (since the ip aliases are not set) ... where can i comment that out ? (i tried rc.local, rc*, inetd.conf) Thank you very much for any help. chas