add mksh support

master
tpgxyz 2018-12-14 00:39:15 +01:00 committed by Harald Hoyer
parent 64082786b2
commit 519186e9e6
2 changed files with 24 additions and 0 deletions

View File

@ -222,6 +222,9 @@ rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00bootchart
# we do not support dash in the initramfs
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00dash

# we do not support mksh in the initramfs
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00mksh

# remove gentoo specific modules
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/50gensplash


View File

@ -0,0 +1,21 @@
#!/bin/bash

# called by dracut
check() {
require_binaries /bin/mksh
}

# called by dracut
depends() {
return 0
}

# called by dracut
install() {
# If another shell is already installed, do not use mksh
[[ -x $initdir/bin/sh ]] && return

# Prefer mksh as /bin/sh if it is available.
inst /bin/mksh && ln -sf mksh "${initdir}/bin/sh"
}