Browse Source

rocknet: enhanced `nameserver` to handler more than one address each time

user/chris/0.1.0/grsecurity
Alejandro Mery 14 years ago
parent
commit
3a6b7be61a
  1. 9
      network/rocknet/rocknet_dns.sh

9
network/rocknet/rocknet_dns.sh

@ -2,6 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../rocknet/rocknet_dns.sh
# Copyright (C) 2010 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
@ -14,12 +15,15 @@
dns_init() {
if isfirst "dns"; then
addcode up 4 1 "echo -n "" > /etc/resolv.conf"
addcode up 4 1 "cat /dev/null > /etc/resolv.conf"
fi
}
public_nameserver() {
addcode up 4 5 "echo nameserver $1 >> /etc/resolv.conf"
local x=
for x; do
addcode up 4 5 "echo nameserver $x >> /etc/resolv.conf"
done
dns_init
}
@ -41,4 +45,3 @@ public_domainname() {
# THIS IS (still) A HACK
addcode up 9 5 "sed -i 's/`hostname`\..* /`hostname`.$1 /' /etc/hosts"
}

Loading…
Cancel
Save