docker: Fix and update sysvinit script
PATCH 1/1 docker: Fix and update sysvinit script
From: Jan Kiszka <[email protected]>
Fix daemonization, align args with docker.service, fix line breaks in log file - and fix INITSCRIPT_PARAMS (there is no variable OS_DEFAULT_INITSCRIPT_PARAMS).
Signed-off-by Jan Kiszka <[email protected]>
--- recipes-containers/docker/docker_git.bb | 2 +- recipes-containers/docker/files/docker.init | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-)
recipes-containers/docker/docker_git.bb +1 -1
@@ -116,7 +116,7 @@ SYSTEMD_AUTO_ENABLE_${PN} = "enable" INITSCRIPT_PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${PN}','',d)}" INITSCRIPT_NAME_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','docker.init','',d)}" -INITSCRIPT_PARAMS_${PN} = "${OS_DEFAULT_INITSCRIPT_PARAMS}" +INITSCRIPT_PARAMS_${PN} = "defaults" do_install() { mkdir -p ${D}/${bindir}
recipes-containers/docker/files/docker.init +3 -2
@@ -28,6 +28,7 @@ exec="/usr/bin/$prog" pidfile="/var/run/$prog.pid" lockfile="/var/lock/subsys/$prog" logfile="/var/log/$prog" +other_args="--registry-mirror=http://localhost:5000 --insecure-registry=http://localhost:5000 --raw-logs" [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
@@ -38,8 +39,8 @@ start() { if ! [ -f $pidfile ]; then printf "Starting $prog:\t" - echo "\n$(date)\n" >> $logfile - "$unshare" -m -- $exec -d $other_args &>> $logfile & + echo -e "\n$(date)\n" >> $logfile + "$unshare" -m -- $exec daemon $other_args &>> $logfile & pid=$! touch $lockfile # wait up to 10 seconds for the pidfile to exist. see
Signature · 1 line
2.12.3