# 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
--- /dev/null
+#!/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"
+}
+