Adding lines to dnsmasq.conf

Discussion in 'HyperWRT Firmware' started by turbo53, May 21, 2006.

  1. turbo53

    turbo53 Network Guru Member

    I've been using the NVRAM variable "dnsmasq_conf" to add a line to the dnsmasq configuration. Now I'm in a situation where I want to add another line and can't figure out how to do it. I've tried embedding "\n" in the string, but that doesn't work. It just creates one line in the configuration file with a "\n" in it.

    Looking at the source, it doesn't appear that the startup script will help either, since dnsmasq is started before the startup script is run.

    Anyone have any suggestions?

  2. tofu

    tofu Network Guru Member

    Try and see if using quotes work for you:

    nvram key="val1

    (press enter for each line)

    If the shell sees a quote, it should take in everything until it finds the closing quote, so pressing enter in between should insert \n as well.
  3. Thibor

    Thibor Super Moderator Staff Member Member

    good answer mate, was gonna say exactly the same thing. welcome back, btw
  4. turbo53

    turbo53 Network Guru Member

    Thanks. That did it.

    My inexperience with Linux or Unix comes home to roost. :)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice