tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Making dhcpcd work on diskless clients



On February 3, 2015 3:47:17 PM EST, Martin Husemann <martin%duskware.de@localhost> wrote:
>After talking to Roy, there is no "good" reason for this, and testing
>shows
>that running dhcpcd later works just fine, without interrupting the /
>mount.
>
>This led to the following change in /etc/rc.d/dhcpcd:
>
>--8<--
>..
>if ifconfig $( sysctl -n kern.root_device ) 2>/dev/null | fgrep flags=
>\
>                | fgrep -q UP; then
>        # a diskless client, try to make sure everything is in core
>        echo A diskless client, trying to get dhpcpcd into buffers...
>        cat /sbin/dhcpcd > /dev/null
>fi
>
>run_rc_command "$1"
>-->8--
>
>and this makes it work.
>
>Can anyone think of a safer way, or some alternative to handle it
>inside
>dhcpcd code?
>

Ew... how about having dhcpcd call mlockall()?

Eric




Home | Main Index | Thread Index | Old Index