diff options
author | maximilian attems <maks@debian.org> | 2013-09-12 15:02:28 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2013-09-12 15:19:49 +0200 |
commit | 9c823ad2b3284a6bd5cfbdfdd699d3e033cadd3f (patch) | |
tree | 8377617422e5085732d5f68391bc1f6662dee70a /mkinitramfs | |
parent | 6f0396a8f5b557cc584eeefa0a777b1358961dcf (diff) |
mkinitramfs: check if initramfs has a shell
If no shell is found in the initramfs copy over the system
default shell.
See: #707040
Suggested-by: Ben Love <blove+debianbugs@kylimar.com>
Reviewed-by: Michael Prokop <mika@debian.org>
Signed-off-by: maximilian attems <maks@debian.org>
Diffstat (limited to 'mkinitramfs')
-rwxr-xr-x | mkinitramfs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mkinitramfs b/mkinitramfs index cdec420..7fd4cd6 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -317,6 +317,11 @@ if [ -e "${CONFDIR}/DSDT.aml" ]; then copy_exec "${CONFDIR}/DSDT.aml" / fi +# Make sure there is a final sh in initramfs +if [ ! -e "${DESTDIR}/bin/sh" ]; then + copy_exec /bin/sh "${DESTDIR}/bin/" +fi + # Remove any looping or broken symbolic links, since they break cpio. [ "${verbose}" = y ] && xargs_verbose="-t" (cd "${DESTDIR}" && find . -type l -printf '%p %Y\n' | sed -n 's/ [LN]$//p' \ |