summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--install/autodetect2
-rw-r--r--install/base2
-rw-r--r--install/btrfs2
-rw-r--r--install/consolefont2
-rw-r--r--install/dmesg5
-rw-r--r--install/dsdt2
-rw-r--r--install/filesystems2
-rw-r--r--install/fw2
-rw-r--r--install/ide2
-rw-r--r--install/keymap2
-rw-r--r--install/memdisk2
-rw-r--r--install/net2
-rw-r--r--install/pata2
-rw-r--r--install/pcmcia2
-rw-r--r--install/resume3
-rw-r--r--install/sata2
-rw-r--r--install/scsi2
-rw-r--r--install/sleep2
-rw-r--r--install/udev2
-rw-r--r--install/usb2
-rw-r--r--install/usbinput2
-rwxr-xr-xmkinitcpio23
22 files changed, 38 insertions, 31 deletions
diff --git a/install/autodetect b/install/autodetect
index 70fac56..118c9a5 100644
--- a/install/autodetect
+++ b/install/autodetect
@@ -1,6 +1,6 @@
# vim: set ft=sh:
-install ()
+build()
{
MODULE_FILE="${TMPDIR}/autodetect_modules"
#blegh, we'll let /tmp clean itself up
diff --git a/install/base b/install/base
index 4a0ff14..87d789d 100644
--- a/install/base
+++ b/install/base
@@ -1,6 +1,6 @@
# vim:set ft=sh:
-install ()
+build()
{
add_dir "/proc"
add_dir "/sys"
diff --git a/install/btrfs b/install/btrfs
index 60dc2ac..c156bb0 100644
--- a/install/btrfs
+++ b/install/btrfs
@@ -1,6 +1,6 @@
# vim:set ft=sh:
-install()
+build()
{
MODULES="$(all_modules btrfs)"
BINARIES="/sbin/btrfs"
diff --git a/install/consolefont b/install/consolefont
index 7a3e73f..395387b 100644
--- a/install/consolefont
+++ b/install/consolefont
@@ -1,6 +1,6 @@
# vim: set ft=sh:
-install ()
+build()
{
MODULES=""
BINARIES=""
diff --git a/install/dmesg b/install/dmesg
index d25deba..9482874 100644
--- a/install/dmesg
+++ b/install/dmesg
@@ -1,5 +1,6 @@
# vim: set ft=sh:
-install ()
+
+build()
{
MODULES=""
BINARIES=""
@@ -15,4 +16,4 @@ cat<<HELPEOF
with the boot process during early userspace
(like when entering a passphrase).
HELPEOF
-} \ No newline at end of file
+}
diff --git a/install/dsdt b/install/dsdt
index 138ee47..f1345d0 100644
--- a/install/dsdt
+++ b/install/dsdt
@@ -1,6 +1,6 @@
# vim: set ft=sh:
-install ()
+build()
{
MODULES=""
BINARIES=""
diff --git a/install/filesystems b/install/filesystems
index cd1a4cb..337a6a5 100644
--- a/install/filesystems
+++ b/install/filesystems
@@ -1,6 +1,6 @@
# vim: set ft=sh:
-install ()
+build()
{
if [ "${autodetect_fs_detection_failed}" = "1" ]; then
MODULES=" $(all_modules '/kernel/fs' | grep -v "nls")"
diff --git a/install/fw b/install/fw
index 9f4ed26..a5a77cb 100644
--- a/install/fw
+++ b/install/fw
@@ -1,6 +1,6 @@
# vim: set ft=sh:
-install ()
+build()
{
MODULES=" $(checked_modules "/firewire/") "
diff --git a/install/ide b/install/ide
index f3bee4e..fa0da51 100644
--- a/install/ide
+++ b/install/ide
@@ -1,6 +1,6 @@
# vim: set ft=sh:
-install ()
+build()
{
MODULES=" $(checked_modules "/ide/" | grep -v "legacy") ";
diff --git a/install/keymap b/install/keymap
index 65990dd..4038c87 100644
--- a/install/keymap
+++ b/install/keymap
@@ -1,6 +1,6 @@
# vim: set ft=sh:
-install ()
+build()
{
MODULES=""
BINARIES=""
diff --git a/install/memdisk b/install/memdisk
index d2a844d..69c996f 100644
--- a/install/memdisk
+++ b/install/memdisk
@@ -1,6 +1,6 @@
# vim:set ft=sh:
-install ()
+build()
{
MODULES="phram mtdblock"
BINARIES="/usr/bin/memdiskfind"
diff --git a/install/net b/install/net
index 6016ed5..2c816ba 100644
--- a/install/net
+++ b/install/net
@@ -1,6 +1,6 @@
# vim: set ft=sh:
-install ()
+build()
{
MODULES="nfs $(checked_modules "/drivers/net/") "
diff --git a/install/pata b/install/pata
index af3c106..1d750dc 100644
--- a/install/pata
+++ b/install/pata
@@ -1,6 +1,6 @@
# vim: set ft=sh:
-install ()
+build()
{
MODULES=" $(checked_modules "ata/pata_*") $(checked_modules "ata/ata_generic")
$(checked_modules "ata/ata_piix")"
diff --git a/install/pcmcia b/install/pcmcia
index 8b685c5..a9920c1 100644
--- a/install/pcmcia
+++ b/install/pcmcia
@@ -1,6 +1,6 @@
# vim: set ft=sh:
-install ()
+build()
{
MODULES=" $(checked_modules '/pcmcia/' | grep -ve 'sound' -e 'net') $(checked_modules '/ide/legacy')"
MODULES=$(echo ${MODULES}) #trim whitespace
diff --git a/install/resume b/install/resume
index cbef453..dcf6442 100644
--- a/install/resume
+++ b/install/resume
@@ -1,5 +1,6 @@
# vim:set ft=sh:
-install ()
+
+build()
{
MODULES=""
BINARIES=""
diff --git a/install/sata b/install/sata
index 4ed4d1c..cbd2db2 100644
--- a/install/sata
+++ b/install/sata
@@ -1,6 +1,6 @@
# vim: set ft=sh:
-install ()
+build()
{
MODULES=" $(checked_modules "scsi/.*ata") $(checked_modules "block/sx8")
$(checked_modules "scsi/ahci") $(checked_modules "scsi/pdc_adma")
diff --git a/install/scsi b/install/scsi
index b831b64..9a97a8c 100644
--- a/install/scsi
+++ b/install/scsi
@@ -1,6 +1,6 @@
# vim: set ft=sh:
-install ()
+build()
{
MODULES=" $(checked_modules "/scsi/" | grep -ve "imm" -e "pdc_adma" -e "ahci" -e "ata" -e "pcmcia" -e "ide")
$(checked_modules "/block/" | grep -e "cciss" -e "cpqarray" -e "DAC960")
diff --git a/install/sleep b/install/sleep
index a59d0c3..c7a8902 100644
--- a/install/sleep
+++ b/install/sleep
@@ -1,6 +1,6 @@
# vim:set ft=sh:
-install ()
+build()
{
MODULES=""
BINARIES=""
diff --git a/install/udev b/install/udev
index 33a13cc..74c9b5e 100644
--- a/install/udev
+++ b/install/udev
@@ -1,6 +1,6 @@
# vim:set ft=sh:
-install ()
+build()
{
MODULES=""
BINARIES=""
diff --git a/install/usb b/install/usb
index 605912c..620f695 100644
--- a/install/usb
+++ b/install/usb
@@ -1,6 +1,6 @@
# vim: set ft=sh:
-install ()
+build()
{
MODULES=" $(checked_modules "/usb/host" | grep -ve "_cs" -e "sl811-hcd" -e "isp116x-hcd")"
diff --git a/install/usbinput b/install/usbinput
index 0d293ae..a90cd15 100644
--- a/install/usbinput
+++ b/install/usbinput
@@ -1,6 +1,6 @@
# vim: set ft=sh:
-install ()
+build()
{
MODULES=" $(checked_modules "/usb/host" | grep -ve "_cs" -e "sl811-hcd" -e "isp116x-hcd") "
MODULES=" $(echo ${MODULES}) $(all_modules "/hid/hid-") "
diff --git a/mkinitcpio b/mkinitcpio
index 70710eb..201c4ce 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -226,7 +226,7 @@ MODULEDIR=$(echo ${MODULEDIR} | tr -s /)
if [ "${SHOW_AUTOMODS}" = "y" ]; then
echo "Modules autodetected:"
. "${INSTDIR}/autodetect"
- install
+ build
cat "${MODULE_FILE}"
cleanup
exit 0
@@ -242,10 +242,8 @@ parse_hook
for hook in ${HOOKS}; do
in_array ${hook} ${SKIPHOOKS[@]} && continue
- unset MODULES
- unset BINARIES
- unset FILES
- install () { msg "${hook}: no install function..."; }
+ unset MODULES BINARIES FILES
+ build () { msg "${hook}: no build function..."; }
# Deprecation check
# A hook is considered deprecated if it is a symlink
# within $INSTDIR.
@@ -260,10 +258,19 @@ for hook in ${HOOKS}; do
hook="${newhook}"
fi
fi
- if grep -q "install" "${INSTDIR}/${hook}"; then
+ if [[ -r "${INSTDIR}/${hook}" ]]; then
. "${INSTDIR}/${hook}"
echo ":: Parsing hook [${hook}]"
- install
+ if [[ $(type -t install) = 'function' ]]; then
+ echo " -----------------------------------------------------------------------"
+ echo " WARNING: Hook '$hook' uses a deprecated 'install' function. This "
+ echo " should be switched to a 'build' function instead."
+ echo " -----------------------------------------------------------------------"
+ install
+ unset install
+ else
+ build
+ fi
parse_hook
else
die "Hook '${hook}' can not be found."
@@ -272,8 +279,6 @@ done
if [ "${HAS_MODULES}" = "y" ]; then
echo ":: Generating module dependencies"
- # unfortuate name collision between a function and utility program
- unset install
for mod in $(grep "file /lib/modules/${KERNELVERSION}" ${FILELIST} | cut -d' ' -f2); do
install -m 644 -D "${BASEDIR}${mod}" "${TMPDIR}${mod}"
done