DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 9th August 2015
betweendayandnight betweendayandnight is offline
friendly
 
Join Date: Jul 2015
Posts: 67
Default export PKG_PATH

I logged in as root and wished to add the following line:

Code:
export PKG_PATH=http://my.preferred.mirror/pub/OpenBSD/`uname -a`/packages/`uname -m`/
and discovered there were actually TWO .profile files: one is .profile and the other is /.profile

Which .profile file should I use?
Reply With Quote
  #2   (View Single Post)  
Old 9th August 2015
Scarletts
-Guest-
 
Posts: n/a
Default

You should use pkg.conf(5).
Reply With Quote
  #3   (View Single Post)  
Old 9th August 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

The reason for dot files in the root partition is for error recovery. In the event a user logs in and the $HOME directory is not available -- file system not mounted, or other storage problems -- the system will assign the root directory as a temporary $HOME. With dot files there, it is possible to have a functional shell.
Reply With Quote
  #4   (View Single Post)  
Old 9th August 2015
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,319
Default

Unix lore tends to promote minimal customization of the root account in order to promote more actions in non-root accounts. Judging whether adding a single export statement constitutes "heavy" customization is a personal choice.

However, an alternative would be to add your export statement to your non-root ~/.profile, & execute pkg_add(1) through either sudo(1) (in OpenBSD versions prior to 5.8...), or doas(1) (introduced in OpenBSD 5.8...).
Reply With Quote
  #5   (View Single Post)  
Old 9th August 2015
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Quote:
Originally Posted by Scarletts View Post
You should use pkg.conf(5).
This. As a bonus, if you install the sets with bsd.rd over http, it gets filled in for you.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
can't setup PKG_PATH after install of 5.5 spermwhale_warrior OpenBSD Packages and Ports 10 26th August 2014 09:29 PM
What is the PKG_PATH for NetBSD 6.0.1 Binary Installs? haziz NetBSD General 9 19th March 2013 01:12 AM
"No package available in the PKG_PATH" error Nk2Network OpenBSD Packages and Ports 19 12th January 2009 09:22 PM


All times are GMT. The time now is 07:28 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick