Current-Users archive

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

Re: Trouble booting from thumb drive...

    Date:        Wed, 7 Dec 2011 01:22:51 +0100
    From:        Thomas Klausner <>
    Message-ID:  <>

  | Why not parse the output of vnconfig -l instead?

I actually wrote the first version of that (before I improved it last
night) for cgds, not vnds.   For vnd devices, like most people, I have
(or did) just tend to assume vnd0 would work (which is why I checked
how mkmemstick did it, to see if it was better) and 99% of the time it
does, as we tend to use vnd devides (mostly - or at least I do) for
short periods, just like the usage in mkmemstick (configure, mount,
copy out, unmount, unconfig, done).

cgd's on the other hand tend to be around longer - I have cgd as (part of)
my laptop's internal drive, then it needs backups, so I also have cgd on
external drives, etc - the backups can take hours, so cgds tend to be
mounted for long times, and remembering which ones were in use got too much
for me (and I wanted the whole thing more automated), so the function was
born, and since I needed it, I thought it should be as useful as it could be.

  | That should be doable in less shell code.

As soon as you go beyond built in sh functions, and start running external
commands, it really makes very little difference.  Sure vnconfig -l, and
a short sed script to look for the "not in use" and then edit the first
found down to a device name would be shorter, but vnd specific, and not
really significantly different.


Home | Main Index | Thread Index | Old Index