Browse Source

a hostname and domainname tag for ROCK Net (both for rare use - kinda hacky)

git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1975 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Rene Rebe 22 years ago
parent
commit
8d2c787c05
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      package/base/sysfiles/rocknet_modules_dns.sh

+ 10
- 0
package/base/sysfiles/rocknet_modules_dns.sh

@ -20,3 +20,13 @@ public_search() {
dns_init dns_init
} }
public_hostname() {
addcode up 9 5 "hostname $1"
}
public_domainname() {
# THIS IS A HACK
addcode up 9 5 "sed 's/`hostname`\..* /`hostname`.$1 /' /etc/hosts > \
/etc/hosts.new ; mv /etc/hosts{.new,}"
}

Loading…
Cancel
Save