[oe] Changes to udhcpd script to not deconfigure interfaces underneath NFS root mounts. (#4962)

Leon Woestenberg leon.woestenberg at gmail.com
Tue Jan 6 13:55:46 UTC 2009


Hello,

In git .dev, I have committed a change to the udhcpd script to not
deconfigure an interface if the rootfs is running over NFS (or some
other network mounted fs).

This should be robust and fail-safe. But as it's quite intrusive, this
email is for the records.

http://bugs.openembedded.net/show_bug.cgi?id=4962


# return 0 if root is mounted on a network filesystem
root_is_nfs() {
        grep -qe '^/dev/root.*\(nfs\|smbfs\|ncp\|coda\) .*' /proc/mounts
}

case "$1" in
        deconfig)
                if [ ! root_is_nfs ]; then
                        /sbin/ifconfig $interface 0.0.0.0
                fi
                ;;

Regards,
-- 
Leon




More information about the Openembedded-devel mailing list