mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 22:11:59 -09:00
system: do not overwrite /bin/sh Busybox symlink
The BR2_SYSTEM_BIN_SH hidden option defines to what binary the /bin/sh
symlinks should point to. If busybox is chosen, then /bin/sh is created
to point to /bin/busybox.
This works fine with the default installation mode of Busybox, but it
fails with the upcoming "individual binaries" mode, in which each applet
is installed as its own binary, and /bin/busybox doesn't exist: we get
/bin/sh as a broken symlink to /bin/busybox.
Since Busybox already installs its own /bin/sh symlink, properly
pointing to /bin/ash or /bin/hush depending on the selected shell, it
doesn't make sense for the BR2_SYSTEM_BIN_SH logic to override
this. Just let Busybox install its own /bin/sh by making
BR2_SYSTEM_BIN_SH empty when Busybox shell is selected as /bin/sh.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(cherry picked from commit fc91501e6b)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
d09c7e4d45
commit
1244b18954
@@ -203,10 +203,12 @@ define SKELETON_BIN_SH
|
|||||||
rm -f $(TARGET_DIR)/bin/sh
|
rm -f $(TARGET_DIR)/bin/sh
|
||||||
endef
|
endef
|
||||||
else
|
else
|
||||||
|
ifneq ($(SKELETON_TARGET_GENERIC_BIN_SH),)
|
||||||
define SKELETON_BIN_SH
|
define SKELETON_BIN_SH
|
||||||
ln -sf $(SKELETON_TARGET_GENERIC_BIN_SH) $(TARGET_DIR)/bin/sh
|
ln -sf $(SKELETON_TARGET_GENERIC_BIN_SH) $(TARGET_DIR)/bin/sh
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
TARGET_FINALIZE_HOOKS += SKELETON_BIN_SH
|
TARGET_FINALIZE_HOOKS += SKELETON_BIN_SH
|
||||||
|
|
||||||
ifeq ($(BR2_TARGET_GENERIC_GETTY),y)
|
ifeq ($(BR2_TARGET_GENERIC_GETTY),y)
|
||||||
|
|||||||
@@ -298,7 +298,6 @@ endchoice # /bin/sh
|
|||||||
|
|
||||||
config BR2_SYSTEM_BIN_SH
|
config BR2_SYSTEM_BIN_SH
|
||||||
string
|
string
|
||||||
default "busybox" if BR2_SYSTEM_BIN_SH_BUSYBOX
|
|
||||||
default "bash" if BR2_SYSTEM_BIN_SH_BASH
|
default "bash" if BR2_SYSTEM_BIN_SH_BASH
|
||||||
default "dash" if BR2_SYSTEM_BIN_SH_DASH
|
default "dash" if BR2_SYSTEM_BIN_SH_DASH
|
||||||
default "mksh" if BR2_SYSTEM_BIN_SH_MKSH
|
default "mksh" if BR2_SYSTEM_BIN_SH_MKSH
|
||||||
|
|||||||
Reference in New Issue
Block a user