1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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?

    Thanks.
     
  2. tofu

    tofu Network Guru Member

    Try and see if using quotes work for you:

    nvram key="val1
    val2
    val3"

    (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. :)
     

Share This Page