Code: Select all
depend() {
keyword -docker -lxc -prefix -systemd-nspawn
}
Code: Select all
depend() {
keyword -docker -lxc -prefix -systemd-nspawn
}
Code: Select all
keyword Tags a service with a keyword. These are the keywords we
currently understand:
-shutdown
Don't stop this service when shutting the system
down. This is normally quite safe as remaining
daemons will be sent a SIGTERM just before final
shutdown. Network related services such as the
network and dhcpcd init scripts normally have
this keyword.
-stop Don't stop this service when changing runlevels,
even if not present. This includes shutting the
system down.
-timeout
Other services should wait indefinitely for this
service to start. Use this keyword if your ser-
vice may take longer than 60 seconds to start.
-jail When in a jail, exclude this service from any
dependencies. The service can still be run
directly. Set via rc sys in /etc/rc.conf
- ------------
-lxc Same as -jail, but for Linux Resource Containers
(LXC).
-openvz
Same as -jail, but for OpenVZ systems.
-prefix
Same as -jail, but for Prefix systems.
-rkt Same as -jail, but for RKT systems.
-uml Same as -jail, but for UML systems.
-vserver
Same as -jail, but for VServer systems.
-xen0 Same as -jail, but for Xen DOM0 systems.
-xenu Same as -jail, but for Xen DOMU systems.
-docker
Same as -jail, but for docker systems.
-containers
Same as -jail, but for all relevant container
types on the operating system.
I also face this issue. I don't understand the reason why the hostname init script is excluded on lxc guests. ¯\_(ツ)_/¯CyberMuz wrote:Tnx. I still don't understand why hostname script is not executed on boot inside lxc if "-lxc" flag is set. I have explicitly set it in 'default' runlevel but it doesn't start. It's not even listed in rc-status output. I expected that will get started since it's started directly and not as a dependency.
I can start it manually (/etc/init.d/hostname start) and it correctly sets the hostname. Without -lxc flag it starts on boot and is listed in rc-status output.