r4375 - in dists/trunk/utils: . initramfs-tools initramfs-tools/conf initramfs-tools/debian initramfs-tools/docs initramfs-tools/hooks initramfs-tools/scripts initramfs-tools/scripts/init-premount initramfs-tools/scripts/local-premount initramfs-tools/scripts/local-top

Bastian Blank waldi at costa.debian.org
Mon Oct 10 16:47:30 UTC 2005


Author: waldi
Date: 2005-10-10 16:47:29 +0000 (Mon, 10 Oct 2005)
New Revision: 4375

Added:
   dists/trunk/utils/initramfs-tools/
   dists/trunk/utils/initramfs-tools/HACKING
   dists/trunk/utils/initramfs-tools/conf/
   dists/trunk/utils/initramfs-tools/conf/initramfs.conf
   dists/trunk/utils/initramfs-tools/conf/modules
   dists/trunk/utils/initramfs-tools/debian/
   dists/trunk/utils/initramfs-tools/debian/NEWS
   dists/trunk/utils/initramfs-tools/debian/README
   dists/trunk/utils/initramfs-tools/debian/TODO
   dists/trunk/utils/initramfs-tools/debian/changelog
   dists/trunk/utils/initramfs-tools/debian/compat
   dists/trunk/utils/initramfs-tools/debian/control
   dists/trunk/utils/initramfs-tools/debian/copyright
   dists/trunk/utils/initramfs-tools/debian/initramfs-tools.dirs
   dists/trunk/utils/initramfs-tools/debian/initramfs-tools.docs
   dists/trunk/utils/initramfs-tools/debian/initramfs-tools.examples
   dists/trunk/utils/initramfs-tools/debian/initramfs-tools.install
   dists/trunk/utils/initramfs-tools/debian/initramfs-tools.manpages
   dists/trunk/utils/initramfs-tools/debian/initramfs-tools.postinst
   dists/trunk/utils/initramfs-tools/debian/initramfs-tools.postrm
   dists/trunk/utils/initramfs-tools/debian/rules
   dists/trunk/utils/initramfs-tools/docs/
   dists/trunk/utils/initramfs-tools/docs/example_hook
   dists/trunk/utils/initramfs-tools/docs/example_hook_cpiogz
   dists/trunk/utils/initramfs-tools/docs/example_script
   dists/trunk/utils/initramfs-tools/hook-functions
   dists/trunk/utils/initramfs-tools/hooks/
   dists/trunk/utils/initramfs-tools/hooks/acpid
   dists/trunk/utils/initramfs-tools/hooks/evms
   dists/trunk/utils/initramfs-tools/hooks/kernelextras
   dists/trunk/utils/initramfs-tools/hooks/udev
   dists/trunk/utils/initramfs-tools/init
   dists/trunk/utils/initramfs-tools/initramfs.conf.5
   dists/trunk/utils/initramfs-tools/mkinitramfs
   dists/trunk/utils/initramfs-tools/mkinitramfs.8
   dists/trunk/utils/initramfs-tools/scripts/
   dists/trunk/utils/initramfs-tools/scripts/functions
   dists/trunk/utils/initramfs-tools/scripts/init-bottom/
   dists/trunk/utils/initramfs-tools/scripts/init-premount/
   dists/trunk/utils/initramfs-tools/scripts/init-premount/acpid
   dists/trunk/utils/initramfs-tools/scripts/init-top/
   dists/trunk/utils/initramfs-tools/scripts/local
   dists/trunk/utils/initramfs-tools/scripts/local-bottom/
   dists/trunk/utils/initramfs-tools/scripts/local-premount/
   dists/trunk/utils/initramfs-tools/scripts/local-premount/suspend
   dists/trunk/utils/initramfs-tools/scripts/local-top/
   dists/trunk/utils/initramfs-tools/scripts/local-top/evms
   dists/trunk/utils/initramfs-tools/scripts/local-top/lvm
   dists/trunk/utils/initramfs-tools/scripts/local-top/md
   dists/trunk/utils/initramfs-tools/scripts/nfs
   dists/trunk/utils/initramfs-tools/scripts/nfs-bottom/
   dists/trunk/utils/initramfs-tools/scripts/nfs-premount/
   dists/trunk/utils/initramfs-tools/scripts/nfs-top/
   dists/trunk/utils/initramfs-tools/update-initramfs
   dists/trunk/utils/initramfs-tools/update-initramfs.8
Log:
/dists/trunk/utils/initramfs-tools: Import initramfs-tools 0.30.


Added: dists/trunk/utils/initramfs-tools/HACKING
===================================================================
--- dists/trunk/utils/initramfs-tools/HACKING	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/HACKING	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,19 @@
+> I am not sure how to modify mkinitramfs to do this automatically, maybe you know?
+
+I need to document this more clearly, but the initramfs-tools have a collection of hooks that will solve your problem.  While there's no way that Breezy could do this in the install, we could certainly include the scripts in the package (Especially if you're willing to test them to make sure they work! *g*)
+
+There are two phases that need to be accounted for.  The first is the install phase for generating the initramfs, the second is run-time phase for actually doing the needed magic.
+
+To install the components you need, look at the scripts in /usr/share/initramfs-tools/hooks.  evms and acpid are good choices.  You can see a bunch of header stuff at the top that basically guarantees that things are run in the right order if they need to be.  Two functions that will interest you:
+
+copy_exec copies a binary and any libraries it depends on
+manual_add_modules takes bareword module names (like fan, thermal, etc) and installs those modules and any of their dependancies into the initramfs.
+
+The runtime phase is handled by scripts in /usr/share/initramfs-tools/scripts/ you probably want to start up at about the same point as lvm, md, and evms do, so local-top is a good directory to look in.
+You can see the same sort of magic at the top of the script, although lvm and evms each require that md run first.
+
+I hope this helps.  I'll paste this text into a HACKING file on the hopes that someone will see fit to improve it.  That person will probably be me, mind you... =)
+
+Tks,
+Jeff Bailey
+

Added: dists/trunk/utils/initramfs-tools/conf/initramfs.conf
===================================================================
--- dists/trunk/utils/initramfs-tools/conf/initramfs.conf	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/conf/initramfs.conf	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,54 @@
+#
+# initramfs.conf
+# Configuration file for mkinitramfs(8). See mkinitramfs.conf(5).
+#
+
+#
+# MODULES: [ most | dep | list ]
+#
+# most - Add all framebuffer, acpi, filesystem, and harddrive drivers.
+#
+# dep - Try and guess which modules to load.
+#
+# list - Only include modules from the 'additional modules' list
+#
+
+MODULES=most
+
+#
+# RESUME: [ /dev/hda2 | /dev/sdb2 ]
+# 
+# Optionaly set the swap partition to resume from.                             
+# Above are only possible example please costumize.
+# The command line of your boot loader will override this setting.             
+
+#RESUME=
+
+#
+# NFS Section of the config.
+#
+
+#
+# BOOT: [ local | nfs ]
+#
+# local - Boot off of local media (harddrive, USB stick).
+#
+# nfs - Boot using an NFS drive as the root of the drive.
+#
+
+BOOT=local
+
+#
+# DEVICE: ...
+#
+# Specify the network interface, like eth0
+#
+
+DEVICE=eth0
+
+#
+# NFSROOT: [ auto | HOST:MOUNT ]
+#
+
+NFSROOT=auto
+

Added: dists/trunk/utils/initramfs-tools/conf/modules
===================================================================
--- dists/trunk/utils/initramfs-tools/conf/modules	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/conf/modules	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,9 @@
+# List of modules that you want to include in your initramfs.
+#
+# Syntax:  module_name [args ...]
+#
+#
+# This might be good choices:
+#
+# raid1
+# sd_mod

Added: dists/trunk/utils/initramfs-tools/debian/NEWS
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/NEWS	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/debian/NEWS	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,15 @@
+initramfs-tools (0.10) breezy; urgency=low
+
+  * This release includes hardware auto detection in the initramfs.
+    This means two things in particular that are important:
+
+    1) the resulting initramfs will be huge.  Like 10 megs huge.
+       I will shrink it down once it's correct.  If you're on an 
+       arch that doesn't like >4mb initramfs', then this won't boot.
+
+    2) Your network drivers are loaded in the initramfs, so hotplug
+       won't see a network event, so ifup won't be run.  This will
+       be fixed shortly in hotplug.
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Fri, 17 Jun 2005 15:17:06 +0000
+

Added: dists/trunk/utils/initramfs-tools/debian/README
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/README	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/debian/README	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,12 @@
+initramfs-tools
+===============
+
+This package is a work in progress towards the replacement of the initrd
+system with an initramfs system.
+
+The goals include using klibc for all earlyspace tools, an integrated udev
+and an integrated hotplug.
+
+See the TODO file for a current status.
+
+Jeff Bailey - 2005-04-24

Added: dists/trunk/utils/initramfs-tools/debian/TODO
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/TODO	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/debian/TODO	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,20 @@
+TODO
+====
+
+ o Grep for TODO and FIXME and do those. =)
+
+ o Eliminate udev.
+
+ o Support list and dep options
+
+ o Default to dep for PPC - Possibly to detect newworld?
+
+ o Support evms
+
+ o Support cryptroot
+
+ o Trace lilo bug
+
+ o Capture udev events and pass them to udevsend
+
+ o Detect RESUME partition

Added: dists/trunk/utils/initramfs-tools/debian/changelog
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/changelog	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/debian/changelog	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,605 @@
+initramfs-tools (0.30) unstable; urgency=low
+
+  Apparition Octobre Rouge
+
+  [ maximilian Attems ]
+
+  * Resynconise with latest upstream now we are in unstable.
+  
+  [ Jeff Bailey ]
+  * debian/rules: Make sure hooks and scripts are chmod +x
+
+  * hook-functions (auto_add_modules): Add advansys.
+
+  * debian/init: Add "Loading, please wait..." message.
+    Don't log for init-top scripts to avoid usplash noise.
+
+  * init: Add start of debug command line option.
+
+  * scripts/functions (log_begin_msg): Call usplash if available
+    (log_end_msg): Call usplash if available
+    (panic): Close usplash if available
+
+  * scripts/functions (load_modules): Quote resume variable.
+    Thanks to Christian Kellner for helping test that!
+
+  * scripts/local-premount/suspend: Quote resume variable.
+
+  * update-initramfs: Use basename on the link target to get the
+     version number.
+
+  * HACKING: Start of some notes on how this package actually works.
+  * debian/initramfs-tools.docs: Install it.
+
+  [ Matthew Garrett ]
+  * scripts/functions (load_modules): Run udevstart after loading block
+    drivers should fix resume from hibernate on non-LVM systems.
+
+ -- maximilian attems <maks at sternwelten.at>  Fri, 30 Sep 2005 19:34:55 +0200
+
+initramfs-tools (0.27) unstable; urgency=low
+
+  * Remove unused BUSYBOX config option as we use busybox anyway.
+
+  * Add Jeff Bailey and myself as Uploaders, Debian kernel team as
+    MAINTAINER.
+
+  * Upload to debian unstable - allows use of nondevfs kernel >= 2.6.13
+    with initramfs image. (Closes: #312561, #315654)
+
+  * Fix busybox dependency to the relevant debian package.
+
+  * Reorder the initramfs.conf variables.
+
+  * Add question mark to the getopts for the help message.
+
+  * update-initramfs.8 New file install it.
+
+  * The debian busybox-cvs-static installs into /bin/busybox:
+    fix pathes vis-a-vis ubuntu version. make that a variable on top.
+
+ -- maximilian attems <maks at sternwelten.at>  Tue, 20 Sep 2005 13:52:00 +0200
+
+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/evms: New file.
+    Thanks to Jerry Haltom for helping test this!
+
+  * 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 at ubuntu.com>  Wed, 14 Sep 2005 14:12:24 -0400
+
+initramfs-tools (0.25) breezy; urgency=low
+
+  "If there was less sympathy in the world, there would be less
+   trouble in the world."
+  - Oscar Wilde
+
+  * init: Module the /dev tmpfs earlier.  Make /dev/console, and
+    /dev/null on it at the beginning, just in case.
+
+  * debian/initramfs-tools.postinst: When copying the modules file over
+    from initrd-tools installations, filter out ext2, ext3, ide-generic
+    and ide-disk.  These are leftovers from Warty.
+    (Ubuntu #14242)
+
+  * hooks/udev: New File (Ubuntu #12915)
+
+  * init: panic if ${init} doesn't exist on the target filesystem.
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Thu,  1 Sep 2005 00:13:47 -0400
+
+initramfs-tools (0.24) breezy; urgency=low
+
+  "Experience is simply the name we give out mistakes."
+  - Oscar Wilde
+
+  * hook-functions (auto_add_modules): Add cciss
+    (Ubuntu #14177) Thanks Fabionne!
+
+  * scripts/functions (parse_numeric): Noop on empty parameter.
+    Fixes LTSP boot failure.  Thanks to Oliver Grawert
+    for testing!
+
+  * scripts/local-top/md: Don't run modprobe when raidlvl is unset.
+    Run mdadm if raidlvl has ever been set, not just if the most
+    recent device checked was part of the raid setup.
+    Thanks to Jeff Waugh for the bug report!
+
+  * mkinitramfs: Feed the -o argument through readlink -f to
+    get the canonical pathname.
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Fri, 26 Aug 2005 09:35:32 -0400
+
+initramfs-tools (0.23) breezy; urgency=low
+
+  "This suspense is terrible. I hope it will last."
+  - Oscar Wilde
+
+  * scripts/local: Quote ${ROOT} so that an empty value causes us
+    to drop to a shell.
+    Thanks to Matt Zimmerman for this fix!
+
+  * hook-functions (auto_add_modules): Add atiixp and opti621 to
+    the IDE set.
+
+  * hook-functions (dep_add_modules): Detect i2o and add i2o_block
+    (auto_add_modules): Include i2o_block.
+
+  * scripts/functions (i2o_boot_events): New function
+    (load_modules): Call it. (Ubuntu# 13806)
+    Thanks to Tollef Fog Heen for the i2o patch!
+
+  * debian/control: Depend on udev.
+    Thanks to Alexander Butenko for troubleshooting this with me.
+
+  * init: Move the /dev directory to the root filesystem.
+    Handle all the udev bind mounts as needed.
+    Make sure input and output is associated with dev/console.
+
+  * scripts/functions (parse_numeric): Exit if we're refering to a path.
+    Otherwise override root setting to be /dev/root.
+  * init: Call parse_numeric when setting the root variable.
+  * scripts/local-top/lvm: When using a numeric root, call vgchange -ay
+    Don't attempt to start LVM on regular partitions.
+    (Ubuntu #13365, #13778, and some of #13399)
+
+  * scripts/local-top/lvm: Cope with -'s in the Volume Group and
+    logical volume names. (Ubuntu #13387)
+    Thanks to Stephen Shirley for the patch!
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Thu, 25 Aug 2005 11:48:15 -0400
+
+initramfs-tools (0.22) breezy; urgency=low
+
+  * Fix argument handling in force_load hook-function
+  * Add "sleep 3" to scripts/nfs as a nasty hack around bug #12942
+
+ -- Matt Zimmerman <mdz at ubuntu.com>  Fri, 19 Aug 2005 23:50:16 -0700
+
+initramfs-tools (0.21) breezy; urgency=low
+
+  "All that I desire to point out is the general principle that
+   life imitates art far more than art imitates life."
+   - Oscar Wilde
+
+  * mkinitramfs: Define MODULESDIR and use it.
+
+  * hook-functions: Use MODULESDIR
+    (add_modules_from_file): Do not add .ko extension to file lists.
+    Call force_load instead of twiddling conf/modules directly.
+    (Ubuntu #13372)
+    (force_load): New function.
+    (copy_exec): Attempt to use non-optimsed libraries if available.
+    (Ubuntu #13470)
+    (auto_add_modules) Include forcedeth (Ubuntu #13448)
+
+  * hooks/kernelextras: New file. (Ubuntu #13414)
+
+  * debian/initramfs-tools.postinst: Preserve /etc/mkinitrd/modules if
+    possible on new install. (Ubuntu #13372)
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Thu, 18 Aug 2005 00:20:11 -0400
+
+initramfs-tools (0.20) breezy; urgency=low
+
+  * Depend on cpio.
+
+ -- Colin Watson <cjwatson at ubuntu.com>  Fri, 12 Aug 2005 10:43:04 +0100
+
+initramfs-tools (0.19) breezy; urgency=low
+
+  "The basis of optimism is sheer terror."
+  - Oscar Wilde
+
+  * mkinitramfs: Honour MODULES=list and MODULES=dep.
+
+  * hook-functions: New function dep_add_modules.
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Wed, 10 Aug 2005 23:20:11 -0400
+
+initramfs-tools (0.18) breezy; urgency=low
+
+  "We are all in the gutter, but some of us are looking at the stars."
+  - Oscar Wilde
+
+  * debian/initramfs-tools.postrm: Use rm -f for removing the modules
+    file, in case it doesn't exist for some reason. (Ubuntu #13335)
+    Thanks to Colin Watson for the bug report!
+
+  * mkinitramfs.8: Correct my email address to be jbailey at ubuntu.com
+    Document /etc/mkinitramfs/DSDT.aml
+
+  * debian/initramfs-tools.postinst: Attempt to inherit RESUME settings
+    from initrd-tools.  Also copy the DSDT from /etc/mkinitrd/DSDT to
+    /etc/mkinitramfs/DSDT.aml
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Wed, 10 Aug 2005 13:09:44 -0400
+
+initramfs-tools (0.17) breezy; urgency=low
+
+  "The public is wonderfully tolerant. It forgives everything except
+   genius."
+  - Oscar Wilde
+
+  * debian/initramfs-tools.postinst: Get the name of the config file 
+    right when seeding RESUME=.  Also fix the sed expression.
+    Thanks to Matthew Garrett for noticing this!  
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Wed, 10 Aug 2005 11:54:07 -0400
+
+initramfs-tools (0.16) breezy; urgency=low
+
+  "It is through art, and through art only, that we can realise our
+   perfection."
+   - Oscar Wilde
+
+  * mkinitramfs: Make sure all relevant ide modules are included.
+    Add RESUME= support.
+
+  * scripts/functions: Be silent when adding non-detected modules.
+
+  * conf/mkinitramfs.conf: MODULES=most by default, BUSYBOX=y
+    (Non-busybox isn't supported now.  It's not clear that it ever 
+     will be).  Add RESUME line for resuming from suspend-to-disk.
+
+  * scripts/local-premount/suspend: New script for suspend-to-disk.
+
+  * debian/control: Bump depends on busybox-cvs-initramfs to
+    20040623-1ubuntu19.  Add dependancy on lvm2.
+    Bump standards version to 3.6.2.0 (no-op)
+
+  * debian/control:
+    Force version depend on lvm2 (>= 2.01.04-5) to make sure newer kernels
+    will boot.
+    Thanks for Andrew Mitchell for discovering this.
+
+  * hooks/: New directory
+
+  * debian/dirs: Move hooks to ...
+  * debian/initramfs-tools.install: ... here.
+
+  * hooks/acpid: New file.
+
+  * scripts/init-premount/acpid: New file
+    Thanks for the hint from Matthew Garrett for this.
+
+  * debian/initramfs-tools.postinst: Add RESUME support on first install.
+
+  * debian/mkinitramfs: Move functions to ...
+  * debian/hook-functions: ... here.
+
+  * debian/initramfs-tools.install: Install hook-functions
+
+  * mkinitramfs.8: New file.
+    Thanks to Maximilian Attems for contributing this!
+
+  * scripts/local-top/md: Don't try to detect raid on non-existant devices
+    or on whole devices.  Quiet other warning messages.
+
+  * hook-functions: When generating initramfs, don't complain about missing
+    modules.
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Tue,  9 Aug 2005 23:35:08 -0400
+
+initramfs-tools (0.15) breezy; urgency=low
+
+  "Nothing looks so like innocence as an indiscretion."
+  - Oscar Wilde
+
+  * mkinitramfs: Handle putting DSDT.aml into the initramfs
+    Add sata_nv to list of modules to import for main mode.
+
+  * init: New scripts directory, init-premount for generic premount
+    handling (like usplash)
+
+  * debian/dirs: Make the /etc version of this directory for user
+    addons.
+
+  * debian/rules: Use prebuild, rather than debian-build-arch.
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Tue,  9 Aug 2005 11:29:10 -0400
+
+initramfs-tools (0.14) breezy; urgency=low
+
+  "The world is a stage, but the play is badly cast."
+  - Oscar Wilde
+
+  * scripts/functions: Add scsi_boot_events and call it to load sd_mod
+
+  * scripts/local-top/md: Autodetect raid level
+
+  * scripts/local-top/lvm: Only activate the volumegroup required by
+    the root device.  Don't bother with lvm if the root partition isn't
+    /dev/mapper/FOO.
+
+  * scripts/functions: Fix ide_boot_events.  This never worked, even
+    if I thought it did.
+
+  * init: init variable should be lower case.  Exported ROOT variable
+    should be upper case.
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Tue, 26 Jul 2005 20:30:57 -0400
+
+initramfs-tools (0.13) breezy; urgency=low
+
+  "We live in age when unnecessary things are our only necessities."
+   - Oscar Wilde
+
+  * Use detailed logging now for debian/changelog.  We have at least
+    three people hacking now, and details would probably be useful.
+
+  * debian/TODO: Update
+
+  * debian/dirs: Sort and add usr/share/initramfs-tools/hooks
+
+  * debian/initramfs-tools.examples: Add docs/example_hook and
+    docs/example_hook_cpiogz
+
+  * debian/initramfs-tools.install: Pretty Print.
+
+  * debian/rules: Ensure that mkinitramfs is executable
+
+  * docs/example_script: New file
+
+  * init: Add concept of 'quiet', be verbose if not specified
+
+  * mkinitramfs: Do not load script functions until needed
+    Clear up comments / documentation
+    Use DESTDIR instead of TMPDIR
+    Add ability to link in extra hunks into the cpio file
+    Cosmetic cleanups
+    
+  * scripts/functions: Add lsb stype log_FOO_msg functions
+
+  * scripts/local: Add logging
+
+  * scripts/nfs: Add logging
+
+  Thanks to Karl Hegbloom for most of these patches!
+
+  * debian/control: Get a much better description
+
+  Thanks to Maximilian Attems for this!
+
+  * scripts/functions: Add copy_exec function that copies a program
+    and all libraries that it depends on.
+
+  * mkinitramfs: Use it
+
+  * scripts/local-top/lvm: New file
+
+  * mkinitramfs: Specify the modules to copy rather than mass copying
+    directories
+
+  * scripts/functions: Always load ide-generic to cope with ide subsystem
+    suckage.
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Wed, 29 Jun 2005 23:50:56 +0000
+
+initramfs-tools (0.12) breezy; urgency=low
+
+  "I am not young enough to know everything." - Oscar Wilde
+
+  * Don't complain if /etc/mkinitramfs/modules doesn't exist.
+
+  * Make sure that raid1 is pulled in.
+
+  * Include /etc/modprobe.d/aliases in the initramfs
+
+  * Default to currently running kernel version.
+    Based on a patch from maximilian attems, thanks!
+
+  * Handle module arguments in /etc/mkinitramfs/modules
+
+  * Do hookscripts at generation time.  Drop things into
+    /usr/share/initramfs-tools/hooks or /etc/mkinitramfs/hooks
+
+  * Make sure local-bottom and nfs-bottom get created
+    Thanks to Karl Hegbloom for these three patches!
+
+  * Prune stray echo from call_scripts
+
+  * Load raid1 for now so that md setups will work.
+
+  * Detect ide modules load
+    Thanks to Jeff Waugh for initial testing of this!
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Mon, 20 Jun 2005 23:05:04 +0000
+
+initramfs-tools (0.11) breezy; urgency=low
+
+  "Illusion is the first of all pleasures" - Oscar Wilde
+
+  * Make the init much less noisy
+
+  * Pull in all the dependancies for nfs and af_packet
+
+  * Be compatible with misdocumented mkinitrd interface
+
+  Thanks to Matt Zimmerman for the bug reports and testing!
+
+  * Update debian/copyright to have the location of the bzr
+    archive
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Fri, 17 Jun 2005 21:23:25 +0000
+
+initramfs-tools (0.10) breezy; urgency=low
+
+  The "I can see you!" release.
+
+  * Unconditionally require busybox.  Might revert this eventually
+    but it's too much of a pain right now do this without
+    a reasonably environment
+
+  * Use modprobe to load modules
+
+  * Iterate through /sys/bus/pci and /sys/bus/usb and load drivers
+    based on their modalias
+
+  * Start to use /sbin for things
+
+  * Include depmod in the image.  Use it at boot time.
+
+  * Edit config example to show the modules that do need to be included
+    manually for this build.
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Fri, 17 Jun 2005 12:45:07 +0000
+
+initramfs-tools (0.9) breezy; urgency=low
+
+  * Be consistent about y/n vs. yes/no values for the readonly variable
+
+ -- Matt Zimmerman <mdz at ubuntu.com>  Thu, 16 Jun 2005 15:22:30 -0700
+
+initramfs-tools (0.8) breezy; urgency=low
+
+  The "We are one in the spirit..." release
+
+  * Export the command line variables so that the various scripts
+    can see them.
+
+  * Honour command line 'ro' or 'rw' settings for nfs.
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Tue, 14 Jun 2005 21:35:14 +0000
+
+initramfs-tools (0.7) breezy; urgency=low
+
+  The "CONFORM!" release.
+
+  * Make command line arguments almost match mkinitrd.  The -m argument
+    doesn't make any sense, so it's not supported.  Add support for
+    overriding the confdir, and specifying version no longer expects -v.
+
+  * Add sed and grep to the initramfs for now.  Will prune these
+    eventually, but for now mdrun needs them.
+
+  * Add mdadm and mdrun to the initramfs.
+
+  * Add hookscript directories.
+
+  * Call hookscripts
+
+  Thanks to David Weinhall <tao at acc.umu.se> for the dependancy-based
+  hookscripts.
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Thu,  9 Jun 2005 17:08:01 +0000
+
+initramfs-tools (0.6) breezy; urgency=low
+
+  The "Sweep! ....  Off!" release.
+
+  * Source in the net-${DEVICE}.conf file to get IP address information.
+
+  * Add commandline parameters for NFSROOT and BOOT.
+
+  * Moving loading of boot functions to after commandline parsing.
+
+  * Allow NFSROOT variable to be set to auto to pick up value from DHCP
+    Server.
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Wed,  1 Jun 2005 12:02:40 -0400
+
+initramfs-tools (0.5) breezy; urgency=low
+
+  The "Climbing to the horizons" release.
+
+  * Update for newer udev, call "udevstart" rather than "udev udevstart"
+
+  * /etc/mkinitramfs/modules should not be a conffile.
+
+  * Support busybox.
+
+  * Fix bug where -k would delete the tmp files, and otherwise it would keep
+    them.
+
+  * Handle # for comments in the modules file.
+
+  * arch:all, not arch:any
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Tue, 31 May 2005 15:17:56 -0400
+
+initramfs-tools (0.4) breezy; urgency=low
+
+  * First upload to Ubuntu.
+
+  * Handle glibc compiled udev for now.
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Tue, 24 May 2005 14:30:07 +0000
+
+initramfs-tools (0.3) unstable; urgency=low
+
+  * Fix init and root variables
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Sat, 29 Jan 2005 17:49:08 -0500
+
+initramfs-tools (0.2) unstable; urgency=low
+
+  * Include the modules in the initrd
+  * Drop the .ko ending from the module loads.
+  * Actually chain to the sub scripts.
+  * kilbc is now named properly
+  * First cut of an NFS root implementation
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Fri, 28 Jan 2005 16:50:53 -0500
+
+initramfs-tools (0.1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Jeff Bailey <jbailey at ubuntu.com>  Thu, 27 Jan 2005 15:23:52 -0500
+

Added: dists/trunk/utils/initramfs-tools/debian/compat
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/compat	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/debian/compat	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1 @@
+4

Added: dists/trunk/utils/initramfs-tools/debian/control
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/control	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/debian/control	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,18 @@
+Source: initramfs-tools
+Section: utils
+Priority: optional
+Uploaders: Jeff Bailey <jbailey at ubuntu.com>, maximilian attems <maks at sternwelten.at>
+Maintainer: Debian kernel team <debian-kernel at lists.debian.org>
+Build-Depends-Indep: debhelper (>= 4.0.0), cdbs
+Standards-Version: 3.6.2.0
+
+Package: initramfs-tools
+Architecture: all
+Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox-cvs-static (>= 20040623-1), cpio, mdadm, lvm2 (>= 2.01.04-5), udev
+Description: tools for generating an initramfs
+ This package contains tools to create and boot an initramfs for prepackaged
+ 2.6 Linux kernel. The initramfs is an cpio archive. At boot time, the kernel
+ unpacks that archive into ram, mounts and uses it as initial root file system.
+ From there on the mounting of the real root file system occurs in user space.
+ klibc handles the boot-time networking setup. Supports nfs root system.
+ Any boot loader with initrd support is able to load an initramfs archive.

Added: dists/trunk/utils/initramfs-tools/debian/copyright
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/copyright	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/debian/copyright	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,13 @@
+This package was debianized by Jeff Bailey <jbailey at ubuntu.com> on
+Thu, 27 Jan 2005 15:23:52 -0500.
+
+Copyright:
+
+Author: Jeff Bailey <jbailey at ubuntu.com>
+
+The source code can be found by using "bzr" at:
+http://people.ubuntu.com/~jbailey/bzrtree/initramfs-tools
+
+License:
+
+PUBLIC DOMAIN

Added: dists/trunk/utils/initramfs-tools/debian/initramfs-tools.dirs
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/initramfs-tools.dirs	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/debian/initramfs-tools.dirs	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,12 @@
+etc/mkinitramfs/scripts/init-bottom
+etc/mkinitramfs/scripts/init-premount
+etc/mkinitramfs/scripts/init-top
+etc/mkinitramfs/scripts/local-bottom
+etc/mkinitramfs/scripts/local-premount
+etc/mkinitramfs/scripts/local-top
+etc/mkinitramfs/scripts/nfs-bottom
+etc/mkinitramfs/scripts/nfs-premount
+etc/mkinitramfs/scripts/nfs-top
+etc/mkinitramfs/hooks
+usr/share/initramfs-tools/modules.d
+/var/lib/initramfs-tools

Added: dists/trunk/utils/initramfs-tools/debian/initramfs-tools.docs
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/initramfs-tools.docs	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/debian/initramfs-tools.docs	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1 @@
+HACKING

Added: dists/trunk/utils/initramfs-tools/debian/initramfs-tools.examples
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/initramfs-tools.examples	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/debian/initramfs-tools.examples	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,4 @@
+conf/modules
+docs/example_script
+docs/example_hook
+docs/example_hook_cpiogz

Added: dists/trunk/utils/initramfs-tools/debian/initramfs-tools.install
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/initramfs-tools.install	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/debian/initramfs-tools.install	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,7 @@
+mkinitramfs		usr/sbin
+init			usr/share/initramfs-tools
+scripts			usr/share/initramfs-tools
+conf/initramfs.conf	etc/mkinitramfs
+hooks			usr/share/initramfs-tools
+hook-functions		usr/share/initramfs-tools
+update-initramfs	usr/sbin

Added: dists/trunk/utils/initramfs-tools/debian/initramfs-tools.manpages
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/initramfs-tools.manpages	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/debian/initramfs-tools.manpages	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,3 @@
+mkinitramfs.8
+initramfs.conf.5
+update-initramfs.8

Added: dists/trunk/utils/initramfs-tools/debian/initramfs-tools.postinst
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/initramfs-tools.postinst	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/debian/initramfs-tools.postinst	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = configure ]; then
+	if [ x${2} = x ]; then
+
+		# First time install.  Can we autodetect the RESUME partition?
+		RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ')
+
+		# Inhertic initrd-tools settings if possible.
+		if [ -e /etc/mkinitrd/mkinitrd.conf ]; then
+			 . /etc/mkinitrd/mkinitrd.conf
+		fi
+
+		if [ -e /etc/mkinitrd/modules ]; then
+			cp /etc/mkinitrd/modules /etc/mkinitramfs
+			sed -i \
+			  -e 's/mkinitrd/mkinitramfs/g' \
+			  -e '/^ide-generic/d' \
+			  -e '/^ide-disk/d' \
+			  -e '/^ext2/d' \
+			  -e '/^ext3/d' \
+			  /etc/mkinitramfs/modules
+		fi
+
+		if [ -e ${RESUME} ]; then
+			sed -i -e "s@#RESUME=@RESUME=${RESUME}@" /etc/mkinitramfs/initramfs.conf
+		fi
+
+		if [ -e /etc/mkinitrd/DSDT ]; then
+			cp /etc/mkinitrd/DSDT /etc/mkinitramfs/DSDT.aml
+		fi
+
+	fi
+fi
+
+if [ ! -e /etc/mkinitramfs/modules ]; then
+	cp /usr/share/doc/initramfs-tools/examples/modules /etc/mkinitramfs/
+fi
+
+#DEBHELPER#
+

Added: dists/trunk/utils/initramfs-tools/debian/initramfs-tools.postrm
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/initramfs-tools.postrm	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/debian/initramfs-tools.postrm	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ "x${1}" = "xpurge" ]; then
+	rm -f /etc/mkinitramfs/modules
+fi
+
+#DEBHELPER#
+

Added: dists/trunk/utils/initramfs-tools/debian/rules
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/rules	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/debian/rules	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,10 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+
+pre-build::
+	chmod +x init mkinitramfs
+	chmod +x hooks/*
+	for x in `find scripts/ -maxdepth 1 -type d | tail -n+2`; do \
+	  chmod -R +x $$x; \
+	done


Property changes on: dists/trunk/utils/initramfs-tools/debian/rules
___________________________________________________________________
Name: svn:executable
   + *

Added: dists/trunk/utils/initramfs-tools/docs/example_hook
===================================================================
--- dists/trunk/utils/initramfs-tools/docs/example_hook	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/docs/example_hook	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,114 @@
+#!/bin/sh
+
+#
+# This is an example hook script.  It will be run by 'mkinitramfs'
+# when it creates the image.  It's job is to decide which files to
+# install, then install them into the staging area, where the
+# initramfs is being created.  This happens when a new 'linux-image'
+# package is installed, or when the administrator runs 'mkinitramfs'
+# by hand to update an initramfs image.
+#
+# TODO: What about the case where you install something that should be
+#	added to the initramfs, but the linux-image it relates to has
+#	already been installed previously?  Does this happen often
+#	enough that it needs to be handled?  How can it be handled?
+#	
+#	* Think about the 'usplash'.  The initramfs will need to be
+#	 updated if a theme change or update is desired.  Maybe it
+#	 should not be totally automatic, but offered on upgrade
+#	 predicated on a user response to a debconf question?  That
+#	 issue needs to be explored and a solution specified.
+#
+#  * Do not assume that any needed subdirectories have been created
+#	yet, but don't bail out if they are already there.
+#
+#  * All of the standard system tools are available, of course, since
+#	this hook is running in the real system, not the initramfs.
+#
+#  * TODO: ... ?  Anything else to tell them in this bullet-list?
+#
+
+#
+# The environment contains at least:
+#
+#  CONFDIR -- usually /etc/mkinitramfs, can be set on mkinitramfs
+#		 command line.
+#
+#  DESTDIR -- The staging directory where we are building the image.
+#
+# TODO: Decide what environment variables are meaningful and defined
+#	in this context, then document them as part of the interface.
+#
+# TODO: May need a version_compare function for comparison of VERSION?
+
+
+#
+# List the soft prerequisites here.  This is a space separated list of
+# names, of scripts that are in the same directory as this one, that
+# must be run before this one can be.
+#
+PREREQ=""
+
+prereqs()
+{
+	echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+	prereqs
+	exit 0
+	;;
+esac
+
+
+# You can do anything you need to from here on.
+#
+
+# Source the optional 'hook-functions' scriptlet, if you need the
+# functions defined within it.  Read it to see what is available to
+# you.  It contains functions for copying dynamically linked program
+# binaries, and kernel modules into the DESTDIR.
+#
+. /usr/share/initramfs-tools/hook-functions
+
+
+# If this hook script is a conffile (and thus stored in
+# /etc/mkinitramfs/hooks), it must take care to do the right thing
+# when the package containing it is removed but not purged.  There of
+# course may be other reasons to have custom logic deciding what to
+# install.  The version variable may be useful for this.
+#
+if [ -x /usr/bin/myprog ]; then
+	copy_exec /usr/bin/myprog usr/bin
+fi
+
+# To accompany this, there should usually be a script for inside the
+# initramfs named something like:
+#
+#   "/etc/mkinitramfs/local-premount/myprog"
+#
+# ... and it should do what is necessary to have 'myprog' get run
+# inside the early runtime environment.
+
+# Handle an error:
+#
+if [ -n "$an_error_occured" ];
+then
+	# 
+	# TODO: Do we need 'warn()', 'error()', and/or 'fatal()' for this?
+	# 
+	echo "An error occured in $0: $an_error_occured" >&2
+	exit 1
+	#
+	# TODO: Decide if different error codes are meaningful, what they
+	#	mean, and what the semantics of them are wrt 'mkinitramfs'
+	#	pass or fail.  Consider naming the error values with
+	#	mnemonic symbols rather than magic numbers.  They may or
+	#	may not be the same set of errors as the set for
+	#	in-initramfs scripts.
+	#
+fi
+
+exit 0

Added: dists/trunk/utils/initramfs-tools/docs/example_hook_cpiogz
===================================================================
--- dists/trunk/utils/initramfs-tools/docs/example_hook_cpiogz	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/docs/example_hook_cpiogz	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+#
+# The environment contains at least:
+#
+#  CONFDIR -- usually /etc/mkinitramfs, can be set on mkinitramfs
+#		 command line.
+#
+#  DESTDIR -- The staging directory where we are building the image.
+#
+# TODO: Decide what environment variables are meaningful and defined
+#	in this context, then document them as part of the interface.
+#
+# TODO: Write a common header for these examples or move this
+#	documentation to a man page and reference it here. :-)
+#
+
+#
+# List the soft prerequisites here.  This is a space separated list of
+# names, of scripts that are in the same directory as this one, that
+# must be run before this one can be.
+#
+PREREQ=""
+
+prereqs()
+{
+	echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+	prereqs
+	exit 0
+	;;
+esac
+
+#
+# Source the 'hook-functions' scriptlet (for 'catenate_cpiogz'):
+#
+. /usr/share/initramfs-tools/hook-functions
+
+#
+# Lets pretend it has a conffile (think debconf), and we source it
+# here.  Don't make debconf lookup calls here.  The postinst for the
+# package owning this hook script should have done that and configured
+# the "/etc/default/conffile" already.
+#
+# TODO: How does the package ensure that it's installed BEFORE the
+#	corresponding 'linux-image' package?  Can it declare that, in
+#	the case where it's an add-on that the 'linux-image' is not
+#	aware of?  This might be an apt and dpkg issue.
+#	
+#	* Eg. an optional usplash or suspend2ui_fbsplash package.
+#
+. /etc/default/mypackage-initramfs
+
+#
+# Also pretend that we only include our initramfs overlay if an opion
+# is not "no", and the 'linux-image' package we are generating this
+# initramfs for matches the version this script's package is designed
+# for.  Just for example; pretend this example mkinitramfs hook script
+# is part of a 'linux-image' or 'xxx-modules' package.
+#
+if [ "$MYOPTION" != "no" -a "$version" = "2.6.12+ss2.1.9.1" ]; then
+	catenate_cpiogz /usr/lib/mypackage/initramfs.cpio.gz
+fi
+
+#
+# In this case, there does not have to be an (eg.):
+#
+#   "/etc/mkinitramfs/init-top/mypackage"
+#
+# ... since that script is probably inside of the initramfs overlay
+# already.  If it's a conffile though, it does not belong in there,
+# and should be placed in the appropriate location inside of
+# "/etc/mkinitramfs".  Remember that if it needs access to the
+# settings in our "/etc/default/mypackage-initramfs", then that file
+# must also get copied into a location inside of ${DESTDIR} by this
+# hook script in order to make it available inside of the initramfs
+# environment.
+#
+
+exit 0

Added: dists/trunk/utils/initramfs-tools/docs/example_script
===================================================================
--- dists/trunk/utils/initramfs-tools/docs/example_script	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/docs/example_script	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+#
+# This script is run inside of the initramfs environment during the
+# system boot process.  It is installed there by 'mkinitramfs'.  The
+# package that owns it may opt to install it in either an appropriate
+# location under "/usr/share/initramfs-tools/scripts/", or a similar
+# location under "/etc/mkinitramfs/scripts/", depending upon whether
+# it should be considered to be a user modifiable conffile or not.
+#
+# TODO: How do we deal with the case where the package that installed
+#	this has been removed but not purged, if we always arbitrarily
+#	copy all of these scripts into the initramfs?
+#
+#  * The available toolset is limited inside this environment...
+#
+#	TODO: document that toolset in the man page.
+#
+#  * /dev, /proc, and /sys are already mounted.  / is a ?? ro/rw
+#	filesystem... etc. more documentation.
+#
+#  * It is expected that /proc and /sys will be umounted before
+#	changing over to the real root file system, so you must not keep
+#	any files open on them beyond these scripts.
+#
+#  * You may like to strip these documentation comments from this
+#	example if you take it for a template, to save a little space in
+#	the initramfs, since nobody will ever read it from inside of
+#	there anyhow.
+#
+
+#
+# The environment contains at least the following variables:
+#
+# TODO: Decide what environment variables are meaningful and defined
+#	in this context, then document them as part of the interface.
+#
+# Because this script will be run as a full separate process, rather
+# than sourced inside the context of the driver script, if it needs to
+# pass information to another script that may run after it, it must do
+# so by writing data to a file location known to both scripts.  Simply
+# setting an environment variable will not work.
+#
+
+#
+# List the soft prerequisites here.  This is a space separated list of
+# names, of scripts that are in the same directory as this one, that
+# must be run before this one can be.
+#
+PREREQ=""
+
+prereqs()
+{
+	echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+	prereqs
+	exit 0
+	;;
+esac
+
+# Do the work here.
+
+echo "Got here!"
+
+# Handle an error:
+
+if [ -n "$an_error_occured" ];
+then
+	# 
+	# TODO: Do we need 'warn()', 'error()', and/or 'fatal()' for this?
+	# I think we ultimately do, and that they need to be in their own
+	# well-documented location so that an overlay can override them.
+	# Think 'usplash' progress updates.
+	# 
+	echo "An error occured in $0: $an_error_occured" >&2
+	exit 1
+	#
+	# TODO: Decide if different error codes are meaningful, what they
+	#	mean, and what the semantics of them are wrt 'init' pass
+	#	or panic.  Consider naming the error values with mnemonic
+	#	symbols rather than magic numbers.
+	#
+fi
+
+exit 0
+

Added: dists/trunk/utils/initramfs-tools/hook-functions
===================================================================
--- dists/trunk/utils/initramfs-tools/hook-functions	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/hook-functions	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,175 @@
+# -*- shell-script -*-
+
+catenate_cpiogz() {
+	# Sanity check
+	if [ ! -e "${1}" ]; then
+		echo "W:catenate_cpiogz: arg1='${1}' does not exist." >&2
+		return
+	fi
+
+	cat "${1}" >>${__TMPCPIOGZ}
+}
+
+force_load()
+{
+		manual_add_modules ${@}
+		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
+		echo "W:add_modules_from_file: arg1='${1}' does not exist." >&2
+		return
+	fi
+
+	sed -e '/^#/d' ${1} | while read module rest; do
+		force_load ${module} "${rest}"
+	done
+}
+
+manual_add_modules()
+{
+	for mam_x in $(modprobe --set-version=${version} --show-depends ${1} 2>/dev/null | awk '{ print $2 }'); do
+		# Prune duplicates
+		if [ -e ${DESTDIR}/${mam_x} ]; then
+			continue
+		fi
+
+		mkdir -p ${DESTDIR}/$(dirname ${mam_x})
+		ln -s ${mam_x} ${DESTDIR}/$(dirname ${mam_x})
+	done
+}
+
+# $1 is source
+# $2 is relative destination
+copy_exec() {
+	ln -s ${1} ${DESTDIR}/${2}  
+
+	# Copy the dependant libraries
+	for x in $(ldd ${1} 2>/dev/null | sed -e '
+	    /\//!d;
+	    /linux-gate/d;
+	    /=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/};
+	    s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/' 2>/dev/null); do
+
+		# Try to use non-optimised libraries where possible.
+		# We assume that all HWCAP libraries will be in tls.
+		nonoptlib=$(echo ${x} | sed -e 's#/lib/tls.*/\(lib.*\)#/lib/\1#')
+
+		if [ -e ${nonoptlib} ]; then
+			x=${nonoptlib}
+		fi
+
+		libname=$(basename ${x})
+		dirname=$(dirname ${x})
+
+		mkdir -p ${DESTDIR}/${dirname}
+		if [ ! -e ${DESTDIR}/${dirname}/${libname} ]; then
+			ln -s ${x} ${DESTDIR}/${dirname}
+		fi
+	done
+}
+
+# Copy entire subtrees to the initramfs
+copy_modules_dir()
+{
+	tmpdir_modbase=${DESTDIR}/lib/modules/${version}
+	mkdir -p $(dirname ${tmpdir_modbase}/${1})
+	cp -a ${MODULESDIR}/${1} ${tmpdir_modbase}/${1}
+}
+
+dep_add_modules()
+{
+
+	# Things that are too hard to autodetect.
+	for x in md raid0 raid1 raid5 raid6 ext2 ext3 isofs nfs reiserfs xfs af_packet dm_mod; do
+		manual_add_modules ${x}
+	done
+
+	for x in /sys/bus/pci/devices/*; do
+		if [ -e ${x}/modalias ]; then
+			manual_add_modules $(cat ${x}/modalias)
+		fi
+	done
+
+	for x in /sys/bus/usb/devices/*; do
+		if [ -e ${x}/modalias ]; then
+			manual_add_modules $(cat ${x}/modalias)
+		fi
+	done
+
+	if [ -e /proc/ide ]; then
+		for x in ide-generic ide-disk ide-cd; do
+			manual_add_modules ${x}
+		done
+	fi
+
+	if [ -e /sys/bus/scsi/devices/ ]; then
+		manual_add_modules sd_mod
+	fi
+
+	if [ -e /sys/bus/i2o/devices/ ]; then
+		manual_add_modules i2o_block
+	fi
+}
+
+
+# Modules that we always add to the initramfs
+auto_add_modules()
+{
+	# base
+	for x in md raid0 raid1 raid5 raid6 ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs nfs reiserfs xfs af_packet dm_mod; do
+		manual_add_modules ${x}
+	done
+
+	# Ethernet
+	for x in 3c59x 8139cp 8139too 8390 b44 bmac bnx2 defxx dl2k e1000 e100 epic100 eql fealnx famachi forcedeth hp100 mace mv643xx_eth natsemi ne2k-pci netconsole ns83820 pcnet32 r8169 s2io sis900 skge slhc starfire sundance sungem sungem_phy sunhme tg3 tlan de2104x de4x5 dmfe tulip winbond-840 xircom_cb xircom_tulip_cb typhon via-rhine via-velocity yellowfin; do
+		manual_add_modules ${x}
+	done
+
+	# ide
+	for x in ide-cd ide-disk ide-generic aec62xx alim15x3 amd74xx atiixp atuuxo cmd64x cs5520 cs5530 cy82c693 generic hpt34x hpt366 ns87415 opti621 pdc202xx_new pdc202xx_old piix rz1000 sc1200 serverworks siimage sis5513 slc82c105 slc90e66 triflex trm290 via82cxxx; do
+		manual_add_modules ${x}
+	done
+
+	# scsi
+	for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys 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
+
+	# i2o
+	for x in i2o_block; do
+		manual_add_modules ${x}
+	done
+
+}
+
+usage()
+{
+	cat >&2 << EOF
+
+Usage: ${0} [OPTION]... <-o outfile> [version]
+
+Options:
+  -d confdir  Specify an alternative configuration directory.
+  -k          Keep temporary directory used to make the image.
+  -o outfile  Write to outfile.
+  -r root     Override ROOT setting in mkinitrd.conf.
+
+See ${0}(8) for further details.
+EOF
+	exit 1
+
+}
+

Added: dists/trunk/utils/initramfs-tools/hooks/acpid
===================================================================
--- dists/trunk/utils/initramfs-tools/hooks/acpid	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/hooks/acpid	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+	echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+	prereqs
+	exit 0
+	;;
+esac
+
+# Hooks for loading acpi bits into the initramfs
+
+. /usr/share/initramfs-tools/hook-functions
+
+for x in fan thermal; do
+	manual_add_modules ${x}
+done


Property changes on: dists/trunk/utils/initramfs-tools/hooks/acpid
___________________________________________________________________
Name: svn:executable
   + *

Added: dists/trunk/utils/initramfs-tools/hooks/evms
===================================================================
--- dists/trunk/utils/initramfs-tools/hooks/evms	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/hooks/evms	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+	echo "$PREREQ"
+}
+
+case $1 in
+prereqs)
+	prereqs
+	exit 0
+	;;
+esac
+
+. /usr/share/initramfs-tools/hook-functions
+
+if [ ! -x /sbin/evms_activate ]; then
+	exit 0
+fi
+
+copy_exec /sbin/evms_activate /sbin
+
+EVMS_VERSION=$(/usr/sbin/evms_query info | grep "EVMS Version" | awk '{ print $3; }')
+
+mkdir -p ${DESTDIR}/lib/evms/${EVMS_VERSION}
+
+for x in disk lvm2 dos multipath; do
+	copy_exec /lib/evms/${EVMS_VERSION}/${x}* /lib/evms/${EVMS_VERSION}
+done


Property changes on: dists/trunk/utils/initramfs-tools/hooks/evms
___________________________________________________________________
Name: svn:executable
   + *

Added: dists/trunk/utils/initramfs-tools/hooks/kernelextras
===================================================================
--- dists/trunk/utils/initramfs-tools/hooks/kernelextras	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/hooks/kernelextras	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+	echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+	prereqs
+	exit 0
+	;;
+esac
+
+# Hooks for loading loading extra kernel bits into the initramfs
+
+. /usr/share/initramfs-tools/hook-functions
+
+fbcon=n
+
+for x in ${MODULESDIR}/initrd/*; do
+	x=${x##*/}
+	x=${x%.*}
+	case ${x} in
+	*fb)
+		fbcon=y
+		;;
+	esac
+
+	force_load ${x}
+done
+
+if [ ${fbcon} = "y" ]; then
+	force_load fbcon
+fi
+


Property changes on: dists/trunk/utils/initramfs-tools/hooks/kernelextras
___________________________________________________________________
Name: svn:executable
   + *

Added: dists/trunk/utils/initramfs-tools/hooks/udev
===================================================================
--- dists/trunk/utils/initramfs-tools/hooks/udev	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/hooks/udev	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+	echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+	prereqs
+	exit 0
+	;;
+esac
+
+# udev really wants to be able to do socket communications to udevd
+# This means that there's a bit of a race condition as the events come
+# flooding in and the kernels ability to autoload the 'unix' module.
+
+# We solve the problem thusly.  Hopefully RIP Ubuntu# 12915
+
+. /usr/share/initramfs-tools/hook-functions
+
+force_load unix
+


Property changes on: dists/trunk/utils/initramfs-tools/hooks/udev
___________________________________________________________________
Name: svn:executable
   + *

Added: dists/trunk/utils/initramfs-tools/init
===================================================================
--- dists/trunk/utils/initramfs-tools/init	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/init	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,111 @@
+#!/bin/sh
+
+echo "Loading, please wait..."
+
+mkdir /sys
+mkdir /proc
+mkdir /tmp
+mkdir -p /var/lock
+mount -t sysfs sysfs /sys
+mount -t proc proc /proc
+mount -t ramfs none /dev
+touch /dev/.initramfs-tools
+mknod /dev/console c 5 1 
+mknod /dev/null c 1 3
+
+. /conf/initramfs.conf
+. /scripts/functions
+
+# Parse command line options
+export break=
+export init=/sbin/init
+export quiet=n
+export readonly=y
+export ROOT=
+export resume=${RESUME}
+export rootmnt=/root
+export debug=
+for x in $(cat /proc/cmdline); do
+	case $x in
+	init=*)
+		init=${x#init=}
+		;;
+	root=*)
+		ROOT=${x#root=}
+		;;
+	nfsroot=*)
+		NFSROOT=${x#nfsroot=}
+		;;
+	boot=*)
+		BOOT=${x#boot=}
+		;;
+	resume=*)
+		resume=${x#resume=}
+		;;
+	quiet)
+		quiet=y
+		;;
+	ro)
+		readonly=y
+		;;
+	rw)
+		readonly=n
+		;;
+	debug)
+		debug=y
+		exec >/tmp/initramfs.debug 2>&1
+		set -x
+		;;
+	break)
+		break=yes
+		;;
+	esac
+done
+
+# Don't do log messages here to avoid confusing usplash
+run_scripts /scripts/init-top
+
+. /scripts/${BOOT}
+
+log_begin_msg "Loading modules"
+load_modules
+log_end_msg
+
+# Populate /dev tree
+log_begin_msg "Initializing /dev"
+parse_numeric ${ROOT}
+udevstart
+log_end_msg
+
+if [ x${break} = xyes ]; then 
+	panic "Spawning shell within the initramfs"
+fi
+
+log_begin_msg "Running /scripts/init-premount"
+run_scripts /scripts/init-premount
+log_end_msg
+
+log_begin_msg "Mounting root file system"
+mountroot
+log_end_msg
+
+log_begin_msg "Running /scripts/init-bottom"
+run_scripts /scripts/init-bottom
+log_end_msg
+
+# Move our /dev to the real filesystem.  Do the setup that udev otherwise
+# would.
+mkdir -p /dev/.static/dev
+chmod 700 /dev/.static/
+mount -n -o bind ${rootmnt}/dev /dev/.static/dev
+mount -n -o move /dev ${rootmnt}/dev
+
+umount /sys
+umount /proc
+
+if [ ! -x ${rootmnt}${init} ]; then
+	panic "Target filesystem doesn't have ${init}"
+fi
+
+# Chain to real filesystem
+exec run-init ${rootmnt} ${init} "$@" </root/dev/console >/root/dev/console


Property changes on: dists/trunk/utils/initramfs-tools/init
___________________________________________________________________
Name: svn:executable
   + *

Added: dists/trunk/utils/initramfs-tools/initramfs.conf.5
===================================================================
--- dists/trunk/utils/initramfs-tools/initramfs.conf.5	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/initramfs.conf.5	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,57 @@
+.TH INITRAMFS.CONF 5  "$Date: 2005/09/13 $" "" "initramfs.conf manual"
+
+.SH NAME
+initramfs.conf \- configuration file for mkinitramfs
+
+.SH DESCRIPTION
+The behaviour of
+.B mkinitramfs 
+can be modified by its configuration file.
+
+Each line in the file can be a configuration variable, a blank line,
+or a comment. The value of an variable is assigned by an statement
+of the form: \fIname\fP=[\fIvalue\fP]
+
+.SH GENERAL VARIABLES
+.TP
+\fB MODULES
+Specifies the modules for the initramfs image.
+The default setting is \fImost\fP.
+
+\fImost\fP adds all the framebuffer, acpi, file system, ide, sata, scsi and usb drivers.
+
+\fIdep\fP tries to guess which modules are necessary for the running box.
+
+\fIlist\fP includes only modules from the additional modules list.
+
+.TP
+\fB RESUME
+Optional setting of the swap partition to resume from.
+The resume= passed on the command line of your boot loader 
+will override this setting.
+
+.SH NFS VARIABLES
+.TP
+\fB BOOT
+Allows to use an nfs drive as the root of the drive. 
+The default is to boot of an \fIlocal\fP media (harddrive, USB stick).
+Set to \fInfs\fP for an NFS root share.
+
+.TP
+\fB DEVICE
+Specifies the network interface, like eth0.
+
+.TP
+\fB NFSROOT
+Defaults to \fIauto\fP in order to pick up value from DHCP server.
+Otherwise you need to specify \fIHOST:MOUNT\fP.
+
+.SH SEE ALSO
+
+.BR mkinitramfs (8)
+
+.SH AUTHOR
+The initramfs-tools are written by Jeff Bailey <jbailey at raspberryginger.com>.
+This manual is maintained by Maximilian Attems <maks at sternwelten.at>.
+Loosely based on mkinitrd.conf by Herbert Xu.
+

Added: dists/trunk/utils/initramfs-tools/mkinitramfs
===================================================================
--- dists/trunk/utils/initramfs-tools/mkinitramfs	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/mkinitramfs	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,178 @@
+#!/bin/sh
+
+umask 0022
+
+# Defaults
+keep="n"
+CONFDIR="/etc/mkinitramfs"
+verbose="n"
+errors_to="2>/dev/null"
+# BUSYBOXDIR="/usr/lib/initramfs-tools/bin/"
+BUSYBOXDIR="/bin" 
+
+while getopts "d:ko:r:" flag; do
+	case $flag in
+	d)
+		CONFDIR="${OPTAGS}"
+		if [ ! d "${CONFDIR}" ]; then
+			echo "${0}: ${CONFDIR}: Not a directory" >&2
+			exit 1
+		fi
+		;;
+	o)
+		touch ${OPTARG}
+		outfile="$(readlink -f ${OPTARG})"
+		;;
+	k)
+		keep="y"
+		;;
+	esac
+done
+
+shift $((${OPTIND} - 1))
+
+# For dependency ordered mkinitramfs hook scripts.
+. /usr/share/initramfs-tools/scripts/functions
+. /usr/share/initramfs-tools/hook-functions
+
+. ${CONFDIR}/initramfs.conf
+
+if [ x${outfile} = x ]; then
+	usage
+fi
+
+# And by "version" we really mean path to kernel modules
+# This is braindead, and exists to preserve the interface with mkinitrd
+if [ ${#} -ne 1 ]; then
+	version=$(uname -r)
+else 
+	version="${1}"
+fi
+
+if dpkg --compare-versions "${version}" lt 2.6.12; then
+	echo "Kernel version too old.  initramfs-tools requires at least 2.6.12."
+	exit 1
+fi
+
+case ${version} in
+/lib/modules/*/[!/]*)
+        ;;
+/lib/modules/[!/]*)
+        version=${version#/lib/modules/}
+        version=${version%%/*}
+        ;;
+esac
+
+case ${version} in
+*/*)
+        echo $PROG: ${version} is not a valid kernel version >&2
+        exit 1
+        ;;
+esac
+
+if [ -d ${outfile} ]; then
+	echo "${outfile} is a directory"
+	exit 1
+fi
+
+MODULESDIR="/lib/modules/${version}"
+
+if [ ! -e ${MODULESDIR} ]; then
+	echo "Cannot find ${MODULESDIR}"
+	exit 1
+fi
+
+DESTDIR=$(mktemp -t -d mkinitramfs_XXXXXX) || exit 1
+__TMPCPIOGZ=$(mktemp -t mkinitramfs-OL_XXXXXX) || exit 1
+
+# Export environment for hook scripts.
+#
+export MODULESDIR
+export version
+export CONFDIR
+export DESTDIR
+
+# Private, used by 'catenate_cpiogz'.
+export __TMPCPIOGZ
+
+for d in bin conf etc lib modules sbin scripts; do
+    mkdir -p ${DESTDIR}/${d}
+done
+
+# MODULES=list case.  Always honour.
+for x in ${CONFDIR}/modules /usr/share/initramfs-tools/modules.d/*; do
+	if [ -f "${x}" ]; then
+		add_modules_from_file ${x}
+	fi
+done
+
+if [ "${MODULES}" = "dep" ]; then
+	dep_add_modules
+fi
+
+if [ "${MODULES}" = "most" ]; then
+	auto_add_modules
+fi
+
+# Have to do each file, because cpio --dereference doesn't recurse down
+# symlinks.
+
+ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin
+ln -s /usr/lib/klibc/lib/* ${DESTDIR}/lib
+copy_exec /usr/share/initramfs-tools/init /init
+cp -a /usr/share/initramfs-tools/scripts/* ${DESTDIR}/scripts
+for f in $(cd /etc/mkinitramfs/scripts && \
+	find . \( -name '*.dpkg*' -prune -o -name '*~' -prune \) \
+		-o -type f -print); do
+	mkdir --parents ${DESTDIR}/scripts/$(dirname ${f})
+cp -p /etc/mkinitramfs/scripts/${f} ${DESTDIR}/scripts/$(dirname ${f})
+done
+copy_exec ${CONFDIR}/initramfs.conf /conf
+cp -a /etc/udev ${DESTDIR}/etc
+
+# Hack until udev is built with klibc
+copy_exec /sbin/udev /sbin
+copy_exec /sbin/udevstart /sbin
+
+# Busybox
+rm ${DESTDIR}/bin/sh
+ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
+# This is ugly, but needed atm to make the builtins work =(
+ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox
+
+# Modutils
+copy_exec /sbin/modprobe /sbin
+copy_exec /sbin/depmod /sbin
+copy_exec /sbin/rmmod /sbin
+mkdir -p ${DESTDIR}/etc/modprobe.d
+copy_exec /etc/modprobe.d/aliases /etc/modprobe.d
+
+# Raid
+copy_exec /sbin/mdadm /sbin
+copy_exec /sbin/mdrun /sbin
+
+# LVM
+copy_exec /lib/lvm-200/vgchange /sbin
+
+run_scripts /usr/share/initramfs-tools/hooks
+run_scripts /etc/mkinitramfs/hooks
+
+# Apply DSDT to initramfs
+if [ -e ${CONFDIR}/DSDT.aml ]; then
+	copy_exec ${CONFDIR}/DSDT.aml /
+fi
+
+(cd ${DESTDIR} && find . | cpio --quiet --dereference -o -H newc | gzip -9 >${outfile})
+
+if [ -s ${__TMPCPIOGZ} ]; then
+    cat ${__TMPCPIOGZ} >>${outfile}
+fi
+
+if [ "${keep}" = "y" ]; then
+	echo "Working files in ${DESTDIR} and overlay in ${__TMPCPIOGZ}"
+else
+	rm -rf "${DESTDIR}"
+	rm -rf "${__TMPCPIOGZ}"
+fi
+
+exit 0


Property changes on: dists/trunk/utils/initramfs-tools/mkinitramfs
___________________________________________________________________
Name: svn:executable
   + *

Added: dists/trunk/utils/initramfs-tools/mkinitramfs.8
===================================================================
--- dists/trunk/utils/initramfs-tools/mkinitramfs.8	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/mkinitramfs.8	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,71 @@
+.TH MKINITRAMFS 8  "$Date: 2005/07/15 $" "" "mkinitramfs manual"
+
+.SH NAME
+mkinitramfs \- generate an initramfs image
+
+.SH SYNOPSIS
+.B mkinitramfs
+.RB [ \-d 
+.IR confdir ] 
+.RB [ \-k ] 
+.RB [ \-o 
+.IR outfile ] 
+.RB [ \-r 
+.IR root ] 
+.RI [ version ]
+.SH DESCRIPTION
+The
+.B mkinitramfs 
+script generates an initramfs image.  The initramfs is an cpio archive. 
+At boot time, the kernel unpacks that archive into ram disk, mounts and 
+uses it as initial root file system. All finding of the root device 
+happens in this early userspace.
+
+.SH OPTIONS
+.TP
+\fB \-d \fI confdir
+Set an alternate configuration directory.
+
+.TP
+\fB \-k
+Keep the temporary directory used to make the image.
+
+.TP
+\fB \-o \fI outfile
+Write the image to 
+.IR outfile .
+
+.TP
+\fB \-r \fI root
+Override the 
+.B ROOT 
+setting in 
+.IR mkinitramfs.conf .
+
+.SH FILES
+.TP
+.I /etc/mkinitramfs/initramfs.conf
+The default configuration file for the script. See
+.BR initramfs.conf (5)
+for a description of the available configuration parameter.
+
+.TP
+.I /etc/mkinitramfs/modules
+Specified modules will be put in the generated image and loaded when the system boots. The format - one per line - is identical to that of
+.I /etc/modules,
+which is described in
+.BR modules (5).
+
+.TP
+.I /etc/mkinitramfs/DSDT.aml
+If this file exists, it will be appended to the initramfs in a way that causes
+it to be loaded by ACPI.
+
+
+.SH AUTHOR
+The initramfs-tools are written by Jeff Bailey <jbailey at ubuntu.com>.
+This manual is maintained by Maximilian Attems <maks at sternwelten.at>.
+
+.SH SEE ALSO
+
+.BR initramfs.conf (5)

Added: dists/trunk/utils/initramfs-tools/scripts/functions
===================================================================
--- dists/trunk/utils/initramfs-tools/scripts/functions	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/scripts/functions	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,294 @@
+# -*- shell-script -*-
+
+_log_msg()
+{
+    if [ "$quiet" = "y" ]; then return; fi
+    echo "$@"
+}
+
+log_success_msg()
+{
+    _log_msg "Success: $@"
+}
+
+log_failure_msg()
+{
+    _log_msg "Failure: $@"
+}
+
+log_warning_msg()
+{
+    _log_msg "Warning: $@"
+}
+
+log_begin_msg()
+{
+	if [ -x /sbin/usplash_write ]; then
+		/sbin/usplash_write "TEXT $@"
+	fi
+	_log_msg "Begin: $@ ..."
+}
+
+log_end_msg()
+{
+	if [ -x /sbin/usplash_write ]; then
+		/sbin/usplash_write "SUCCESS ok"
+	fi
+	_log_msg "Done."
+}
+
+# update_progress() # ToDo: NOP placeholder... what else for usplash?
+# {
+#     :
+# }
+
+panic()
+{
+	if [ -x /sbin/usplash_write ]; then
+		/sbin/usplash_write "QUIT"
+	fi
+	echo $@
+	FS1='(initramfs) ' exec /bin/sh </dev/console >/dev/console 2>&1
+}
+
+render()
+{
+	eval "echo -n \${$@}"
+}
+
+set_initlist()
+{
+	unset initlist
+	for si_x in ${initdir}/*; do
+		if [ ! -x ${si_x} ]; then
+			continue
+		fi
+		initlist="${initlist} $(basename ${si_x})"
+	done
+}
+
+reduce_satisfied()
+{
+	deplist="$(render array_${1})"
+	for rs_x in ${runlist}; do
+		pop_list_item ${rs_x} ${deplist}
+		deplist=${tmppop}
+	done
+	eval array_${1}=\"${deplist}\"
+}
+
+get_prereqs()
+{
+	set_initlist
+	for gp_x in ${initlist}; do
+		tmp=$(${initdir}/${gp_x} prereqs)
+		eval array_${gp_x}=\"${tmp}\"
+	done
+}
+
+count_unsatisfied()
+{
+	set - ${@}
+	return ${#}
+}
+
+# Removes $1 from initlist
+pop_list_item()
+{
+	item=${1}
+	shift
+	set - ${@}
+	unset tmppop
+	# Iterate
+	for pop in ${@}; do
+		if [ ${pop} = ${item} ]; then
+			continue
+		fi
+		tmppop="${tmppop} ${pop}"
+	done
+
+}
+
+# This function generates the runlist, so we clear it first.
+reduce_prereqs()
+{
+	unset runlist
+	set_initlist
+	set - ${initlist}
+	i=$#
+	# Loop until there's no more in the queue to loop through
+	while [ ${i} -ne 0 ]; do
+		oldi=${i}
+		for rp_x in ${initlist}; do
+			reduce_satisfied ${rp_x}
+			count_unsatisfied $(render array_${rp_x})
+			cnt=${?}
+			if [ ${cnt} -eq 0 ]; then
+				runlist="${runlist} ${rp_x}"
+				pop_list_item ${rp_x} ${initlist}
+				initlist=${tmppop}
+				i=$((${i} - 1))
+			fi
+		done
+		if [ ${i} -eq ${oldi} ]; then
+			echo "PANIC: Circular dependancy.  Exiting." >&2
+			exit 1
+		fi
+	done
+}
+
+call_scripts()
+{
+	for cs_x in ${runlist}; do
+		${initdir}/${cs_x}
+	done
+}
+
+run_scripts()
+{
+	initdir=${1}
+	get_prereqs
+	reduce_prereqs
+	call_scripts
+}
+
+ide_boot_events() {
+
+	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
+		unit=${drive#/proc/ide/}
+		[ -d /sys/block/$unit ] && continue
+
+		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 ;;
+		esac
+
+		modprobe -q ${MODULE}
+	done
+}
+
+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;
+		esac	
+
+	done
+
+}
+
+i2o_boot_events()
+{
+	[ -e /sys/bus/i2o/devices/ ] || return
+
+	for device in /sys/bus/i2o/devices/*; do
+		[ -e ${device}/block ] && modprobe i2o_block
+	done
+}
+
+load_modules()
+{
+	depmod -a
+
+	# Load custom modules first
+	if [ -e /conf/modules ]; then
+		cat /conf/modules | while read m; do
+			if [ -z "$m" ] \
+			    || expr "$m" : "#" >/dev/null \
+			    || expr "$m" : "[ \t]+#?" > /dev/null
+			then
+				continue;
+			else
+				modprobe -q $m
+			fi
+		done
+	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
+
+	# FIXME - need to start LVM here
+
+	udevstart
+
+	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
+	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
+			modprobe -q $(cat ${x}/modalias)
+		fi
+	done
+
+	ide_boot_events
+
+	scsi_boot_events
+
+	i2o_boot_events
+}
+
+parse_numeric() {
+	case $1 in
+	"")
+		return
+		;;
+	/*)
+		return
+		;;
+	*:*)
+		minor=${1#*:}
+		major=${1%:*}
+		;;
+	*)
+		minor=$((0x${1#??}))
+		major=$((0x${1%??}))
+		;;
+	esac
+
+	mknod /dev/root b ${major} ${minor}
+	ROOT=/dev/root
+}

Added: dists/trunk/utils/initramfs-tools/scripts/init-premount/acpid
===================================================================
--- dists/trunk/utils/initramfs-tools/scripts/init-premount/acpid	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/scripts/init-premount/acpid	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+	echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+	prereqs
+	exit 0
+	;;
+esac
+
+modprobe -q fan
+modprobe -q thermal


Property changes on: dists/trunk/utils/initramfs-tools/scripts/init-premount/acpid
___________________________________________________________________
Name: svn:executable
   + *

Added: dists/trunk/utils/initramfs-tools/scripts/local
===================================================================
--- dists/trunk/utils/initramfs-tools/scripts/local	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/scripts/local	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,37 @@
+# Local filesystem mounting			-*- shell-script -*-
+
+# Parameter: Where to mount the filesystem
+mountroot ()
+{
+	log_begin_msg "Running /scripts/local-top"
+	run_scripts /scripts/local-top
+	log_end_msg
+
+	# Get the root filesystem type
+	if [ ! -e "${ROOT}" ]; then
+		panic "ALERT!  ${ROOT} does not exist.  Dropping to a shell!"
+	fi
+
+	eval $(fstype < ${ROOT})
+
+	log_begin_msg "Running /scripts/local-premount"
+	run_scripts /scripts/local-premount
+	log_end_msg
+
+	if [ ${readonly} = y ]; then
+		roflag=-r
+	else
+		roflag=-w
+	fi
+
+	# FIXME This has no error checking
+	modprobe ${FSTYPE}
+
+	# FIXME This has no error checking
+	# Mount root
+	mount ${roflag} -t ${FSTYPE} ${ROOT} ${rootmnt}
+
+	log_begin_msg "Running /scripts/log-bottom"
+	run_scripts /scripts/local-bottom
+	log_end_msg
+}

Added: dists/trunk/utils/initramfs-tools/scripts/local-premount/suspend
===================================================================
--- dists/trunk/utils/initramfs-tools/scripts/local-premount/suspend	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/scripts/local-premount/suspend	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+	echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+	prereqs
+	exit 0
+	;;
+esac
+
+if [ "x${resume}" = "x" ]; then
+	exit
+fi
+
+if [ ! -e "${resume}" ]; then
+	exit
+fi
+
+if [ -e /sys/power/resume ]; then
+	major=$((0x$(stat -c%t ${resume})))
+	minor=$((0x$(stat -c%T ${resume})))
+	echo ${major}:${minor} >/sys/power/resume
+fi


Property changes on: dists/trunk/utils/initramfs-tools/scripts/local-premount/suspend
___________________________________________________________________
Name: svn:executable
   + *

Added: dists/trunk/utils/initramfs-tools/scripts/local-top/evms
===================================================================
--- dists/trunk/utils/initramfs-tools/scripts/local-top/evms	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/scripts/local-top/evms	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+PREREQ="lvm"
+
+prereqs()
+{
+	echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+	prereqs
+	exit 0
+	;;
+esac
+
+evms=${ROOT#/dev/evms/}
+
+case ${evms} in
+	/dev/root)
+		unset evms
+		;;
+	/*)
+		exit 0
+		;;
+esac
+	
+modprobe -q dm-mod
+
+/sbin/evms_activate


Property changes on: dists/trunk/utils/initramfs-tools/scripts/local-top/evms
___________________________________________________________________
Name: svn:executable
   + *

Added: dists/trunk/utils/initramfs-tools/scripts/local-top/lvm
===================================================================
--- dists/trunk/utils/initramfs-tools/scripts/local-top/lvm	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/scripts/local-top/lvm	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+PREREQ="md"
+
+prereqs()
+{
+	echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+	prereqs
+	exit 0
+	;;
+esac
+
+vg=${ROOT#/dev/mapper/}
+
+case ${vg} in
+	/dev/root)
+		unset vg
+		;;
+	/*)
+		exit 0
+		;;
+esac
+	
+modprobe -q dm-mod
+
+# Split volume group from logical volume.
+vg=$(echo ${vg} | sed -e 's#\(.*\)\([^-]\)-[^-].*#\1\2#')
+# Reduce padded --'s to -'s
+vg=$(echo ${vg} | sed -e 's#--#-#g')
+
+vgchange -ay ${vg}
+


Property changes on: dists/trunk/utils/initramfs-tools/scripts/local-top/lvm
___________________________________________________________________
Name: svn:executable
   + *

Added: dists/trunk/utils/initramfs-tools/scripts/local-top/md
===================================================================
--- dists/trunk/utils/initramfs-tools/scripts/local-top/md	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/scripts/local-top/md	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+	echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+	prereqs
+	exit 0
+	;;
+esac
+
+unset raidlvl
+gotraid=n
+
+# Detect raid level
+for x in /dev/hd[a-z][0-9]* /dev/sd[a-z][0-9]*; do
+	if [ ! -e ${x} ]; then
+		continue
+	fi
+	raidlvl=$(mdadm --examine ${x} 2>/dev/null | grep "Level" | sed -e 's/.*Raid Level : \(.*\)/\1/')
+	if [ "$raidlvl" ]; then
+		modprobe -q ${raidlvl} 2>/dev/null
+		gotraid=y
+	fi
+done
+
+[ "${gotraid}" = y ] || exit
+
+/sbin/mdrun /dev


Property changes on: dists/trunk/utils/initramfs-tools/scripts/local-top/md
___________________________________________________________________
Name: svn:executable
   + *

Added: dists/trunk/utils/initramfs-tools/scripts/nfs
===================================================================
--- dists/trunk/utils/initramfs-tools/scripts/nfs	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/scripts/nfs	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,39 @@
+# NFS filesystem mounting			-*- shell-script -*-
+
+# FIXME This needs error checking
+
+# Paramter: Where the root should be mounted
+mountroot ()
+{
+	log_begin_msg "Running /scripts/nfs-top"
+	run_scripts /scripts/nfs-top
+	log_end_msg
+
+	modprobe nfs
+	# For DHCP
+	modprobe af_packet
+
+	ipconfig ${DEVICE}
+	. /tmp/net-${DEVICE}.conf
+	if [ "x${NFSROOT}" = "xauto" ]; then
+		NFSROOT=${ROOTSERVER}:${ROOTPATH}
+	fi
+
+	log_begin_msg "Running /scripts/nfs-premount"
+	run_scripts /scripts/nfs-premount
+	log_end_msg
+
+	if [ ${readonly} = y ]; then
+		roflag="-o ro"
+	else
+		roflag="-o rw"
+	fi
+
+	sleep 3
+	nfsmount ${roflag} ${NFSROOT} ${rootmnt}
+
+	log_begin_msg "Running /scripts/nfs-bottom"
+	run_scripts /scripts/nfs-bottom
+	log_end_msg
+
+}

Added: dists/trunk/utils/initramfs-tools/update-initramfs
===================================================================
--- dists/trunk/utils/initramfs-tools/update-initramfs	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/update-initramfs	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,281 @@
+#!/bin/sh
+
+STATEDIR=/var/lib/initramfs-tools
+BOOTDIR=/boot
+
+set -e
+
+usage()
+{
+	if [ -n "${1}" ]; then
+		printf "${@}\n\n" >&2
+	fi
+	cat >&2 << EOF
+Usage: ${0} [OPTION]...
+
+Options:
+ -k [version]	Specify kernel version or ALL
+ -c		Create a new initramfs
+ -u		Update an existing initramfs
+ -d		Remove an existing initramfs
+ -t		Take over a custom initramfs with this one
+ -v		Be verbose
+ -h		This message
+
+EOF
+	exit 1
+}
+
+mild_panic()
+{
+	if [ -n "${1}" ]; then
+		printf "${@}\n" >&2
+	fi
+	exit 0
+}
+
+panic()
+{
+	if [ -n "${1}" ]; then
+		printf "${@}\n" >&2
+	fi
+	exit 1
+}
+
+verbose()
+{
+	if [ "${verbose}" = 1 ]; then
+		printf "${@}\n"
+	fi
+}
+
+version_exists()
+{
+	[ -e "${STATEDIR}/${1}" ]
+	return $?
+}
+
+set_initramfs()
+{
+	initramfs="${BOOTDIR}/initrd.img-${version}"
+}
+
+generate_initramfs()
+{
+	verbose "Generating ${initramfs}"
+	mkinitramfs -o ${initramfs} ${version}
+	set_sha1
+}
+
+compare_sha1()
+{
+	sha1sum ${initramfs} | diff ${STATEDIR}/${version} - >/dev/null 2>&1
+	return $?
+}
+
+# Note that this must overwrite so that updates work.
+set_sha1()
+{
+	sha1sum ${initramfs} > ${STATEDIR}/${version}
+}
+
+delete_sha1()
+{
+	rm -f ${STATEDIR}/${version}
+}
+
+get_sorted_versions()
+{
+	version_list=""
+
+	for gsv_x in ${STATEDIR}/*; do
+		gsv_x=$(basename ${gsv_x})
+		if [ "${gsv_x}" = '*' ]; then
+			verbose "Nothing to do, exiting."
+			exit 0
+		fi
+		worklist=""
+		for gsv_i in $version_list; do
+			if dpkg --compare-versions "${gsv_x}" '>' "${gsv_i}"; then
+				worklist="${worklist} ${gsv_x} ${gsv_i}"
+				gsv_x=""
+			else
+				worklist="${worklist} ${gsv_i}"
+			fi
+		done
+		if [ "${gsv_x}" != "" ]; then
+			worklist="${worklist} ${gsv_x}"
+		fi
+		version_list=${worklist}
+	done
+
+	verbose "Available versions: ${version_list}"
+}
+
+set_linked_version()
+{
+	if [ -L /initrd.img ]; then
+		linktarget=$(basename $(readlink /initrd.img))
+	fi
+
+	if [ -L /boot/initrd.img ]; then
+		linktarget=$(basename $(readlink /boot/initrd.img))
+	fi
+
+	if [ -z "${linktarget}" ]; then
+		return
+	fi
+
+	version="${linktarget##initrd.img-}"
+}
+
+set_highest_version()
+{
+	get_sorted_versions
+	set - ${version_list}
+	version=${1}
+}
+
+create()
+{
+	if [ -z "${version}" ]; then
+		usage "Create mode requires a version argument"
+	fi
+
+	set_initramfs
+
+	if [ "${takeover}" = 0 ]; then
+		if version_exists ${version}; then
+			panic "Cannot create version ${version}: already exists"
+		fi
+	
+		if [ -e ${initramfs} ]; then
+			panic "${initramfs} already exists, cannot create."
+		fi
+	fi
+
+	generate_initramfs
+}
+
+update()
+{
+	if [ -z "${version}" ]; then
+		set_linked_version
+	fi
+
+	if [ -z "${version}" ]; then
+		set_highest_version
+	fi
+
+	if [ "${version}" = "all" ]; then
+		: FIXME check for --yes, and if not ask are you sure
+		get_sorted_versions
+		for u_version in ${version_list}; do
+			if [ "${verbose}" = "1" ]; then
+				vflag="-v"
+			fi
+			# Don't stop if one version doesn't work.
+			set +e
+			${0} ${vflag} -u -k ${u_version}
+			set -e
+		done
+		exit 0
+	fi
+
+	set_initramfs
+
+	altered_check
+
+	generate_initramfs
+
+}
+
+delete()
+{
+	if [ -z "${version}" ]; then
+		usage "Delete mode requires a version argument"
+	fi
+
+	set_initramfs
+
+	if [ ! -e ${initramfs} ]; then
+		panic "Cannot delete ${initramfs}, doesn't exist."
+	fi
+	
+	if ! version_exists ${version}; then
+		panic "Cannot delete version ${version}: Not created by this utility."
+	fi
+
+	altered_check
+
+	delete_sha1
+
+	rm -f "${initramfs}"
+}
+
+
+altered_check()
+{
+	if [ "${takeover}" = 0 ]; then
+		if ! compare_sha1; then
+			delete_sha1
+			mild_panic "${initramfs} was been altered.  Cannot update."
+		fi
+	fi
+}
+
+# Defaults
+verbose=0
+yes=0
+takeover=0
+
+##
+
+while getopts "k:cudyvht?" flag; do
+	case "${flag}" in
+	k)
+		version="${OPTARG}"	
+		;;
+	c)
+		mode="c"
+		;;
+	d)
+		mode="d"
+		;;
+	u)
+		mode="u"
+		;;
+	v)
+		verbose="1"
+		;;
+	y)
+		yes="1"
+		;;
+	t)
+		takeover="1"
+		;;
+	h|?)
+		usage
+		;;
+	esac
+done
+
+# Validate arguments
+
+if [ -z "${mode}" ]; then
+	usage "You must specify at least one of -c, -u, or -d."
+fi
+
+case "${mode}" in
+	c)
+		create
+		;;
+	d)
+		delete
+		;;
+	u)
+		update
+		;;
+esac
+
+

Added: dists/trunk/utils/initramfs-tools/update-initramfs.8
===================================================================
--- dists/trunk/utils/initramfs-tools/update-initramfs.8	2005-10-10 16:25:12 UTC (rev 4374)
+++ dists/trunk/utils/initramfs-tools/update-initramfs.8	2005-10-10 16:47:29 UTC (rev 4375)
@@ -0,0 +1,60 @@
+.TH UPDATE-INITRAMFS 8  "$Date: 2005/09/20" $" "" "update-initramfs manual"
+
+.SH NAME
+update-initramfs \- generate an initramfs image
+
+.SH SYNOPSIS
+.B update-initramfs
+.RB [ \-k 
+.IR version ] 
+.RB [ \-c ] 
+.RB [ \-u ] 
+.RB [ \-t ] 
+.RB [ \-v ] 
+.RB [ \-h ] 
+.SH DESCRIPTION
+The
+.B update-initramfs 
+script manages your initramfs images.  The initramfs is an cpio archive. 
+At boot time, the kernel unpacks that archive into ram disk, mounts and 
+uses it as initial root file system. All finding of the root device 
+happens in this early userspace.
+
+.SH OPTIONS
+.TP
+\fB \-k \fI version
+Set the kernel for whom the initramfs will be generated.
+
+.TP
+\fB \-c
+Create a new initramfs.
+
+.TP
+\fB \-u
+Update an existing initramfs.
+
+.TP
+\fB \-d
+Remove an existing initramfs.
+
+.TP
+\fB \-t
+Take over a custom initramfs with this one.
+
+.TP
+\fB \-v
+This option increases the amount of information you are given during
+the chosen action.
+
+.TP
+\fB \-h
+Print a short help page describing the available options in 
+.B update-initramfs.
+
+.SH AUTHOR
+The initramfs-tools are written by Jeff Bailey <jbailey at ubuntu.com>.
+This manual is maintained by Maximilian Attems <maks at sternwelten.at>.
+
+.SH SEE ALSO
+
+.BR initramfs.conf (5)




More information about the Kernel-svn-changes mailing list