initrd: helper to load the SATA modules and mount a partition

This commit is contained in:
Trammell hudson 2019-08-12 14:59:18 +02:00
parent 4d4be41d3f
commit 0d9a1e5038
No known key found for this signature in database
GPG Key ID: 0F948052DDECBE68

14
initrd/bin/mount-sata Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
# Setup the devices for SATA
. /etc/functions
for mod in libata libahci ahci; do
if ! lsmod | grep -q "^$mod " ; then
insmod "/lib/modules/$mod.ko" \
|| die "$mod: Unable to load module"
fi
done
if [ ! -z "$1" ]; then
exec mount "$@"
fi