I took a look at the details of the diversion that the latest version of dash sets up and it's really quite complicated. It's not clear that I could easily get it right, even copying that code, and the consequences of getting it wrong could be disastrous.
So instead I went for an easier approach: install the rm symlink in /usr/share/safe-rm/bin/ and then add that to the front of the PATH in /etc/profile.d/safe-rm.sh. That seems to work both for login shells (on a virtual terminal) and for interactive shells (e.g. gnome-terminal) after logging out and logging back in. The downside is that it may not for shells which are not Bourne-compatible. I believe it works in bash, dash, ksh and zsh, but I could be wrong. I'm happy to accept patches to make it work on other shells of course. Francois -- https://fmarier.org/