Current-Users archive

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

Re: MAKEDEV loses on update

On Fri, 04 Apr 2008, Greg Troxel wrote:
> I use a script to install a built release on the running system,
> and one of the things it does is run MAKEDEV all.  For a while (in
> current), I've been seeing errors that seem to be complaints about
> files that already exist.

This is a bug in the way MAKEDEV uses pax.  It works the first time, but
complains about already existing files on subsequent runs.

I have some almost completed work in progress to allow MAKEDEV to use
mtree instead of pax for creating device nodes in bulk.  I expect to
commit it within a day.

> MAKEDEV(8) doesn't say that one can't rerun it, and I think one has to
> to get new devices.  But, puffs is now a symlink to putter, and the old
> node didn't get removed.

It's definitely a bug, but I though it was harmless.  If devices have
changed to symlinks then obviously it's not harmless.

Here are some workarounds:

   # fast, uses mtree
   MAKEDEV -s all | mtree -u -e

   # slow, uses "mknod -r"
   MAKEDEV -m mknod all

   # slow, uses "mknod -R"
   MAKEDEV -f all

> Please let me know if there's already a PR on this - I thought I'd ask
> before making a dup.  Querying the database, I didn't find any.

I don't think there's a PR.  Raise one if you like, or just wait until
I commit my fix to use mtree in preference to pax.

--apb (Alan Barrett)

Home | Main Index | Thread Index | Old Index