summaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
authorChristian Heim <phreak@gentoo.org>2005-11-05 06:31:33 +0000
committerChristian Heim <phreak@gentoo.org>2005-11-05 06:31:33 +0000
commitc19e259b2b3334adde61c3db89774b9db41b8704 (patch)
treed6aa04fd4bd07e9bb83abae6d63f7cb9c7b82c2f /init.d
parentMerging changes from baselayout 1583 (diff)
downloadbaselayout-vserver-c19e259b2b3334adde61c3db89774b9db41b8704.tar.gz
baselayout-vserver-c19e259b2b3334adde61c3db89774b9db41b8704.tar.bz2
baselayout-vserver-c19e259b2b3334adde61c3db89774b9db41b8704.zip
Merging changes between baselayout r1583 and r1596.
svn path=/baselayout-vserver/trunk/; revision=64
Diffstat (limited to 'init.d')
-rwxr-xr-xinit.d/domainname5
-rwxr-xr-xinit.d/hostname7
2 files changed, 9 insertions, 3 deletions
diff --git a/init.d/domainname b/init.d/domainname
index 07bd4f7..619ad38 100755
--- a/init.d/domainname
+++ b/init.d/domainname
@@ -32,12 +32,15 @@ checkconfig_dns() {
}
start() {
+ # Ensure that we have a hostname binary or function
+ source /lib/rcscripts/net.modules.d/helpers.d/functions
+
local retval=0
local retval2=0
if checkconfig_nis ; then
ebegin "Setting NIS domainname to ${NISDOMAIN}"
- /bin/domainname "${NISDOMAIN}"
+ hostname -y "${NISDOMAIN}"
retval=$?
eend ${retval} "Failed to set the NIS domainname"
fi
diff --git a/init.d/hostname b/init.d/hostname
index 8efdf96..47c200a 100755
--- a/init.d/hostname
+++ b/init.d/hostname
@@ -3,7 +3,10 @@
# Distributed under the terms of the GNU General Public License v2
start() {
- local myhost=$(/bin/hostname 2>/dev/null)
+ # Ensure that we have a hostname binary or function
+ source /lib/rcscripts/net.modules.d/helpers.d/functions
+
+ local myhost=$(hostname 2>/dev/null)
local retval=0
# If the hostname is already set via the kernel, and /etc/hostname
@@ -20,7 +23,7 @@ start() {
fi
ebegin "Setting hostname to ${myhost}"
- /bin/hostname "${myhost}"
+ hostname "${myhost}"
retval=$?
eend ${retval} "Failed to set the hostname"