When you run dtcpclient as daemon mode, you may don't want to specify your password at each invoking of dtcpc. You can save your password into /usr/local/etc/dtcpclient.auth. The format is:
servername:username:passwordFor example, if DTCP server is dtcp.example.org, username is hoge and password is fugafuga, it should be:
dtcp.example.org:hoge:fugafugaSince dtcpclient.auth has password in it, set the mode to prevent it from being referred from other than root like:
chmod 600 /usr/local/etc/dtcpclient.authThe option to run dtcpclient as daemon mode is -D. If -l option is also specified, dtcpclient will try to reconnect automatically when a connection is dropped.
So, a command line will be like follows:
dtcpclient -t network -u hoge -D -l dtcp.example.orgIf you installed dtcpclient from the FreeBSD ports, /usr/local/etc/rc.d/dtcpclient.sh is installed. In this cases, to invoke dtcpclient at boot, add following three lines into /etc/rc.conf:Server: dtcp.example.org
User: hoge (-u)
network tunnel type (-t)
As a daemon (-D)
Reconnect automatically (-l)
dtcpclient_enable="YES" dtcpclient_server="dtcp.example.org" dtcpclient_username="hoge"The default of dtcpclient_flags is `-t network -Dl'. Perhaps you don't need to change it.
If you installed the rc script for NetBSD, above are also applicable for NetBSD.