pc_delete "dhcp-option=dnsf5" $CONFIG
pc_delete "dhcp-option=dnsf6" $CONFIG
pc_append "dhcp-script=/jffs/scripts/log-dhcp.sh" $CONFIG
pc_append "neg-ttl=3600" $CONFIG
pc_delete "no-negcache" $CONFIG
pc_delete "servers-file=/tmp/resolv.dnsmasq" $CONFIG
I'm not sure I follow exactly what it is you're doing, but the helper functions are just human-friendly wrappers for sed. So use sed directly:
sed -i "/$PATTERN/a$CONTENT" $CONFIG
You just have to be careful if $PATTERN or $CONTENT might contain any non-alphanumeric characters.
You could directly use sed.
You could also just reuse the pc_insert() code from 384.9
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!