summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2005-10-01 02:33:30 +0200
committermaximilian attems <maks@debian.org>2005-10-01 02:33:30 +0200
commita893fa82665ee472079292eb84a125ef81009124 (patch)
tree540886f92c987fa65c7e74a9b4e98459ea554efc
parent14739b596ae27800ae6ce071745cf2da382d73b4 (diff)
downloadinitramfs-tools-a893fa82665ee472079292eb84a125ef81009124.tar.gz
initramfs-tools-a893fa82665ee472079292eb84a125ef81009124.zip
apply all the 0.30 upstream changes.
-rw-r--r--HACKING19
-rw-r--r--debian/changelog41
-rw-r--r--debian/initramfs-tools.docs1
-rw-r--r--debian/rules4
-rw-r--r--hook-functions2
-rw-r--r--init11
-rw-r--r--scripts/functions19
-rw-r--r--scripts/local-premount/suspend2
-rw-r--r--update-initramfs4
9 files changed, 93 insertions, 10 deletions
diff --git a/HACKING b/HACKING
new file mode 100644
index 0000000..2fd9136
--- /dev/null
+++ b/HACKING
@@ -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
+
diff --git a/debian/changelog b/debian/changelog
index 4591d65..1ea455b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,42 @@
+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@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.
@@ -17,7 +56,7 @@ initramfs-tools (0.27) unstable; urgency=low
* update-initramfs.8 New file install it.
* The debian busybox-cvs-static installs into /bin/busybox:
- fix pathes vis-à-vis ubuntu version. make that a variable on top.
+ fix pathes vis-a-vis ubuntu version. make that a variable on top.
-- maximilian attems <maks@sternwelten.at> Tue, 20 Sep 2005 13:52:00 +0200
diff --git a/debian/initramfs-tools.docs b/debian/initramfs-tools.docs
new file mode 100644
index 0000000..5c374b1
--- /dev/null
+++ b/debian/initramfs-tools.docs
@@ -0,0 +1 @@
+HACKING
diff --git a/debian/rules b/debian/rules
index 6b91c1f..2a5ae55 100644
--- a/debian/rules
+++ b/debian/rules
@@ -4,3 +4,7 @@ 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
diff --git a/hook-functions b/hook-functions
index 4371962..bc21b5f 100644
--- a/hook-functions
+++ b/hook-functions
@@ -144,7 +144,7 @@ auto_add_modules()
done
# scsi
- for x in 3w-9xxx 3w-xxxx a100u2x aacraid ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh 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
+ 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
diff --git a/init b/init
index 6bf4be7..4193dcd 100644
--- a/init
+++ b/init
@@ -1,5 +1,7 @@
#!/bin/sh
+echo "Loading, please wait..."
+
mkdir /sys
mkdir /proc
mkdir /tmp
@@ -22,6 +24,7 @@ export readonly=y
export ROOT=
export resume=${RESUME}
export rootmnt=/root
+export debug=
for x in $(cat /proc/cmdline); do
case $x in
init=*)
@@ -48,15 +51,19 @@ for x in $(cat /proc/cmdline); do
rw)
readonly=n
;;
+ debug)
+ debug=y
+ exec >/tmp/initramfs.debug 2>&1
+ set -x
+ ;;
break)
break=yes
;;
esac
done
-log_begin_msg "Running /scripts/init-top"
+# Don't do log messages here to avoid confusing usplash
run_scripts /scripts/init-top
-log_end_msg
. /scripts/${BOOT}
diff --git a/scripts/functions b/scripts/functions
index 148dda7..de2268c 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -23,12 +23,18 @@ log_warning_msg()
log_begin_msg()
{
- _log_msg "Begin: $@ ..."
+ if [ -x /sbin/usplash_write ]; then
+ /sbin/usplash_write "TEXT $@"
+ fi
+ _log_msg "Begin: $@ ..."
}
log_end_msg()
{
- _log_msg "Done."
+ if [ -x /sbin/usplash_write ]; then
+ /sbin/usplash_write "SUCCESS ok"
+ fi
+ _log_msg "Done."
}
# update_progress() # ToDo: NOP placeholder... what else for usplash?
@@ -38,6 +44,9 @@ log_end_msg()
panic()
{
+ if [ -x /sbin/usplash_write ]; then
+ /sbin/usplash_write "QUIT"
+ fi
echo $@
FS1='(initramfs) ' exec /bin/sh </dev/console >/dev/console 2>&1
}
@@ -228,8 +237,12 @@ load_modules()
i2o_boot_events
+ # FIXME - need to start LVM here
+
+ udevstart
+
if [ -e /sys/power/resume ]; then
- if [ -e ${resume} ]; then
+ if [ -e "${resume}" ]; then
major=$((0x$(stat -c%t ${resume})))
minor=$((0x$(stat -c%T ${resume})))
echo ${major}:${minor} >/sys/power/resume
diff --git a/scripts/local-premount/suspend b/scripts/local-premount/suspend
index 5791123..6aab596 100644
--- a/scripts/local-premount/suspend
+++ b/scripts/local-premount/suspend
@@ -19,7 +19,7 @@ if [ "x${resume}" = "x" ]; then
exit
fi
-if [ ! -e ${resume} ]; then
+if [ ! -e "${resume}" ]; then
exit
fi
diff --git a/update-initramfs b/update-initramfs
index f93fc97..bd5a4ab 100644
--- a/update-initramfs
+++ b/update-initramfs
@@ -115,11 +115,11 @@ get_sorted_versions()
set_linked_version()
{
if [ -L /initrd.img ]; then
- linktarget=$(readlink /initrd.img)
+ linktarget=$(basename $(readlink /initrd.img))
fi
if [ -L /boot/initrd.img ]; then
- linktarget=$(readlink /boot/initrd.img)
+ linktarget=$(basename $(readlink /boot/initrd.img))
fi
if [ -z "${linktarget}" ]; then