summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2006-03-21 12:25:50 +0100
committermaximilian attems <maks@debian.org>2006-03-21 12:25:50 +0100
commit0318bb9b8e61f0a4c9d89ec678a75f6f7ea8c5d5 (patch)
tree0a8fcc1dbc422602295fc3bba754bba4bf307d86
parent41f695c8066c3d4955049d547b16aaf06273c20f (diff)
add verbose mode for mkinitramfs, use it when calling it
display which modules gets added, we might want to have even more verbose info, but that is a nice start. add cpqarray module document `-' filename restriction don't exit succesfully if root fs full
-rw-r--r--debian/changelog17
-rw-r--r--hook-functions5
-rw-r--r--initramfs-tools.86
-rwxr-xr-xmkinitramfs11
-rw-r--r--update-initramfs6
5 files changed, 39 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog
index 8abea21..bfbd682 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,20 @@
+initramfs-tools (0.57) unstable; urgency=low
+
+ * mkinitramfs, update-initramfs, hook-functions:
+ On verbose mode show, which modules gets added to the initramfs.
+
+ * hook-functions: Add cpqarray to the scsi modules - thanks for the patch
+ to Petter Reinholdtsen <pere@hungry.com>. (closes: #357980)
+
+ * initramfs-tools.8: Document that `-' is not allowed to be used in a script
+ filename - the filenames get used as shell variable. (closes: #355235)
+
+ * mkinitramfs: Don't exit succesfully in a case of a full fs. Leaves the
+ linux-image unconfigured. Thanks martin f krafft <madduck@debian.org>
+ for pointing to that potential boot failure. (closes: #350875)
+
+ -- maximilian attems <maks@sternwelten.at> Tue, 21 Mar 2006 11:56:29 +0100
+
initramfs-tools (0.56) unstable; urgency=low
* hooks/md: Add linear module - thanks to Moshe Yudkowsky <moshe@pobox.com>.
diff --git a/hook-functions b/hook-functions
index 859f1c6..efce32d 100644
--- a/hook-functions
+++ b/hook-functions
@@ -48,6 +48,9 @@ manual_add_modules()
mkdir -p "${DESTDIR}/$(dirname "${mam_x}")"
ln -s "${mam_x}" "${DESTDIR}/$(dirname "${mam_x}")"
+ if [ -n "${verbose}" -a "${verbose}" = "y" ]; then
+ echo "Adding module ${mam_x}"
+ fi
done
}
@@ -166,7 +169,7 @@ auto_add_modules()
scsi)
for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci \
aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic \
- cciss ch dac960 dc395x dmx3191d dpt_i2o eata fdomain \
+ cciss ch cpqarray dac960 dc395x dmx3191d dpt_i2o eata fdomain \
ibmvscsic initio ipr ips isp1020 lpfc max_scsi mac53c94 \
megaraid megaraid_mbox megaraid_mm mesh mptfc mptscsih \
mptsas mptspi nsp32 osst qla1280 qla2100 qla2200 qla2300 \
diff --git a/initramfs-tools.8 b/initramfs-tools.8
index a08ef1b..991cff9 100644
--- a/initramfs-tools.8
+++ b/initramfs-tools.8
@@ -16,7 +16,11 @@ image itself. They can however cause files to be included in the image.
.SS Boot scripts
These are included in the initramfs image and normally executed during
kernel boot in the early user-space before the root partition has been
-mounted.
+mounted.
+
+initramfs-tools uses shell variable names for handling dependencies.
+Notice that `-' is not a valid shell variable name and thus should
+not be used as script filename.
.SH INIT SCRIPT
The script which is executed first and is in charge of running all other
diff --git a/mkinitramfs b/mkinitramfs
index a72865b..b7de71b 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -10,7 +10,7 @@ errors_to="2>/dev/null"
# BUSYBOXDIR="/usr/lib/initramfs-tools/bin/"
BUSYBOXDIR="/bin"
-OPTIONS=`getopt -o d:ko:r: --long supported-host-version:,supported-target-version: -n "$0" -- "$@"`
+OPTIONS=`getopt -o d:ko:r:v --long supported-host-version:,supported-target-version: -n "$0" -- "$@"`
# Check for non-GNU getopt
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
@@ -40,6 +40,10 @@ while true; do
ROOT="$2"
shift 2
;;
+ -v)
+ verbose="y"
+ shift
+ ;;
--supported-host-version)
supported_host_version="$2"
shift 2
@@ -142,6 +146,7 @@ export version
export CONFDIR
export DESTDIR
export DPKG_ARCH
+export verbose
# Private, used by 'catenate_cpiogz'.
export __TMPCPIOGZ
@@ -210,10 +215,10 @@ if [ -e "${CONFDIR}/DSDT.aml" ]; then
copy_exec "${CONFDIR}/DSDT.aml" /
fi
-(cd "${DESTDIR}" && find . | cpio --quiet --dereference -o -H newc | gzip -9 >"${outfile}")
+(cd "${DESTDIR}" && find . | cpio --quiet --dereference -o -H newc | gzip -9 >"${outfile}") || exit 1
if [ -s "${__TMPCPIOGZ}" ]; then
- cat "${__TMPCPIOGZ}" >>"${outfile}"
+ cat "${__TMPCPIOGZ}" >>"${outfile}" || exit 1
fi
if [ "${keep}" = "y" ]; then
diff --git a/update-initramfs b/update-initramfs
index 08a2f3a..9b69981 100644
--- a/update-initramfs
+++ b/update-initramfs
@@ -63,7 +63,11 @@ set_initramfs()
generate_initramfs()
{
verbose "Generating ${initramfs}"
- mkinitramfs -o "${initramfs}" "${version}"
+ OPTS="-o"
+ if [ "${verbose}" = 1 ]; then
+ OPTS="-v $OPTS"
+ fi
+ mkinitramfs $OPTS "${initramfs}" "${version}"
set_sha1
}