woow pile of stuff turned up:

- cleanup of activate_vg() in lvm boot script
- use less of busybox utilities
- conf.d for BUSYBOX=y usage for the packages
- don't poke on conffile for RESUME
- use printf instead of expr (ooh ash and dash are *fun*)
- fix update-initramfs to use current_version when no other
  version exists around
This commit is contained in:
maximilian attems 2006-07-02 18:57:07 +02:00
parent 09276c4c9f
commit 0d341b8d32
11 changed files with 71 additions and 40 deletions

View File

@ -17,15 +17,6 @@
MODULES=most
#
# RESUME: [ /dev/hda2 | /dev/sdb2 ]
#
# optional - set the swap partition to resume from.
# "cat /proc/swaps | egrep ^/dev" should show possible candidates.
# The command line of your boot loader will override this setting.
#RESUME=
#
# NFS Section of the config.
#

37
debian/changelog vendored
View File

@ -1,3 +1,40 @@
initramfs-tools (0.67) unstable; urgency=high
Release bella, ciao, ciao, ciao!
* scripts/local: Fix typo in log_begin_msg. (closes: #375880)
* update-initramfs: Generate initramfs for current version if there is no
sha1sum and no initrd exists yet - regression from 0.65. (closes: #375671)
Thanks martin f krafft <madduck@debian.org> for report.
* conf/initramfs.conf, initramfs.conf(5): Drop RESUME section.
* debian/initramfs-tools.preinst: Don't modify conffile initramfs.tools -
drop the corresponding code. (closes: #376008)
* initramfs-tools(8): Document that RESUME is tried to be autodected and
written to /etc/initramfs-tools/conf.d/resume on install.
* scripts/functions: Replace expr use with printf for skipping comments on
/etc/modules. Works on both busybox ash and klibc dash. Prefix space is
ignored by both.
* scripts/local-top/lvm: Remove harmless warnings if a volumegroup is under
/dev/mapper but not an lvm device. (closes: 376311)
Thanks David Härdeman <david@2gen.com> for the patch.
* scripts/local-top/lvm: Change activate_vg() to return 1 if no volumegroup
is found.
* debian/initramfs-tools.dirs: Add usr/share/initramfs-tools/conf.d entry.
* mkinitramfs: Add stuff to the conf.d directory also from aboves directory.
* Set urgency to high to get the RC bugfix into testing.
-- maximilian attems <maks@sternwelten.at> Sun, 2 Jul 2006 18:35:34 +0200
initramfs-tools (0.66) unstable; urgency=low
* hooks/thermal: Add i2c-powermac.

View File

@ -9,5 +9,6 @@ etc/initramfs-tools/scripts/nfs-premount
etc/initramfs-tools/scripts/nfs-top
etc/initramfs-tools/hooks
etc/initramfs-tools/conf.d
usr/share/initramfs-tools/conf.d
usr/share/initramfs-tools/modules.d
/var/lib/initramfs-tools

View File

@ -19,13 +19,4 @@ case "$1" in
;;
esac
[ -f /etc/initramfs-tools/initramfs.conf ] && . /etc/initramfs-tools/initramfs.conf
if [ -z ${RESUME} ]; then
exit 0
else
mkdir -p /etc/initramfs-tools/conf.d
echo "RESUME=${RESUME}" > /etc/initramfs-tools/conf.d/resume
sed -i -e "s/RESUME=.*/#RESUME=/" /etc/initramfs-tools/initramfs.conf
fi
#DEBHELPER#

View File

@ -48,8 +48,9 @@ either local or NFS (affects which initramfs scripts are run, see the "Subdirect
.TP
\fB \fI resume
device node which holds the result of a previous suspension using swsusp
(usually the swap partition).
On install initramfs-tools tries to autodetect the resume partition. On success
the RESUME variable is written to /etc/initramfs-tools/conf.d/resume.
The boot variable overrides it.
.TP
\fB \fI quiet

View File

@ -32,13 +32,6 @@ The default setting is \fImost\fP.
\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. By default, this is set in
/etc/mkinitramfs/conf.d/resume.
.SH NFS VARIABLES
.TP
\fB BOOT

View File

@ -61,7 +61,7 @@ done
. "${CONFDIR}/initramfs.conf"
EXTRA_CONF=''
for i in ${CONFDIR}/conf.d/*; do
for i in ${CONFDIR}/conf.d/* /usr/share/initramfs-tools/conf.d/*; do
EXTRA_CONF="${EXTRA_CONF} $(basename $i | grep '^[a-z0-9][a-z0-9\._-]*$' | grep -v '\.dpkg-.*$')";
done
for i in ${EXTRA_CONF}; do

View File

@ -220,14 +220,16 @@ load_modules()
{
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
# Skip empty lines
if [ -z "$m" ]; then
continue
fi
# Skip comments - d?ash removes whitespace prefix
com=$(printf "%.1s" "${m}")
if [ "$com" = "#" ]; then
continue
fi
modprobe -q $m
done
fi
}

View File

@ -55,7 +55,7 @@ mountroot ()
# Mount root
mount ${roflag} -t ${FSTYPE} ${ROOTFLAGS} ${ROOT} ${rootmnt}
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/log-bottom"
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-bottom"
run_scripts /scripts/local-bottom
[ "$quiet" != "y" ] && log_end_msg
}

View File

@ -21,7 +21,7 @@ activate_vg()
# Make sure that we have a non-empty argument
if [ -z "${vg}" ]; then
return 0
return 1
fi
# Take care of lilo boot arg, risky activating of all vg
@ -40,7 +40,12 @@ activate_vg()
# Make sure that we have a d-m path
vg=${vg#/dev/mapper/}
if [ "$vg" = "$1" ]; then
return 0
return 1
fi
# Make sure that the device includes at least one dash
if [ "$(echo -n "$vg" | tr -d -)" = "$vg" ]; then
return 1
fi
# Split volume group from logical volume.
@ -61,3 +66,5 @@ modprobe -q dm-mirror
activate_vg "$ROOT"
activate_vg "$resume"
exit 0

View File

@ -125,8 +125,7 @@ get_sorted_versions()
for gsv_x in "${STATEDIR}"/*; do
gsv_x="$(basename "${gsv_x}")"
if [ "${gsv_x}" = '*' ]; then
verbose "Nothing to do, exiting."
exit 0
return 0
fi
worklist=""
for gsv_i in $version_list; do
@ -212,9 +211,18 @@ update()
set_current_version
fi
if [ -z "${version}" ]; then
verbose "Nothing to do, exiting."
exit 0
fi
if [ "${version}" = "all" ]; then
: FIXME check for --yes, and if not ask are you sure
get_sorted_versions
if [ -z "${version_list}" ]; then
verbose "Nothing to do, exiting."
exit 0
fi
for u_version in ${version_list}; do
if [ "${verbose}" = "1" ]; then
vflag="-v"