mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-03 12:29:31 +00:00
On cloud editions eg AWS settings may come from the network, so we need to move this to after network setup, while the Windows network config changes need to happen before, so split the init script. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
26 lines
770 B
Plaintext
Executable File
26 lines
770 B
Plaintext
Executable File
#!/sbin/openrc-run
|
|
|
|
description="Configuring settings from database."
|
|
|
|
depend() {
|
|
# AWS gets settings via network
|
|
need net
|
|
before docker
|
|
}
|
|
|
|
start() {
|
|
ebegin "Configuring host settings from database"
|
|
|
|
mobyconfig exists etc/sysctl.conf && mobyconfig get etc/sysctl.conf > /etc/sysctl.conf
|
|
mobyconfig exists etc/sysfs.conf && mobyconfig get etc/sysfs.conf > /etc/sysfs.conf
|
|
|
|
mobyconfig exists random-seed && mobyconfig get random-seed > /dev/urandom
|
|
|
|
mobyconfig exists etc/resolv.conf && mobyconfig get etc/resolv.conf > /etc/resolv.conf
|
|
mobyconfig exists etc/hosts && mobyconfig get etc/hosts >> /etc/hosts
|
|
|
|
mobyconfig exists etc/ssl/certs/ca-certificates.crt && mobyconfig get etc/ssl/certs/ca-certificates.crt >> /etc/ssl/certs/ca-certificates.crt
|
|
|
|
eend 0
|
|
}
|