|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|
|||
How do I edit my .profile to permanently have an ftp site to point to
$ export PKG_PATH=ftp://your.ftp.mirror/pub/OpenBSD/4.5/packages/machine/
It's usually a good idea to add a line similar to the above examples to your ~/.profile. As with the classic PATH variable, you can specify multiple locations, separated by colons. Please How do I edit my . profile to have that permanently? Currently this is what I when I view the .profile file. # $OpenBSD: dot.profile,v 1.5 2005/03/30 21:18:33 millert Exp $ # # sh/ksh initialization PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin export PATH : ${HOME='/root'} export HOME umask 022 if [ -x /usr/bin/tset ]; then eval `/usr/bin/tset -sQ \?$TERM` fi ~ ~ ~ |
|
|||
thanks. will that allow it to be available the next time the system boots up?
|
|
|||
okay yeah it does. tnx
|
|
|||
Okay actually that just put it in to the /.profile file which i could also done with vi. the question is where within the lines do i put that? because even after i do a
$ echo "export PKG_PATH=........" >> .profile it still says No packages available in the PKG_PATH |
|
|||
Quote:
~/.profile is only a text file. However, when logging into your account ~/.profile is read to initialize your shell environment. To have changes in ~/.profile be read by the running shell, you must "source" the file, ie. $ . ~/.profile As for where to put such lines, convention is to be put lines like this at the very bottom of the file. For more information, study the ksh(1) manpage (or whatever shell you are using...). You might also benefit from going to a library & checking out an introductory text on Unix. Most beginning Unix texts cover issues like this. Last edited by ocicat; 18th July 2009 at 08:07 PM. |
|
|||
This also is shown in the uploaded image.
It is unclear if you are thinking that pkg_info(1) is used to install packages. It is not. The application used to add packages is pkg_add(1), however, you need to ensure that PKG_PATH is correct set & accessible first. Studying Section 15.2 of the FAQ would be worth your time as it discusses these issues: http://openbsd.org/faq/faq15.html#PkgMgmt |
|
|||
Quote:
after i used the echo PKG_PATH this is what i got # $OpenBSD: dot.profile,v 1.5 2005/03/30 21:18:33 millert Exp $ # # sh/ksh initialization PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin export PATH : ${HOME='/root'} export HOME umask 022 if [ -x /usr/bin/tset ]; then eval `/usr/bin/tset -sQ \?$TERM` fi export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/4.5/packages/i386/ ~ ~ ~ it just added the line after fi which is the bottom of the file as ocicat has said but it still does not find the package. ps: i am wondering if i am editing the wrong file. i am editing the .profile file found in root directory (i.e. "/" not "/root") |
|
|||
The output provided appears to be a screenshot of your vi window. Just so we are all on the same page, post the output of the following command:
$ cat .profile Quote:
|
|
|||
Quote:
the output of cat .profile is on the attached image (profile pic) |
|
||||
I'll ask, once more, for the output of
$ echo $PKG_PATHYour screen shot doesn't show the environment variable. Still. All it has done is confirmed you are editing /root/.profile instead of /.profile or a normal user's $HOME/.profile. Regarding root, please see the afterboot(8) man page: # man afterboot |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wireless NIC for access point | dewarrn1 | FreeBSD General | 1 | 15th September 2009 11:01 PM |
Routing between site-to-site tunnels | docrice | OpenBSD General | 5 | 26th September 2008 09:21 AM |
Point-to-Point VPN + Firewall + Router (sorta) - What should I use? | Bruco | FreeBSD General | 6 | 5th July 2008 11:09 PM |
Permanently Change Default sound device. | shep | FreeBSD General | 5 | 14th June 2008 05:58 PM |
Bare Minimum Site-to-Site VPN on OpenBSD | ai-danno | Guides | 0 | 20th May 2008 12:45 AM |