diff options
author | Jeff Bailey <jbailey@ubuntu.com> | 2005-09-17 16:45:40 -0400 |
---|---|---|
committer | Jeff Bailey <jbailey@ubuntu.com> | 2005-09-17 16:45:40 -0400 |
commit | 5582f19f77d283348d946dd4cafcbc2134a3186c (patch) | |
tree | c24e3b745525cc22c5ff4265734d0fa04b652058 /scripts/functions | |
parent | 61afce26f88ffc9ee2537f16fb4f3eaa82658af7 (diff) | |
download | initramfs-tools-5582f19f77d283348d946dd4cafcbc2134a3186c.tar.gz initramfs-tools-5582f19f77d283348d946dd4cafcbc2134a3186c.zip |
initramfs-tools (0.26) breezy; urgency=low
"Experience is one thing you can't get for nothing."
- Oscar Wilde
* scripts/local-top/lvm: Reduce -- to - in VG strings for feeding
to vgchange. (Ubuntu: #13387)
* update-initramfs: New file
* debian/dirs: Add /var/lib/initramfs-tools
* hooks/evms: New file
* scripts/local-top: New file.
* debian/control: Bump klibc depends to 1.0.14-1ubuntu2 for jfs support
* hook-scripts (manual_add_modules): Don't do unnecessary depmod
(dep_add_modules): No need for a sleep 2 here.
Thanks to Matt Zimmmerman for noticing these!
* scripts/functions: Attempt resume before loading USB or Network
modules to avoid resume issues with USB.
Thanks to Matthew Garrett for this patch!
* scripts/functions (ide_boot_events): Always load ide-generic
before going further. This allows us to catch any hidden
IDE controllers that might not otherwise get found.
* initramfs.conf.5: New file
* debian/initramfs-tools.manpages: Install it.
Thanks to maximilian attems for the manpage!
* hook-functions (auto_add_modules): Add mptscsih (Ubuntu #15406)
Thanks to Jesper Krogh for the bug report!
* debian/dirs: Add etc/mkinitramfs/hooks, move all scripts subdirs
into etc/mkinitramfs/scripts.
* mkinitramfs: Set the umask. Copy the scripts from
/etc/mkinitramfs/scripts into the image.
Make sure that modules file lists is actually a regular file.
* init: Use ${rootmnt} instead of hardcoded /root, use mount -n
Fix typo.
* hook-functions (catenate_cpiogz): Add sanity check.
(add_modules_from_file): Document, quote variable, add warning.
* docs/example_hook: Update
Thanks to Karl Hegbloom for these previous 5 patches!
* init: Create /var/lock on the initramfs
Thanks to Jerry Haltom for noticing this!
* debian/dirs: rename to ...
* debian/initramfs-tools.dirs: ... this.
* scripts/functions (scsi_boot_events): Don't attempt to look
at ${device}/type if it doesn't actually exist.
-- Jeff Bailey <jbailey@ubuntu.com> Wed, 14 Sep 2005 14:12:24 -0400
Diffstat (limited to 'scripts/functions')
-rw-r--r-- | scripts/functions | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/scripts/functions b/scripts/functions index 4b3b7cf..148dda7 100644 --- a/scripts/functions +++ b/scripts/functions @@ -144,10 +144,11 @@ run_scripts() } ide_boot_events() { - [ -e /proc/ide ] || return modprobe -q ide-generic + [ -e /proc/ide ] || return + for drive in /proc/ide/*; do [ -e ${drive}/media ] || continue # nothing to do if the device has already been took in charge @@ -156,11 +157,11 @@ ide_boot_events() { read media < $drive/media case "$media" in - disk) MODULE=ide-disk ;; - cdrom) MODULE=ide-cd ;; - tape) MODULE=ide-tape ;; - floppy) MODULE=ide-floppy ;; - *) MODULE=ide-generic ;; + disk) MODULE=ide-disk ;; + cdrom) MODULE=ide-cd ;; + tape) MODULE=ide-tape ;; + floppy) MODULE=ide-floppy ;; + *) MODULE=ide-generic ;; esac modprobe -q ${MODULE} @@ -172,6 +173,7 @@ scsi_boot_events() [ -e /sys/bus/scsi/devices/ ] || return for device in /sys/bus/scsi/devices/*; do + [ -e "${device}"/type ] || continue read media < ${device}/type case "$media" in 0) modprobe -q sd_mod; @@ -209,6 +211,32 @@ load_modules() fi for x in /sys/bus/pci/devices/*; do + if [ -e ${x}/class ]; then + case $(cat ${x}/class) in + 0x0100*|0x0101*) + if [ -e ${x}/modalias ]; then + modprobe -q $(cat ${x}/modalias) + fi + ;; + esac + fi + done + + ide_boot_events + + scsi_boot_events + + i2o_boot_events + + if [ -e /sys/power/resume ]; then + if [ -e ${resume} ]; then + major=$((0x$(stat -c%t ${resume}))) + minor=$((0x$(stat -c%T ${resume}))) + echo ${major}:${minor} >/sys/power/resume + fi + fi + + for x in /sys/bus/pci/devices/*; do if [ -e ${x}/modalias ]; then modprobe -q $(cat ${x}/modalias) fi |