aboutsummaryrefslogblamecommitdiffstats
path: root/main/openrc/hostname.initd
blob: 995e4b95d834b593ba61281250d94421f0e82507 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                               
#!/sbin/runscript

description="Sets the hostname of the machine."

depend() {
	keyword noprefix
}

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