Hello community, here is the log from the commit of package mkinitrd checked in at Mon May 21 15:11:13 CEST 2007. -------- --- mkinitrd/mkinitrd.changes 2007-05-21 11:41:16.000000000 +0200 +++ /mounts/work_src_done/STABLE/mkinitrd/mkinitrd.changes 2007-05-21 13:28:55.000000000 +0200 @@ -1,0 +2,7 @@ +Mon May 21 13:27:39 CEST 2007 - agraf@suse.de + +- Beautified the initrd boot output +- Removed unused modules when using IDE / SCSI +- Minor variable escaping fixes + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mkinitrd.spec ++++++ --- /var/tmp/diff_new_pack.q23351/_old 2007-05-21 15:11:07.000000000 +0200 +++ /var/tmp/diff_new_pack.q23351/_new 2007-05-21 15:11:07.000000000 +0200 @@ -18,7 +18,7 @@ Requires: coreutils modutils util-linux grep gzip sed gawk cpio udev pciutils sysvinit file Autoreqprov: on Version: 2.0 -Release: 3 +Release: 4 Summary: Creates an Initial RAM Disk Image for Preloading Modules BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: mkinitrd.tgz @@ -93,6 +93,10 @@ %changelog * Mon May 21 2007 - agraf@suse.de +- Beautified the initrd boot output +- Removed unused modules when using IDE / SCSI +- Minor variable escaping fixes +* Mon May 21 2007 - agraf@suse.de - added missing shebang entries * Fri May 11 2007 - agraf@suse.de - Modularize mkinitrd (FATE #302106) ++++++ mkinitrd.tgz ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.0/lib/mkinitrd/boot/03-block.sh new/mkinitrd-2.0/lib/mkinitrd/boot/03-block.sh --- old/mkinitrd-2.0/lib/mkinitrd/boot/03-block.sh 2007-05-11 16:38:12.000000000 +0200 +++ new/mkinitrd-2.0/lib/mkinitrd/boot/03-block.sh 2007-05-21 13:09:59.000000000 +0200 @@ -1,6 +1,6 @@ #!/bin/bash #%requires: devfunctions -#%udevmodules: $idescsi_modules $block_modules +#%udevmodules: $block_modules #%if: "$block_modules" # ##### Block device initialization @@ -27,10 +27,7 @@ ## default_dev_flags ?? ## -# TODO: rewrite for udev usage? - [ "$(get_param ide)" ] && add_module_param ide_core "options=\"$(get_param ide)\"" -[ "$(get_param hd?)" ] && add_module_param ide_core "options=\"$(get_param hd?)\"" function scsi_mod_check_compat() { p="$(get_param $1)" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.0/lib/mkinitrd/boot/19-mount.sh new/mkinitrd-2.0/lib/mkinitrd/boot/19-mount.sh --- old/mkinitrd-2.0/lib/mkinitrd/boot/19-mount.sh 2007-05-07 11:32:46.000000000 +0200 +++ new/mkinitrd-2.0/lib/mkinitrd/boot/19-mount.sh 2007-05-21 13:16:12.000000000 +0200 @@ -18,8 +18,8 @@ ## ro mount the root device read-only ## -[ "$(set -u; $rw && echo 1)" = "1" ] && read_write=off -[ "$(set -u; $ro && echo 1)" = "1" ] && read_only=off +[ "$( ( set -u; echo $rw >/dev/null; echo 1 ) 2>/dev/null )" = "1" ] && read_write=1 +[ "$( ( set -u; echo $ro >/dev/null; echo 1 ) 2>/dev/null )" = "1" ] && read_write= # And now for the real thing if ! udev_discover_root ; then diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.0/lib/mkinitrd/linuxrc new/mkinitrd-2.0/lib/mkinitrd/linuxrc --- old/mkinitrd-2.0/lib/mkinitrd/linuxrc 2007-04-27 11:45:18.000000000 +0200 +++ new/mkinitrd-2.0/lib/mkinitrd/linuxrc 2007-05-21 12:58:03.000000000 +0200 @@ -43,7 +43,7 @@ # => /dev/hda1 ################################################## get_param() { - echo $(eval echo \${cmd_${1/-/_}}) + echo $(eval echo \${cmd_${1/-/_}}) 2>/dev/null } for file in boot/*; do diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.0/lib/mkinitrd/setup/070-storage.sh new/mkinitrd-2.0/lib/mkinitrd/setup/070-storage.sh --- old/mkinitrd-2.0/lib/mkinitrd/setup/070-storage.sh 2007-05-21 11:39:27.000000000 +0200 +++ new/mkinitrd-2.0/lib/mkinitrd/setup/070-storage.sh 2007-05-21 12:55:04.000000000 +0200 @@ -85,7 +85,7 @@ # resolve dependencies for bd in $bds ; do update_blockdev $bd >&2 - if [ $blockdriver = device-mapper ]; then + if [ "$blockdriver" = device-mapper ]; then root_dm=1 dm_deps=$(dmsetup deps -j $blockmajor -m $blockminor) dm_deps=${dm_deps#*: } @@ -108,10 +108,10 @@ if [ -e "$root_dir/${curblockdev#/}" ]; then blockdevn="$(devnumber $root_dir/${curblockdev#/})" - if [ ! "$blockdevn" ]; then + blockmajor="$(devmajor $blockdevn)" + if [ ! "$blockmajor" ]; then error 1 "Fatal storage error. Device $curblockdev could not be analyzed." fi - blockmajor="$(devmajor $blockdevn)" blockminor="$(devminor $blockdevn)" blockdriver="$(block_driver $blockmajor)" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.0/lib/mkinitrd/setup/079-block.sh new/mkinitrd-2.0/lib/mkinitrd/setup/079-block.sh --- old/mkinitrd-2.0/lib/mkinitrd/setup/079-block.sh 2007-05-11 16:38:54.000000000 +0200 +++ new/mkinitrd-2.0/lib/mkinitrd/setup/079-block.sh 2007-05-21 13:20:20.000000000 +0200 @@ -13,17 +13,6 @@ cat /sys/class/scsi_host/host$hostnum/proc_name } -is_ide_or_scsi() { - case "$1" in - sd*) - echo 1 - ;; - hd*) - echo 1 - ;; - esac -} - get_devmodule() { # fix cciss local blkdev=$(echo $1 | sed 's./.!.g') @@ -32,20 +21,19 @@ blkpart=$blkdev blkdev=${blkpart#[0-9]} if [ ! -d /sys/block/$blkdev/$blkpart ] ; then - echo "Device $blkdev not found in sysfs" >&2 - exit 1 + error 1 "Device $blkdev not found in sysfs" fi fi case "$blkdev" in sd*) handle_scsi $blkdev - use_idescsi=1 + echo sd_mod ;; hd*) devpath=$(cd -P "/sys/block/$blkdev/device"; cd ../..; echo $PWD) cat $devpath/modalias - use_idescsi=1 + echo ide-disk ;; cciss* | dasd*) devpath=$(cd -P "/sys/block/$blkdev/device"; echo $PWD) @@ -59,6 +47,20 @@ return 0 } +update_blockmodules() { + local newmodule="$1" + + echo -n "$block_modules" + + for bm in $block_modules; do + if [ "$newmodule" = "$bm" ]; then + return + fi + done + + echo -n "$newmodule " +} + if [ "$create_monster_initrd" ]; then for i in $(find $root_dir/lib/modules/$kernel_version/kernel/drivers/{ide,scsi} -name "*.ko"); do i=${i%*.ko} @@ -70,12 +72,15 @@ /dev*) update_blockdev $bd curmodule="$(get_devmodule ${bd##*/})" - [ "$use_idescsi" ] || use_idescsi="$(is_ide_or_scsi ${bd##*/})" - verbose "[BLOCK] $bd -> $curmodule" + for curmodule_i in $curmodule; do + verbose "[BLOCK] $bd -> $curmodule_i" + done if [ -z "$curmodule" ]; then - echo "[BLOCK] WARNING: could not find block module for $bd" + echo "[BLOCK] WARNING: could not find block module for $bd" fi - block_modules="$block_modules $curmodule" + for blockmodule in $curmodule; do + block_modules=$(update_blockmodules "$blockmodule") + done ;; *) verbose "[BLOCK] ignoring $bd" @@ -83,9 +88,4 @@ done fi -[ "$use_idescsi" ] && idescsi_modules="ide-scsi ide_core ide-disk sd_mod sd_mod osst st sr_mod sg ide-disk ide-cd ide-tape ide-floppy cdrom" -tmp_block_modules="$( ( for i in $block_modules; do echo $i; done ) | sort | uniq )" -block_modules="$( for i in $tmp_block_modules; do echo -n "$i "; done )" - save_var block_modules -save_var idescsi_modules ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de