ftp alternative for pkg_add?

Bryan Irvine sparctacus at gmail.com
Thu Jul 31 10:54:45 PDT 2008


On Thu, Jul 31, 2008 at 1:41 AM, macintoshzoom
<macintoshzoom at lavabit.com> wrote:
> So pkg_add uses /root/.profile, as it runs as root if I use su from the
> console.
> Right?

erm, kinda.
When you log in .profile gets run and sets the PKG_PATH environment
variable.  pkg_add 'uses' the environment variable.

> If I use instead sudo (wich I never use anyway), it's
> /home/username/.profile what matters?
> Right?

though you can get the full environment set by using -i

examples:
my $PATH
me at mine:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/games

still my $PATH even though I've sudo'd
me at mine:~$ sudo echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/games

root's $PATH
me at mine:~$ sudo -i -- -c 'echo $PATH'
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
me at mine:~$


-Bryan


More information about the Openbsd-newbies mailing list