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

    Change file using shell, how?

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 3 Posters 2.4k 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.
    • -flo- 0-
      -flo- 0
      last edited by

      Hi there,

      I’m having trouble getting changes into a file /var/etc/syslog.conf in a nano installation (2.2.5, upgraded today from 2.2.2 using auto upgrade).

      Here is what I do:

      /etc/rc.conf_mount_rw
      vi /var/etc/syslog.conf
      /etc/rc.conf_mount_ro
      

      The file shows up changed if I open it in vi again. However after reboot all my changes are gone. :(

      I already changed this file a long time ago trying to get a syslog host configured. This was on pfSense 2.2.2 or even earlier. But I can’t for the life of me remember what I did to edit this file. This cannot have been much of a challenge back then otherwise I would have created notes on that.

      Any help please?

      -flo-

      1 Reply Last reply Reply Quote 0
      • -flo- 0-
        -flo- 0
        last edited by

        I also tried to change the file using "Edit File" in Diagnostics btw. I did feel rather clumsy in comparison to having shell and vi at my command.  8)

        Anyway this did not work either.  :-\

        -flo-

        1 Reply Last reply Reply Quote 0
        • D
          David_W
          last edited by

          The configuration files in /var are rebuilt from the configuration XML - they're not designed to be edited manually.

          Is there no way to make your change in the web user interface?

          1 Reply Last reply Reply Quote 0
          • -flo- 0-
            -flo- 0
            last edited by

            I added a syslog server to /var/etc/syslog.conf which I want to remove now. If this file would be overwritten completely from the config then these settings should just disappear which unfortunately they don't.

            Also I know of no way to set / overwrite syslog settings in the UI. Do you? This would be most convenient.

            Of course I can make a fresh install but I would like to avoid this.

            -flo-

            1 Reply Last reply Reply Quote 0
            • D
              doktornotor Banned
              last edited by

              I have no idea how you changed that file long time ago, considering it's regenerated on every reboot with system_syslogd_start() - see system.inc. Just delete it and run that function from Diagnostics - Command Prompt.

              1 Reply Last reply Reply Quote 0
              • -flo- 0-
                -flo- 0
                last edited by

                This worked, thank you!! No clue what was wrong here.

                -flo-

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