pfr I also don't see the issue with running these commands as different users, I'm not actually building anything, I'm just fetching updates.
Yes, but see what's happened: A.I. has created a root
-owned dir. inside bob
-owned /usr/pkgsrc
What happens when cvs
tries to update stuff in /usr/pkgsrc/pkgsrc
? Had this script been run as bob
, the script would've needed 1 doas
:
doas install -m 755 -o bob -g XXX /usr/pkgsrc
Everything else could've been run as bob
.
pfr Without the script, I'd just be running these commands from the command line anyway.
Sure, run the script; in fact run any script, but after switching to bob
--not dave
pretending to be bob
:
If Dr. Jekyll wants to commit murder and mayhem in the East End, he does it as Mr. Hyde--after a complete change of persona. What he doesn't do is wear Mr. Hyde's togs underneath Dr. Jekyll's everyday outfit, ripping it off in some nearby alleyway (leave that to Superman!) when he feels an uncontrollable urge to...build. Instead, like a Victorian gentleman, he takes a hansom-cab to somewhere near Mr. Hyde's digs, discreetly enters the premises, takes his drug and quietly slips out to paint the town red.
pfr I'm more concerned with why it's not working and less with actually using it..
sh -vx script ...
will tell you.
pfr I now want to show the number of pending updates in my bar using pkgin
Don't have any out-of-date packages. Can you try:
pkgin -l '<' list | wc -l