Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

printf not installed #1530

Closed
jpalus opened this issue Jun 8, 2021 · 3 comments · Fixed by #1534
Closed

printf not installed #1530

jpalus opened this issue Jun 8, 2021 · 3 comments · Fixed by #1534
Labels
bug Our bugs

Comments

@jpalus
Copy link

jpalus commented Jun 8, 2021

Describe the bug
Multiple errors about missing printf are logged during boot when /bin/sh points to mksh

Distribution used
PLD

Dracut version
055

Init system
systemd

To Reproduce
Generate image with /bin/sh -> mksh

Expected behavior
All messages are logged correctly.

Additional context
printf is not a builtin in mksh (at least does not seem to be by default) and printf binary is not installed.

@jpalus jpalus added the bug Our bugs label Jun 8, 2021
pld-gitsync pushed a commit to pld-linux/dracut that referenced this issue Jun 9, 2021
workaround for missing builtin in mksh see:
dracutdevs/dracut#1530
@jpalus
Copy link
Author

jpalus commented Jun 9, 2021

Perhaps a sanity check could be added like:

PATH= ./bin/sh -c 'printf test' > /dev/null 2> /dev/null || inst printf

@tpgxyz
Copy link
Contributor

tpgxyz commented Jun 11, 2021

Good catch. Looks like mksh by default disables use of builtin printf
USE_PRINTF_BUILTIN?= 0
https://github.com/MirBSD/mksh/blob/4a59132d5fa2193f59345855d89aae72f062f100/Makefile#L73

@jpalus
Copy link
Author

jpalus commented Jun 29, 2021

Note that #1534 does not fix this issue as mentioned in PR's discussion.

FGrose added a commit to FGrose/dracut that referenced this issue May 28, 2023
If one of the supported shells is not in the add modules list,
use the realpath of /bin/sh, if it passes check_module. Otherwise,
use one of the supported shells. Fail if none of them passes.

This scheme assures that implicitly installed command shells pass
through their module-setup.sh with all their dependencies.

Completes fix to dracutdevs#1530 augmenting dracutdevs#1534.
FGrose added a commit to FGrose/dracut that referenced this issue May 28, 2023
If one of the supported shells is not in the add modules list,
use the realpath of /bin/sh, if it passes check_module. Otherwise,
use one of the supported shells. Fail if none of them passes.

This scheme assures that implicitly installed command shells pass
through their module-setup.sh with all their dependencies.

Completes fix to dracutdevs#1530 augmenting dracutdevs#1534.
FGrose added a commit to FGrose/dracut that referenced this issue May 28, 2023
If one of the supported shells is not in the add modules list,
use the realpath of /bin/sh, if it passes check_module. Otherwise,
use one of the supported shells. Fail if none of them passes.

This scheme assures that implicitly installed command shells pass
through their module-setup.sh with all their dependencies.

Completes fix to dracutdevs#1530 augmenting dracutdevs#1534.
FGrose added a commit to FGrose/dracut that referenced this issue May 29, 2023
If one of the supported shells is not in the add modules list,
use the realpath of /bin/sh, if it passes check_module. Otherwise,
use one of the supported shells. Fail if none of them passes.

This scheme assures that implicitly installed command shells pass
through their module-setup.sh with all their dependencies.

Completes fix to dracutdevs#1530 augmenting dracutdevs#1534.
FGrose added a commit to FGrose/dracut that referenced this issue Jun 1, 2023
If one of the supported shells is not in the add modules list,
use the realpath of /bin/sh, if it passes check_module. Otherwise,
use one of the supported shells. Fail if none of them passes.

This scheme assures that implicitly installed command shells pass
through their module-setup.sh with all their dependencies.

Completes fix to dracutdevs#1530 augmenting dracutdevs#1534.
FGrose added a commit to FGrose/dracut that referenced this issue Jun 1, 2023
If one of the supported shells is not in the add modules list,
use the realpath of /bin/sh, if it passes check_module. Otherwise,
use one of the supported shells. Fail if none of them passes.

This scheme assures that implicitly installed command shells pass
through their module-setup.sh with all their dependencies.

Completes fix to dracutdevs#1530 augmenting dracutdevs#1534.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Our bugs
Projects
None yet
2 participants