#!/sbin/openrc-run

description="Sets the hostname of the machine."

depend() {
	keyword -prefix -lxc
}

start() {
	if [ -s /etc/hostname ] ; then
		opts="-F /etc/hostname"
	else
		opts="localhost"
	fi
	ebegin "Setting hostname"
	hostname $opts
	eend $?
}