mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-17 06:32:36 +01:00
19 lines
269 B
Plaintext
19 lines
269 B
Plaintext
#!/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="${hostname:-localhost}"
|
|
fi
|
|
ebegin "Setting hostname"
|
|
hostname $opts
|
|
eend $?
|
|
}
|