Skip to contentSkip to conversation

Problem with disabling sysvinit service

sysvinit Lukasz Majewski 2 participants 3 messages Nov 13, 2016 – Nov 15, 2016

lore
Share & tools
lore
#0 lore raw

Dear All,

Maybe here I would find answer to question which puzzles me from some time.

The problem:

Disable syslog service on startup of sysvinit based board. (syslog is defined in e.g. /etc/rc5.d/S20syslog -> /etc/init.d/syslog)

Syslog on my setup is provided by busybox.

I was trying to find where 'update-rc.d ... syslog ...' is called in the poky (2.1.2) source tree but without any success.

Then, I've discovered that it is appended to INITSCRIPT_NAME variable and further processed by update-rc.d.bbclass

Is there any method/recipe which would allow just removing S20klogd symlink from /etc/rcX.d from the created rootfs?

The goal is to have syslog installed (in this case built into busybox), but disabled at boot up time.

Any help is more than welcome.

Tanks in advance,
Łukasz Majewski

#1 lore raw
Quoted 15 lines · Lukasz Majewski

Dear All,

Maybe here I would find answer to question which puzzles me from some time.

The problem:

Disable syslog service on startup of sysvinit based board. (syslog is defined in e.g. /etc/rc5.d/S20syslog -> /etc/init.d/syslog)

Syslog on my setup is provided by busybox.

I was trying to find where 'update-rc.d ... syslog ...' is called in the poky (2.1.2) source tree but without any success.

Quoted 8 lines

Then, I've discovered that it is appended to INITSCRIPT_NAME variable and further processed by update-rc.d.bbclass

Is there any method/recipe which would allow just removing S20klogd symlink from /etc/rcX.d from the created rootfs?

You should be able to modify (append) the busybox recipe to not create the symlinks in the first place. I'm not 100% sure what the correct line is but INITSCRIPT_PARAMS is the variable you want to modify. Maybe something like this?

INITSCRIPT_PARAMS_${PN}-syslog = "start 80 . stop 20 0 1 6 ."

(that should be the default except with all start runlevels removed)

- Jussi

Quoted 15 lines

The goal is to have syslog installed (in this case built into busybox), but disabled at boot up time.

Any help is more than welcome.

Tanks in advance,
Łukasz Majewski

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#2 lore raw

Hi Jussi,

Quoted 32 lines
Quoted 16 lines · Lukasz Majewski

Dear All,

Maybe here I would find answer to question which puzzles me from some time.

The problem:

Disable syslog service on startup of sysvinit based board. (syslog is defined in e.g. /etc/rc5.d/S20syslog -> /etc/init.d/syslog)

Syslog on my setup is provided by busybox.

I was trying to find where 'update-rc.d ... syslog ...' is called in the poky (2.1.2) source tree but without any success.

Quoted 8 lines

Then, I've discovered that it is appended to INITSCRIPT_NAME variable and further processed by update-rc.d.bbclass

Is there any method/recipe which would allow just removing S20klogd symlink from /etc/rcX.d from the created rootfs?

You should be able to modify (append) the busybox recipe to not create the symlinks in the first place. I'm not 100% sure what the correct line is but INITSCRIPT_PARAMS is the variable you want to modify. Maybe something like this?

Quoted 6 lines

INITSCRIPT_PARAMS_${PN}-syslog = "start 80 . stop 20 0 1 6 ."

(that should be the default except with all start runlevels removed)

- Jussi

Thanks for advice.

I've also thought about extending image.bbclass
to put function between do_rootfs and do_build.

In this way I could run update-rc.d in it.

Anyway, I will test your solution.

Thanks and best regards,
Łukasz Majewski

Quoted 17 lines
Quoted 17 lines

The goal is to have syslog installed (in this case built into busybox), but disabled at boot up time.

Any help is more than welcome.

Tanks in advance,
Łukasz Majewski

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto