summaryrefslogtreecommitdiff
path: root/mkinitramfs
diff options
context:
space:
mode:
Diffstat (limited to 'mkinitramfs')
-rwxr-xr-xmkinitramfs21
1 files changed, 15 insertions, 6 deletions
diff --git a/mkinitramfs b/mkinitramfs
index 52e0165..5d35386 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -36,7 +36,7 @@ function resolve_bins {
local args=${@}
for i in ${args[@]}; do
- local path=$(which ${i} 2>/dev/null)
+ local path=$(type -p ${i} 2>/dev/null)
if [[ $? -gt 0 ]]; then
echo "Could not find binary ${i}. Is it installed?"
@@ -114,7 +114,7 @@ function mkcpio {
#
# Sets up cache dir for later writing to an archive (via cpio).
-# Performs simple operations like creating a basic directory structure,
+# Performs simple operations like creating a basic directory structure,
#
# @param cache Path to the cache directory. Will be created if not exists
#
@@ -203,10 +203,15 @@ function main {
fi
# List of binaries to exist in the new initramfs
- resolve_bins \
- bash cat echo ls cryptsetup chmod chown mount sleep umount clear cut \
- grep less tr which blkid partprobe reboot shutdown switch_root modprobe \
- rmmod
+ # Standard shell binaries
+ resolve_bins bash cat pidof ps ls clear cut grep less blkid switch_root kill
+ # Module management
+ resolve_bins udevadm udevd modprobe rmmod
+ # For encrypted and block device support
+ resolve_bins partprobe dmsetup mount umount cryptsetup
+
+ # For debugging
+ #resolve_bins sleep mkdir chmod chown tr
# Set up the archive source dir.
cache_dir_setup ${cache}
@@ -218,6 +223,10 @@ function main {
install -v -D /usr/lib/libgcc_s.so "${cache}/usr/lib/libgcc_s.so"
install -v -D /usr/lib/libgcc_s.so.1 "${cache}/usr/lib/libgcc_s.so.1"
+ # Install udev rules for block devices
+ mkdir -p "${cache}/lib/udev"
+ cp -rv /lib/udev/rules.d "${cache}/lib/udev/rules.d"
+
# Copy binary and dependencies to cache dir
for bin in ${fqbins[@]}; do
# Copy the binary of interest

Generated by cgit