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

    Diagnostic->File editor strange behavior

    Scheduled Pinned Locked Moved 2.0-RC Snapshot Feedback and Problems - RETIRED
    5 Posts 2 Posters 1.7k 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.
    • J
      jjstecchino
      last edited by

      I have been playing around a bit with my pfsense box and had the need to edit some of the system files.
      In particular I was using the file editor in the web interface to edit loader.conf. At next reboot none of my settings were used and I saw no error displayed. I thought I made a mistake and I saved an empty loader.conf.

      I opened the file in vi and I found all my settings there with a ^M appended at the end. If I remember correctly ^M is used to represent ASCII 0Dh (Windows CR). Interestingly having a CR at the end of the line rather than just LF was enough to invalidate the line by the loader, however without displaying a parsing error.
      Once the ^M were deleted in vi and the file saved it worked as supposed.
      I dont know if the editor can be set to just use LF rather than LF+CR to avoid the problem.

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

        IIRC, the browser itself is sending the ^M (if you edited it on Linux/Mac it probably wouldn't be there). Though it should be possible to code around that.

        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
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          What browser are you using? I can't reproduce this in Firefox.

          Looks like IE does this.

          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
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            Should be fixed in new snapshots:

            https://rcs.pfsense.org/projects/pfsense/repos/mainline/commits/1fa00d6d70b9891c89c76edd6ff6be4bb8968b9e

            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
            • J
              jjstecchino
              last edited by

              @jimp:

              What browser are you using? I can't reproduce this in Firefox.

              Looks like IE does this.

              Surely I was editing with ie 8 on win7

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