summaryrefslogtreecommitdiff
blob: 0a9ec3a839bb57ae99382b8d10446274a3ceee53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

start() {
	if [[ -f /etc/hostname ]] ; then
		ewarn "You should stop using /etc/hostname and use /etc/conf.d/hostname"
		HOSTNAME="$(< /etc/hostname)"
	fi

	ebegin "Setting hostname to ${HOSTNAME}"
	hostname "${HOSTNAME}"
	eend $? "Failed to set the hostname"
}

# vim: ts=4 :