Prevent unnecessary installation of bash if bash. Same goes for dash.
parent
08d924f6a8
commit
e89bf85757
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue