mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 02:21:34 +00:00
use config tool for host settings
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
1d1626e449
commit
cff0230cbb
@ -3,20 +3,14 @@
|
||||
description="Configuring settings from database."
|
||||
|
||||
depend() {
|
||||
need 9pinit
|
||||
before hostname sysctl
|
||||
}
|
||||
|
||||
start() {
|
||||
cat /proc/cmdline | grep -q 'com.docker.database' || exit 0
|
||||
ebegin "Configuring host settings from database"
|
||||
|
||||
ebegin "Configuring settings from database"
|
||||
|
||||
DATABASE="$(cat /proc/cmdline | sed -e 's/.*com.docker.database="//' -e 's/".*//')"
|
||||
HOSTFILE="/Database/branch/master/ro/${DATABASE}/etc/hostname"
|
||||
[ -s ${HOSTFILE} ] && cp ${HOSTFILE} /etc/hostname
|
||||
SYSCTL="/Database/branch/master/ro/${DATABASE}/etc/sysctl.conf"
|
||||
[ -s ${SYSCTL} ] && cp ${SYSCTL} /etc/sysctl.conf
|
||||
mobyconfig exists etc/hostname && echo $(mobyconfig get etc/hostname) > /etc/hostname
|
||||
mobyconfig exists etc/sysctl.conf && echo $(mobyconfig get etc/sysctl.conf) > /etc/sysctl.conf
|
||||
|
||||
eend 0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user