Idea: a way to use /dev/modem symlinks safely
I've recently run into several people who are still using /dev/modem as a
symlink to one of the /dev/ttySx devices, to make it easier to remember
which one is their modem (and to make it easier to change that later, if
I think there are advantages to using /dev/modem, however, there is a big
disadvantage that we already know about: if some programs use /dev/modem and
others use /dev/ttySx, their lock files have different names and locking
doesn't work correctly. This means that mgetty conflicts with minicom,
diald conflicts with efax, etc.
Here's my thought: rather than creating a lockfile for the filename of the
requested device (eg. /dev/modem --> /var/lock/LCK..modem) we can create a
lockfile for the target of the symlink (eg. /dev/modem --> /dev/ttyS2 -->
/var/lock/LCK.ttyS2). That way, programs using /dev/modem and programs
using /dev/ttyS2 will both use the same lock file, automatically.
To implement this would require small changes to all the programs using lock
files; that is, minicom, wvdial, pppd, etc. The FHS, FSSTND, and Debian
policy are all sufficiently vague that they don't say whether this is
correct behaviour or not.
I would like to bring back the /dev/modem symlink, because it makes life
easier for newbies who don't know how the serial devices work. A program
like wvdialconf could be used to automatically point /dev/modem at an