Re: Get ${OSREL} at install time
- Reply: Felix Palmen : "Re: Get ${OSREL} at install time"
- In reply to: Felix Palmen : "Re: Get ${OSREL} at install time"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 18 Apr 2023 09:41:15 UTC
18.04.2023 16:34, Felix Palmen wrote: > * 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. Even better, we have freebsd-version -u