Current-Users archive

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

Re: Fixing swap1_stop



In article <20170802215811.02ff2faba38001ebe4f531eb%fastmail.fm@localhost>,
Ian D. Leroux <idleroux%fastmail.fm@localhost> wrote:
>For the last year or so I've been carrying a set of local patches
>to /etc/rc.d/swap1, /etc/defaults/rc.conf and the attendant
>documentation.  The patches stop swap1_stop from blindly unmounting
>a tmpfs-mounted /dev/while the system is still running multi-user.  I
>was about to submit a PR to try to get the patches into the tree (so
>that I don't have to tip-toe around them every time I update my base
>system) when I discovered that ... I already did: bin/51019.
>
>The development of the patches is discussed in the thread starting at:
>https://mail-index.netbsd.org/current-users/2016/03/13/msg029029.html
>
>Could someone take a look and let me know what still needs to be
>improved before they can be committed?  I'd like to get this sorted out
>before I go looking for more windmills at which to tilt ...
>

Why not just skip /dev?

echo -n "Forcibly unmounting tmpfs filesystems:"
mount -t tmpfs | while read tmpfs on dir rest; do
        case "$dir" in
        /dev)
                echo -n " [skipping $dir]"
                ;;
        *)
                echo -n " $dir"
                umount -f "$dir"
        esac
done
echo "."

christos



Home | Main Index | Thread Index | Old Index