mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 12:50:22 +02:00
docker: Fix and update sysvinit script
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 <jan.kiszka@siemens.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
This commit is contained in:
parent
be934f72d2
commit
de50b56087
|
@ -122,7 +122,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}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user