diff options
-rw-r--r-- | conf/initramfs.conf | 9 | ||||
-rw-r--r-- | debian/changelog | 37 | ||||
-rw-r--r-- | debian/initramfs-tools.dirs | 1 | ||||
-rw-r--r-- | debian/initramfs-tools.preinst | 9 | ||||
-rw-r--r-- | initramfs-tools.8 | 5 | ||||
-rw-r--r-- | initramfs.conf.5 | 7 | ||||
-rwxr-xr-x | mkinitramfs | 2 | ||||
-rw-r--r-- | scripts/functions | 16 | ||||
-rw-r--r-- | scripts/local | 2 | ||||
-rwxr-xr-x | scripts/local-top/lvm | 11 | ||||
-rwxr-xr-x | update-initramfs | 12 |
11 files changed, 71 insertions, 40 deletions
diff --git a/conf/initramfs.conf b/conf/initramfs.conf index a9cadf7..84d3b24 100644 --- a/conf/initramfs.conf +++ b/conf/initramfs.conf @@ -18,15 +18,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. # diff --git a/debian/changelog b/debian/changelog index b1e3272..05140ed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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. diff --git a/debian/initramfs-tools.dirs b/debian/initramfs-tools.dirs index 0a807a5..2c6a83a 100644 --- a/debian/initramfs-tools.dirs +++ b/debian/initramfs-tools.dirs @@ -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 diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index 3ec83c6..f2b667e 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -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# diff --git a/initramfs-tools.8 b/initramfs-tools.8 index eb46827..5d7c105 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -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 diff --git a/initramfs.conf.5 b/initramfs.conf.5 index 7fb79b1..2874fdb 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -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 diff --git a/mkinitramfs b/mkinitramfs index 5fcc1fd..f0ba606 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -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 diff --git a/scripts/functions b/scripts/functions index a4faaa8..fea6956 100644 --- a/scripts/functions +++ b/scripts/functions @@ -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 } diff --git a/scripts/local b/scripts/local index 25aca70..a565885 100644 --- a/scripts/local +++ b/scripts/local @@ -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 } diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm index fc1036e..5323a7d 100755 --- a/scripts/local-top/lvm +++ b/scripts/local-top/lvm @@ -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 diff --git a/update-initramfs b/update-initramfs index 2f3ebcf..1826233 100755 --- a/update-initramfs +++ b/update-initramfs @@ -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" |