hostname in database moved to etc/

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2016-01-25 11:33:27 +00:00
parent e1e1809717
commit 70813a1d64

View File

@ -11,8 +11,10 @@ start() {
if cat /proc/cmdline | grep -q 'com.docker.database'
then
DATABASE="$(cat /proc/cmdline | sed -e 's/.*com.docker.database="//' -e 's/".*//')"
HOSTFILE="/Database/branch/master/ro/${DATABASE}/hostname"
HOSTFILE="/Database/branch/master/ro/${DATABASE}/etc/hostname"
[ -s ${HOSTFILE} ] && opts="-F ${HOSTFILE}"
else
[ -s /etc/hostname ] && opts="-F /etc/hostname"
fi
ebegin "Setting hostname"
hostname $opts