mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-13 16:06:59 +02:00
overlay coreos/config: Move modprobe and others back to sbin
This commit is contained in:
parent
8a4e806555
commit
98412b4b16
20
sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-apps/kmod
vendored
Normal file
20
sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-apps/kmod
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
# sbin and bin are still separate directories and the build system of
|
||||
# kmod puts the tool symlinks into bin, whereas most places that use
|
||||
# absolute paths to the tools expect them to be in sbin. Move them
|
||||
# there. This can be removed if we merge bin and sbin directories
|
||||
# (likely to happen when we migrate to 23.0 profiles).
|
||||
cros_post_src_install_move_kmod_tools_symlinks() {
|
||||
local kmod tool
|
||||
|
||||
# path to kmod relative to sbin
|
||||
if [[ -x "${ED}/usr/sbin/kmod" ]]; then
|
||||
kmod=kmod
|
||||
else
|
||||
kmod=../bin/kmod
|
||||
fi
|
||||
mkdir -p "${ED}/usr/sbin"
|
||||
for tool in modprobe rmmod insmod depmod; do
|
||||
rm -f "${ED}/usr/bin/${tool}" "${ED}/bin/${tool}"
|
||||
ln -sf "${kmod}" "${ED}/usr/sbin/${tool}"
|
||||
done
|
||||
}
|
Loading…
Reference in New Issue
Block a user