mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-01-17 15:48:56 +00:00
23 lines
582 B
Plaintext
Executable File
23 lines
582 B
Plaintext
Executable File
#!/sbin/openrc-run
|
|
|
|
description="Configuring settings from database."
|
|
|
|
depend() {
|
|
need 9pinit
|
|
before hostname sysctl
|
|
}
|
|
|
|
start() {
|
|
cat /proc/cmdline | grep -q 'com.docker.database' || exit 0
|
|
|
|
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
|
|
|
|
eend 0
|
|
}
|