freebsd / crochet

Build FreeBSD images for RaspberryPi, BeagleBone, PandaBoard, and others.
BSD 2-Clause "Simplified" License
611 stars 187 forks source link

WARNING: pw after r284118 not execute -V #116

Closed f-andrey closed 9 years ago

f-andrey commented 9 years ago

Hello,

/usr/sbin/pw useradd -n user -s /bin/csh -g wheel -w yes -V /usr/obj/_.mount.freebsd/etc/ -d /usr/home/user

make not user with /usr/obj/_.mount.freebsd/etc/ but creates it in the main system /etc

mail list message https://lists.freebsd.org/pipermail/freebsd-current/2015-June/056208.html

bapt commented 9 years ago

According to the manpage the -V switch was always supposed to be before the "useradd" subcommand, the lastest modifications enforced that by accident. I can be convinced to make it accepted like used in crochet, but IMHO having the code respecting the documentation is better (plus within the code it makes more sense :D.

kientzle commented 9 years ago

On Jun 14, 2015, at 2:02 PM, Baptiste Daroussin notifications@github.com wrote:

According to the manpage the -V switch was always supposed to be before the "useradd" subcommand, the lastest modifications enforced that by accident. I can be convinced to make it accepted like used in crochet, but IMHO having the code respecting the documentation is better (plus within the code it makes more sense :D

It probably does make more sense and I’ll definitely update Crochet’s usage. To make the documentation a little clearer, please change “may” to “must” in the man page:

"As an exception to the general rule where options must follow the operation type, the -V flag may be used on the command line before the operation keyword.”

Cheers,

Tim

bapt commented 9 years ago

Done, please note that a new -r has been added, which could be useful for crochet (will be MFC next week)

kientzle commented 9 years ago

I've changed Crochet to put the -V option before the subcommand.

Please update and try again.