Comment 6 for bug 151579

Revision history for this message
Agostino Russo (ago) wrote :

As suggested by Colin Watson, a better way to skip mountpoints in umountfs is using the following code:

do_stop () {
 exec 9<&0 < <(sed -n '/^\/[^ ]* \/ /,$p' /proc/mounts)

 REG_MTPTS=""
 TMPFS_MTPTS=""
 while read DEV MTPT FSTYPE REST;
 do
        echo "Processing $DEV $MTPT"
        done

    exec 0<&9 9<&-
}