From: Andreas Thienemann Date: Tue, 26 May 2009 16:06:56 +0000 (+0200) Subject: Prevent unnecessary installation of bash if bash. Same goes for dash. X-Git-Tag: 0.1~169 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e89bf8575742c6ab5db90426ceb1e6757629ca61;p=thirdparty%2Fdracut.git Prevent unnecessary installation of bash if bash. Same goes for dash. --- diff --git a/modules.d/00dash/install b/modules.d/00dash/install index 5bf7ae649..0b344cad2 100755 --- a/modules.d/00dash/install +++ b/modules.d/00dash/install @@ -1,3 +1,6 @@ #!/bin/bash +# If another shell is already installed, do not use dash +[ -x "${initdir}/bin/sh" ] && return + # Prefer dash as /bin/sh if it is available. inst /bin/dash && ln -sf dash "${initdir}/bin/sh" diff --git a/modules.d/99base/install b/modules.d/99base/install index ce1e2f92c..a99f6abf2 100755 --- a/modules.d/99base/install +++ b/modules.d/99base/install @@ -1,6 +1,9 @@ #!/bin/bash -dracut_install mount mknod mkdir modprobe pidof sleep chroot echo sed bash ls flock -[ -e "${initdir}/bin/sh" ] || (ln -s bash "${initdir}/bin/sh" || :) +dracut_install mount mknod mkdir modprobe pidof sleep chroot echo sed ls flock +if [ ! -e "${initdir}/bin/sh" ]; then + dracut_install bash + (ln -s bash "${initdir}/bin/sh" || :) +fi # install our scripts and hooks inst "$moddir/init" "/init" # Bail out if switch_root does not exist