> Both mountvirtfs and checkroot.sh try to "touch" filesystem root nodes
> to verify that they are writeable.
[...]
> I mean, it's the question if we really NEED the touch at all.


checkroot.sh uses the function to tell whether or not /dev/shm is writable.
mountvirtfs uses the function to tell whether or not /dev is writable.
These tests could probably be eliminated or implemented in a different way.

Current code in checkroot.sh:

    if dir_writable /dev/shm ; then
        rm -f /dev/shm/root
        mknod /dev/shm/root
    else
        print error message
    fi

Possible alternative:

    if ! { rm -f /dev/shm/root && mknod /dev/shm/root ; } ; then
        print error message
    fi

Current code in mountvirtfs:

    if dir_writable /dev && [ ! -c /dev/ptmx ] ; then
        mknod /dev/ptmx
    fi

Possible alternative:

    if [ ! -c /dev/ptmx ] ; then
        mknod /dev/ptmx || :
    fi


-- 
Thomas Hood


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to