Список известных переменных окружения? [закрыто]

Хорошо, решение найдено.

Мой /etc/rc.conf и так хорош...

Файл /etc/pf.conf должен быть

# cat /etc/pf.conf

ext_if="em0"
int_if="em1"
boxnet = $int_if:network
homenet = $ext_if:network

nat on $ext_if from $boxnet to any -> ($ext_if)
pass quick from { lo0, $boxnet, $homenet } to any keep state

Вероятно, слишком много переменных, я мог бы просто использовать оригинальный em0/em1 . В любом случае, это дает вам -

[root@bsdtest ~]# pfctl -vnf /etc/pf.conf
ext_if = "em0"
int_if = "em1"
icmp_types = "echoreq"
boxnet = "em1:network"
homenet = "em0:network"
nat on em0:network inet from 10.9.9.0/24 to any -> 192.168.1.0/24
nat on em1:network inet from 192.168.1.0/24 to any -> 10.9.9.0/24
pass quick inet from 127.0.0.0/8 to any flags S/SA keep state
pass quick inet from 192.168.1.0/24 to any flags S/SA keep state
0
10.05.2018, 19:09
1 ответ

Ver también:¿De dónde vienen las variables de entorno EDITOR, PAGER, BROWSER?

EDITOR and PAGER are mentioned in the standards as belonging to variables you'd be unwise to conflict with since they are widely used [...] Various programs respect various combinations of them [...]

The BROWSER variable is not in the same league as EDITOR or PAGER - it is not mentioned by the standards. However, some programs may use them.

En mi opinión, podría ser mejor considerar variables para la GUI , ya que no se usa comúnmente, a menos que tenga un caso de uso específico en mente. La razón es que el usuario habrá configurado sus preferencias en su escritorio gráfico a través del sistema MIME.

Por ejemplo, la aplicación Configuración de Gnome le permite elegir un navegador, pero no establece la variable de entorno $BROWSER.

En este caso, podría intentar usar xdg-openen su lugar.

(xdg -open aparentemente tiene algunos casos especiales -, p. para volver al NAVEGADOR.https://utcc.utoronto.ca/~cks/space/blog/linux/XdgOpenWhichBrowserPero eso probablemente significa que si quieres un navegador, también podrías usar xdg -abierto y dejar que maneje las cosas por ti ).

3
28.01.2020, 02:23

Теги

Похожие вопросы