Comment 55 for bug 50430

Revision history for this message
Paul Smith (psmith-gnu) wrote :

Here's what I use. This works for me in 10.04 (and below) but I haven't tried it with 10.10 yet.

It sure as heck would be nice if someone paid a little attention to this bug.

Save this as "reautofs", then follow the directions in the comments.

#!/bin/sh
#
# Stupid NetworkManager doesn't wait for NIS to start before starting
# autofs, so we have no maps. Restart it.
#
# Install with:
# sudo cp ~/Downloads/reautofs /etc/init.d
# sudo update-rc.d reautofs defaults 99
#
#
# Author: Paul Smith <email address hidden>

start () {
    nohup /bin/sh -c '
        while true; do
            ypwhich && break;
            sleep 1;
        done;
        /etc/init.d/autofs restart
    ' </dev/null >/dev/null 2>&1 &
}

case $1 in
    start) start ;;
    *) : no op ;;
esac