[PC-BSD Dev] pc-thinclient external dhcp server

Kris Moore kris at pcbsd.org
Tue Jul 9 11:50:17 PDT 2013


On 07/07/2013 14:29, Joe Maloney wrote:
>
> Kris,
>
> I've finished the modifications for pc-thinclient to accept an
> external dhcp server.  Basically the way it works is a new second
> prompt will ask the user to press "d" for internal dhcp server or 'e'
> for external dhcp server.  If external dhcp server option is chosen a
> series of prompts will ask the user for the network card interface,
> network id, subnet mask and ip address of the thin client will be
> running on.  It will then use the user input for modifying
> /etc/exports and /etc/hosts.allow.
>
>
> 2 issues.  I've not yet found a way yet to verify the network id,
> subnet mask, and ip address in the way that the network interface is
> verified.  I'm not sure if it is possible to pull that info from
> ifconfig because if I grep inet it also displays info for inet 6 for
> example.  I haven't devised a way yet at least.  I could easily create
> a dialog asking the user if these settings look correct before
> continuning?  Would that be acceptable or would we definitely want the
> verification?
>
>
> The second issue is the pxeboot client refuses to mount the
> /usr/home/thinclient nfs share unless i constantly ping the client as
> it is booting.  This is true whether or client is listed with a
> hostname in /etc/hosts.
>
>
> for example
>
>
> 10.11.0.72 pc-thinclient200
>
>
> Adding an entry to /etc/hosts does not seem to help one way or
> another.  Therefore I haven't yet devised a way to add the bulk of
> IP's to /etc/hosts as the option for internal dhcp server would.  I
> thought I would check to see what you thought before issuing a pull
> request.  I can still issue the pull request if you like but I suspect
> I need to make this work a little better first.  What do you think?
>
>
> Joe Maloney
>
>
>

In the old version I had to do something like this in order for it to work:

       # Add a bulk of IPs to /etc/hosts this fixes bugs with RPC timeouts
        # when mounting NFS
        grep -q 'thinclient100' /etc/hosts
        if [ $? -ne 0 ] ; then
                i="100"
                while
                z="1"
                do
                        if [ "${i}" = "200" ]; then break; fi
                        echo "192.168.2.${i}  thinclient${i}" >>/etc/hosts
                        i="`expr ${i} + 1`"
                done
        fi


Would adding these help on your case? The ping stuff seems really hacky ;)

-- 
Kris Moore
PC-BSD Software
iXsystems



More information about the Dev mailing list