![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package mkinitrd checked in at Thu Aug 9 20:15:22 CEST 2007. -------- --- mkinitrd/mkinitrd.changes 2007-08-07 14:34:59.000000000 +0200 +++ /mounts/work_src_done/STABLE/mkinitrd/mkinitrd.changes 2007-08-09 17:17:09.000000000 +0200 @@ -1,0 +2,7 @@ +Thu Aug 9 17:15:50 CEST 2007 - hare@suse.de + +- Update EVMS detection +- Fixup majorminor2blockdev for LVM devices +- Use correct path to vol_id for compability + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mkinitrd.spec ++++++ --- /var/tmp/diff_new_pack.E12082/_old 2007-08-09 20:14:16.000000000 +0200 +++ /var/tmp/diff_new_pack.E12082/_new 2007-08-09 20:14:16.000000000 +0200 @@ -18,7 +18,7 @@ Requires: coreutils modutils util-linux grep gzip sed gawk cpio udev pciutils sysvinit file perl Autoreqprov: on Version: 2.1 -Release: 16 +Release: 18 Summary: Creates an Initial RAM Disk Image for Preloading Modules BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: mkinitrd.tgz @@ -103,6 +103,10 @@ %doc %{_mandir}/man8/mkinitrd.8.gz %changelog +* Thu Aug 09 2007 - hare@suse.de +- Update EVMS detection +- Fixup majorminor2blockdev for LVM devices +- Use correct path to vol_id for compability * Tue Aug 07 2007 - hare@suse.de - Fix root device detection for update (#297999) - Umount /dev/pts correctly ++++++ mkinitrd.tgz ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.1/mkinitrd.changes new/mkinitrd-2.1/mkinitrd.changes --- old/mkinitrd-2.1/mkinitrd.changes 2007-08-07 14:34:20.000000000 +0200 +++ new/mkinitrd-2.1/mkinitrd.changes 2007-08-09 17:16:59.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Aug 9 17:15:50 CEST 2007 - hare@suse.de + +- Update EVMS detection +- Fixup majorminor2blockdev for LVM devices +- Use correct path to vol_id for compability + +------------------------------------------------------------------- Tue Aug 7 12:51:22 CEST 2007 - hare@suse.de - Fix root device detection for update (#297999) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.1/scripts/boot-evms.sh new/mkinitrd-2.1/scripts/boot-evms.sh --- old/mkinitrd-2.1/scripts/boot-evms.sh 2007-08-07 14:34:20.000000000 +0200 +++ new/mkinitrd-2.1/scripts/boot-evms.sh 2007-08-09 17:16:59.000000000 +0200 @@ -17,66 +17,7 @@ load_modules if [ -n "$root_evms" ] ; then - get_evms_devices() { - local evms_cmd - local evms_reg - local evms_cont - local evms_seg - local evms_dsk - - if [ ! -x /sbin/evms ]; then - return 1 - fi - - if [ -n "$1" ]; then - evms_cmd="q:r,v=$1" - - while read a b c d; do - if [ "$a $b" = "Region Name:" ]; then - evms_reg="$evms_reg $c" - fi - done < <( echo "$evms_cmd" | /sbin/evms -s -b ) - fi - - : EVMS Region: $evms_reg - - for reg in $evms_reg; do - evms_cmd="q:c,r=$reg" - - while read a b c d; do - if [ "$a $b" = "Container Name:" ]; then - evms_cont="$evms_cont $c" - fi - done < <(echo "$evms_cmd" | /sbin/evms -s -b ) - done - - : EVMS Container: $evms_cont - - for cont in $evms_cont; do - evms_cmd="q:s,c=$cont" - - while read a b c d; do - if [ "$a $b" = "Segment Name:" ]; then - if [ "$evms_seg" ] ; then - for seg in $evms_seg; do - if [ "$c" = "$seg" ] ; then - unset c - break; - fi - done - if [ "$c" ] ; then - evms_seg="$evms_seg $c" - fi - else - evms_seg="$c" - fi - fi - done < <(echo "$evms_cmd" | /sbin/evms -s -b ) - done - - echo "$evms_seg" - } - + create_evms_save_table() { local tblfile=$1 local num=0 @@ -106,9 +47,8 @@ } /sbin/evms_activate - # TODO: what does this do? - evmsdevs=$(get_evms_devices $rootdev) - evmsnum=$(create_evms_save_table /tmp/evms_save_table $evmsdevs) + + evmsnum=$(create_evms_save_table /tmp/evms_save_table) if [ $evmsnum -gt 0 ] ; then /sbin/dmsetup remove_all /sbin/dmsetup create evms_save < /tmp/evms_save_table diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.1/scripts/boot-md.sh new/mkinitrd-2.1/scripts/boot-md.sh --- old/mkinitrd-2.1/scripts/boot-md.sh 2007-08-07 14:34:20.000000000 +0200 +++ new/mkinitrd-2.1/scripts/boot-md.sh 2007-08-09 17:16:59.000000000 +0200 @@ -2,7 +2,7 @@ #%stage: softraid #%programs: /sbin/mdadm #%modules: raid0 raid1 raid5 -#%if: -n "$need_mdadm" -a -z "$root_evms" +#%if: -n "$need_mdadm" # ##### MD (Software-)Raid ## diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.1/scripts/boot-mount.sh new/mkinitrd-2.1/scripts/boot-mount.sh --- old/mkinitrd-2.1/scripts/boot-mount.sh 2007-08-07 14:34:20.000000000 +0200 +++ new/mkinitrd-2.1/scripts/boot-mount.sh 2007-08-09 17:16:59.000000000 +0200 @@ -22,6 +22,9 @@ [ "$( ( set -u; echo $ro >/dev/null; echo 1 ) 2>/dev/null )" = "1" ] && read_only=1 +[ -x /lib/udev/vol_id ] && VOL_ID=/lib/udev/vol_id +[ -x /sbin/vol_id ] && VOL_ID=/sbin/vol_id + # And now for the real thing if ! udev_discover_root ; then echo "not found -- exiting to /bin/sh" @@ -29,8 +32,8 @@ PATH=$PATH PS1='$ ' /bin/sh -i fi -if [ -z "$rootfstype" ]; then - rootfstype=$(/lib/udev/vol_id -t $rootdev) +if [ -z "$rootfstype" -a -n "$VOL_ID" ]; then + rootfstype=$($VOL_ID -t $rootdev) [ $? -ne 0 ] && rootfstype= [ -n "$rootfstype" ] && [ "$rootfstype" = "unknown" ] && $rootfstype= fi diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.1/scripts/setup-evms.sh new/mkinitrd-2.1/scripts/setup-evms.sh --- old/mkinitrd-2.1/scripts/setup-evms.sh 2007-08-07 14:34:20.000000000 +0200 +++ new/mkinitrd-2.1/scripts/setup-evms.sh 2007-08-09 17:16:59.000000000 +0200 @@ -13,7 +13,7 @@ return 1 fi - if [ -n "$1" ]; then + if [ -z "$1" ]; then evms_cmd="q:r" while read a b c d; do @@ -21,12 +21,14 @@ evms_reg="$evms_reg $c" fi done < <( echo "$evms_cmd" | /sbin/evms -s ) + else + evms_reg="$*" fi : EVMS Regions $evms_reg for reg in $evms_reg; do - evms_cmd="q:c,r=$reg" + evms_cmd="q:c,r=$reg\nquit" while read a b c d; do if [ "$a $b" = "Container Name:" ]; then @@ -44,13 +46,13 @@ evms_cont="$c" fi fi - done < <(echo "$evms_cmd" | /sbin/evms -s ) + done < <(echo -e "$evms_cmd" | /sbin/evms -b -s ) done : EVMS Containers $evms_cont for cont in $evms_cont; do - evms_cmd="q:s,c=$cont" + evms_cmd="q:s,c=$cont\nquit" while read a b c d; do if [ "$a $b" = "Segment Name:" ]; then @@ -68,13 +70,13 @@ evms_seg="$c" fi fi - done < <(echo "$evms_cmd" | /sbin/evms -s ) + done < <(echo -e "$evms_cmd" | /sbin/evms -b ) done : EVMS Segments $evms_seg for seg in $evms_seg; do - evms_cmd="q:d,s=$seg" + evms_cmd="q:d,s=$seg\nquit" while read a b c d; do if [ "$a $b $c" = "Logical Disk Name:" ]; then @@ -92,46 +94,13 @@ evms_dsk="$d" fi fi - done < <(echo "$evms_cmd" | /sbin/evms -s ) + done < <(echo -e "$evms_cmd" | /sbin/evms -b ) done echo "$evms_seg" } -create_evms_save_table() { - local tblfile=/tmp/evms_save_table - local tblname=$1 - local num=0 - shift - - rm -f $tblfile - - dmdevs=$(dmsetup info -c --noheadings -o name) - for d in $dmdevs ; do - # Check if device exists (ie is a partition) - if [ ! -e /dev/$d ] ; then - unset d - fi - # Filter out devices used by EVMS region - for e in $*; do - if [ "$d" = "$e" ] ; then - unset d - fi - done - # Create temp table - if [ "$d" ] ; then - echo $(( num * 100 )) 100 linear /dev/$d 0 >> $tblfile - num=$(( num + 1 )) - fi - done - - if [ $num -gt 0 ] ; then - echo dmsetup create $tblname < $tblfile - echo rm -f $tblfile - fi -} - # get information about the current blockdev evms_blockdev= @@ -142,15 +111,15 @@ # EVMS always runs on device-mapper so no device-mapper device means no evms if [ "$blockdriver" = device-mapper ]; then # Check whether we are using EVMS - if [ -x /sbin/evms ] && [ "${blockdev#/dev/evms}" != "$blockdev" ]; then - region=$(echo "q:r" | /sbin/evms -s -b | grep -B 2 "Minor: $blockminor" | sed -n 's@Region Name: \(.\)@\1@p') + if [ -x /sbin/evms ] && [ "${bd#/dev/evms}" != "$bd" ]; then + region=$(echo -e "q:r\nquit" | /sbin/evms -b -s | grep -B 2 "Minor: $blockminor" | sed -n 's@Region Name: \(.\)@\1@p') if [ "$region" ] ; then - volume=$(echo "q:v,r=$region" | /sbin/evms -s -b | sed -n 's@Volume Name: \(.*\)@\1@p') + volume=$(echo -e "q:v,r=$region\nquit" | /sbin/evms -b -s | sed -n 's@Volume Name: \(.*\)@\1@p') if [ -e "$volume" ] ; then root_evms=1 realrootdev=$volume # blockdev="$(get_evms_devices $blockdev)" - evms_blockdev="$evms_blockdev $(dm_resolvedeps $blockdev)" + evms_blockdev="$evms_blockdev $(dm_resolvedeps $bd)" [ $? -eq 0 ] || return 1 fi fi diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.1/scripts/setup-storage.sh new/mkinitrd-2.1/scripts/setup-storage.sh --- old/mkinitrd-2.1/scripts/setup-storage.sh 2007-08-07 14:34:20.000000000 +0200 +++ new/mkinitrd-2.1/scripts/setup-storage.sh 2007-08-09 17:16:59.000000000 +0200 @@ -53,13 +53,13 @@ majorminor2blockdev() { local major=$1 minor=$2 + if [ ! "$minor" ]; then + minor=$(IFS=: ; set -- $major ; echo $2) + major=$(IFS=: ; set -- $major ; echo $1) + fi if [ $major -lt 0 ] ; then return fi - if [ ! "$minor" ]; then - minor=$(echo $major | cut -d : -f 2) - major=$(echo $major | cut -d : -f 1) - fi local retval=$(cat /proc/partitions | egrep "^[ ]*$major[ ]*$minor") echo /dev/${retval##* } } @@ -102,7 +102,7 @@ } dm_resolvedeps() { - local dm_uuid dm_deps dm_dep bd + local dm_deps dm_dep bd local bds="$@" [ ! "$bds" ] && bds=$blockdev # resolve dependencies ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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