summaryrefslogtreecommitdiff
path: root/hook-functions
diff options
context:
space:
mode:
Diffstat (limited to 'hook-functions')
-rw-r--r--hook-functions26
1 files changed, 19 insertions, 7 deletions
diff --git a/hook-functions b/hook-functions
index b189c34..4371962 100644
--- a/hook-functions
+++ b/hook-functions
@@ -1,7 +1,13 @@
# -*- shell-script -*-
catenate_cpiogz() {
- cat "$1" >>${__TMPCPIOGZ}
+ # Sanity check
+ if [ ! -e "${1}" ]; then
+ echo "W:catenate_cpiogz: arg1='${1}' does not exist." >&2
+ return
+ fi
+
+ cat "${1}" >>${__TMPCPIOGZ}
}
force_load()
@@ -10,10 +16,20 @@ force_load()
echo ${@} >>${DESTDIR}/conf/modules
}
+# Takes a file containing a list of modules to be added as an
+# argument, figures out dependancies, and adds them.
+#
+# Input file syntax:
+#
+# # comment
+# modprobe_module_name [args ...]
+# [...]
+#
add_modules_from_file()
{
# Sanity check
- if [ ! -e ${1} ]; then
+ if [ ! -e "${1}" ]; then
+ echo "W:add_modules_from_file: arg1='${1}' does not exist." >&2
return
fi
@@ -32,7 +48,6 @@ manual_add_modules()
mkdir -p ${DESTDIR}/$(dirname ${mam_x})
ln -s ${mam_x} ${DESTDIR}/$(dirname ${mam_x})
- depmod -b ${DESTDIR} ${version}
done
}
@@ -88,9 +103,6 @@ dep_add_modules()
fi
done
- # Give the USB bus a moment to catch up
- sleep 2
-
for x in /sys/bus/usb/devices/*; do
if [ -e ${x}/modalias ]; then
manual_add_modules $(cat ${x}/modalias)
@@ -132,7 +144,7 @@ auto_add_modules()
done
# scsi
- for x in 3w-9xxx 3w-xxxx a100u2x aacraid ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv sata_qstor sata_sil sata_sis sata_svw sata_sx4 sata_uli sata_via sata_vsc scsi_mod scsi_transport_fc scsi_transport_iscsi scsi_transport_spi sd_mod sym53c8xx tmscsim; do
+ for x in 3w-9xxx 3w-xxxx a100u2x aacraid ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh mptscsih nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv sata_qstor sata_sil sata_sis sata_svw sata_sx4 sata_uli sata_via sata_vsc scsi_mod scsi_transport_fc scsi_transport_iscsi scsi_transport_spi sd_mod sym53c8xx tmscsim; do
manual_add_modules ${x}
done