mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-29 05:12:18 +01:00
19 lines
256 B
Plaintext
19 lines
256 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="localhost"
|
|
fi
|
|
ebegin "Setting hostname"
|
|
hostname $opts
|
|
eend $?
|
|
}
|