Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How to determine system is pfSense?

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 5 Posters 683 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      opoplawski
      last edited by

      In ansible we're running into an issue where we need to distinguish between FreeBSD and pfSense (see https://github.com/ansible/ansible/issues/41970). What would be the best way to do this?

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        Not really my field but maybe:

        [2.4.3-RELEASE][admin@pfsense.fire.box]/root: sysctl kern.ident
        kern.ident: pfSense
        

        vs

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

        Steve

        K 1 Reply Last reply Reply Quote 0
        • K
          kpa @stephenw10
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • NogBadTheBadN
            NogBadTheBad
            last edited by NogBadTheBad

            Would a uname -a give you what you want ?

            [2.4.3-RELEASE][admin@pfsense.xxxxxxxxxx.net]/root: uname -a
            FreeBSD pfsense.xxxxxxxxxx.net 11.1-RELEASE-p10 FreeBSD 11.1-RELEASE-p10 #23 r313908+9347c667615(factory-RELENG_2_4): Thu May 10 15:09:29 CDT 2018     root@buildbot2.netgate.com:/xbuilder/crossbuild-243/pfSense/tmp/obj/xbuilder/crossbuild-243/pfSense/tmp/FreeBSD-src/sys/pfSense  amd64
            [2.4.3-RELEASE][admin@pfsense.xxxxxxxxxx.net]/root:
            

            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     root@releng2.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/RPI2  arm
            $
            

            Andy

            1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

            1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              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.

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.