# /usr/local/etc/pkg.conf



## balanga (Jun 13, 2021)

I'm trying figure out when /usr/local/etc/pkg.conf gets created... If for example you set up your own repository using /usr/local/etc/pkg/repos/my-repo.conf and you haven't yet run`pkg install xyz` should the command work?

Actually looking at /usr/local/etc/pkg.conf it suggests that the file is not really necessary, so what is it for? Just to override default settings?


----------



## Alain De Vos (Jun 13, 2021)

I think it gets created when you bootstrap pkg.


----------



## SirDice (Jun 13, 2021)

balanga said:


> I'm trying figure out when /usr/local/etc/pkg.conf gets created...


When you first install ports-mgmt/pkg. 


balanga said:


> If for example you set up your own repository using /usr/local/etc/pkg/repos/my-repo.conf and you haven't yet run`pkg install xyz` should the command work?


Yes, pkg(7) will bootstrap from a custom repository, then restart pkg(8) to run the install. Note the difference between pkg(7) and pkg(8).



balanga said:


> Just to override default settings?


Exactly.


----------



## balanga (Jun 13, 2021)

SirDice said:


> When you first install ports-mgmt/pkg.


 I noticed that the directories periodic/ and bash_completion.d/were added at the same time.


----------



## Alain De Vos (Jun 13, 2021)

It seems logical that you must have pkg installed for instance for periodic to be able to do a decent pkg audit.


----------



## memreflect (Jun 13, 2021)

Alain De Vos said:


> No, periodic is part of base.


You're right, but they are referring to the files in /usr/local/etc/:

```
$ pkg list pkg | grep /etc/
/usr/local/etc/bash_completion.d/_pkg.bash
/usr/local/etc/periodic/daily/411.pkg-backup
/usr/local/etc/periodic/daily/490.status-pkg-changes
/usr/local/etc/periodic/security/410.pkg-audit
/usr/local/etc/periodic/security/460.pkg-checksum
/usr/local/etc/periodic/weekly/400.status-pkg
/usr/local/etc/pkg.conf.sample
```


----------



## SirDice (Jun 13, 2021)

bash_completion.d gets created when you install shells/bash-completion. /usr/local/etc/periodic might get created by some other port too (any port could install some periodic(8) scripts, just like it could install rc(8) scripts).


----------



## Alain De Vos (Jun 13, 2021)

memreflect said:


> You're right, but they are referring to the files in /usr/local/etc/:
> 
> ```
> $ pkg list pkg | grep /etc/
> ...


You'r too fast. I didn't had time to correct my own error.


----------



## memreflect (Jun 13, 2021)

Alain De Vos said:


> You'r too fast. I didn't had time to correct my own error.


I did recently watch all of the "Fast and the Furious" movies, but I'm certain there is no correlation between that and the speed of my response.


----------

