How to determine system is pfSense?

  • In ansible we're running into an issue where we need to distinguish between FreeBSD and pfSense (see What would be the best way to do this?

  • Netgate Administrator

    Not really my field but maybe:

    [2.4.3-RELEASE][]/root: sysctl kern.ident
    kern.ident: pfSense


    root@FreeBSD11:~ # sysctl kern.ident
    kern.ident: GENERIC


  • I would treat only "pfSense" as pfSense and everything else as FreeBSD because custom built FreeBSD is likely to have a custom kernel as well.

  • Would a uname -a give you what you want ?

    [2.4.3-RELEASE][]/root: uname -a
    FreeBSD 11.1-RELEASE-p10 FreeBSD 11.1-RELEASE-p10 #23 r313908+9347c667615(factory-RELENG_2_4): Thu May 10 15:09:29 CDT 2018  amd64

    Raspberry PI running FreeBSD:-

    $ uname -a
    FreeBSD sftp 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 14:27:25 UTC 2017  arm

  • Rebel Alliance Developer Netgate

    On modern pfSense installs, there are a number of ways. The uname data as already mentioned, the contents of /etc/platform, the presence of the pfSense pkg, and likely dozens/hundreds of other methods based on the presence of certain files around the filesystem specific to pfSense.

Log in to reply