[OE-core] [PATCH 2/3] busybox: move reboot out of init.cfg
Martin Jansa
martin.jansa at gmail.com
Thu Oct 11 08:47:26 UTC 2018
Does busybox's reboot work fine with recent systemd?
It stopped working for me and unfortunately u-a silently replaces
reboot -> ../bin/systemctl
symlink with
/sbin/reboot -> /bin/busybox.nosuid
In my images the busybox applets are unusable:
root at rpijama:~# reboot
root at rpijama:~# [ 2495.348099] systemd: 18 output lines suppressed due
to ratelimiting
[ 2495.380408] systemd[1]: systemd 239 running in system mode. (-PAM
-AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP
-GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN
-PCRE2 default-hierarchy=hybrid)
[ 2495.402735] systemd[1]: Detected architecture arm.
[ 2495.501328] systemd[1]: File
/lib/systemd/system/systemd-udevd.service:36 configures an IP firewall
(IPAddressDeny=any), but the local system does not support BPF/cgroup based
firewalling.
[ 2495.519048] systemd[1]: Proceeding WITHOUT firewalling in effect!
(This warning is only shown for the first loaded unit using IP firewalling.)
root at rpijama:~# halt
[ 2521.200058] systemd[1]: Received SIGUSR1 from PID 1062 (halt).
[ 2521.206062] systemd[1]: Trying to reconnect to bus...
and it doesn't reboot or halt.
You can update systemd to use u-a for those commands as well, that way
systemd version will win when both are enabled.
The same does apply for reboot, halt, poweroff:
symlinks provided by systemd:
lrwxrwxrwx 1 bitbake bitbake 16 Mar 9 2018 halt -> ../bin/systemctl
lrwxrwxrwx 1 bitbake bitbake 22 Mar 9 2018 init ->
../lib/systemd/systemd
lrwxrwxrwx 1 bitbake bitbake 16 Mar 9 2018 poweroff ->
../bin/systemctl
lrwxrwxrwx 1 bitbake bitbake 16 Mar 9 2018 reboot ->
../bin/systemctl
lrwxrwxrwx 1 bitbake bitbake 21 Mar 9 2018 resolvconf ->
../usr/bin/resolvectl
lrwxrwxrwx 1 bitbake bitbake 16 Mar 9 2018 runlevel ->
../bin/systemctl
lrwxrwxrwx 1 bitbake bitbake 16 Mar 9 2018 shutdown ->
../bin/systemctl
lrwxrwxrwx 1 bitbake bitbake 16 Mar 9 2018 telinit ->
../bin/systemctl
are silently overwritten by u-a symlinks pointing to busybox:
root at rpijama:~# ls -lah /sbin/halt /sbin/init /sbin/poweroff
/sbin/reboot /sbin/resolvconf /sbin/runlevel /sbin/shutdown /sbin/telinit
lrwxrwxrwx 1 root root 19 Mar 9 2018 /sbin/halt ->
/bin/busybox.nosuid
lrwxrwxrwx 1 root root 22 Mar 9 2018 /sbin/init ->
../lib/systemd/systemd
lrwxrwxrwx 1 root root 19 Mar 9 2018 /sbin/poweroff
-> /bin/busybox.nosuid
lrwxrwxrwx 1 root root 19 Mar 9 2018 /sbin/reboot ->
/bin/busybox.nosuid
lrwxrwxrwx 1 root root 21 Mar 9 2018 /sbin/resolvconf
-> ../usr/bin/resolvectl
lrwxrwxrwx 1 root root 16 Mar 9 2018 /sbin/runlevel
-> ../bin/systemctl
lrwxrwxrwx 1 root root 16 Mar 9 2018 /sbin/shutdown
-> ../bin/systemctl
Cheers,
On Thu, Oct 11, 2018 at 10:41 AM Anuj Mittal <anuj.mittal at intel.com> wrote:
> reboot is needed for initramfs where no init manager is set. This
> partially reverts:
>
> commit b6fbb3f3d4d6367b0fd7921078f67057551c7ede
> Author: Chen Qi <Qi.Chen at windriver.com>
> Date: Mon Jul 30 17:41:57 2018 +0800
>
> busybox: move init related configs to init.cfg
>
> Move init related configs to init.cfg.
>
> These config items do not make much sense unless busybox is selected
> as the init manager. They should belong to init.cfg.
>
> We would need to set up ALTERNATIVES for reboot in this case.
>
> Signed-off-by: Anuj Mittal <anuj.mittal at intel.com>
> ---
> meta/recipes-core/busybox/busybox/defconfig | 2 +-
> meta/recipes-core/busybox/busybox/init.cfg | 1 -
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/meta/recipes-core/busybox/busybox/defconfig
> b/meta/recipes-core/busybox/busybox/defconfig
> index f081f281cc..32213c0675 100644
> --- a/meta/recipes-core/busybox/busybox/defconfig
> +++ b/meta/recipes-core/busybox/busybox/defconfig
> @@ -480,7 +480,7 @@ CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y
> # CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set
> # CONFIG_HALT is not set
> # CONFIG_POWEROFF is not set
> -# CONFIG_REBOOT is not set
> +CONFIG_REBOOT=y
> # CONFIG_FEATURE_CALL_TELINIT is not set
> # CONFIG_TELINIT_PATH is not set
> # CONFIG_INIT is not set
> diff --git a/meta/recipes-core/busybox/busybox/init.cfg
> b/meta/recipes-core/busybox/busybox/init.cfg
> index 3c1fdd42b6..3b839c515c 100644
> --- a/meta/recipes-core/busybox/busybox/init.cfg
> +++ b/meta/recipes-core/busybox/busybox/init.cfg
> @@ -2,7 +2,6 @@ CONFIG_INIT=y
> CONFIG_FEATURE_USE_INITTAB=y
> CONFIG_HALT=y
> CONFIG_POWEROFF=y
> -CONFIG_REBOOT=y
> CONFIG_FEATURE_KILL_DELAY=0
> CONFIG_TELINIT_PATH=""
> CONFIG_INIT_TERMINAL_TYPE=""
> --
> 2.17.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20181011/fa85c49e/attachment-0002.html>
More information about the Openembedded-core
mailing list