Re: Get ${OSREL} at install time
- Reply: Eugene Grosbein : "Re: Get ${OSREL} at install time"
- In reply to: Eugene Grosbein : "Re: Get ${OSREL} at install time"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 18 Apr 2023 09:34:13 UTC
* Eugene Grosbein <eugen@grosbein.net> [20230418 16:26]: > 18.04.2023 15:05, Nuno Teixeira wrote: > > Any sugestion or example that permits to get OSREL at install time? > > # osrel=$(sysctl -n kern.osrelease) Obtaining the information from the running kernel has the drawback of possibly giving wrong results with pkg -c / pkg -r (installing in an alternative root, e.g. a jail or boot environment). Therefore, parsing /etc/os-release should be preferred. -- Felix Palmen <zirias@FreeBSD.org> {private} felix@palmen-it.de -- ports committer (mentee) -- {web} http://palmen-it.de {pgp public key} http://palmen-it.de/pub.txt {pgp fingerprint} 6936 13D5 5BBF 4837 B212 3ACC 54AD E006 9879 F231