-Index: mod-uvesafb.sh
-===================================================================
---- mod-uvesafb.sh (wersja 12531)
-+++ mod-uvesafb.sh (kopia robocza)
-@@ -40,7 +40,7 @@
- return
- fi
-
-- debug "initrd_gen_uvesafb"
-+ verbose "initrd_gen_uvesafb"
- mknod $DESTDIR/dev/mem c 1 1
- mknod $DESTDIR/dev/tty1 c 4 1
- inst_d /sbin
-Index: mod-scsi.sh
-===================================================================
---- mod-scsi.sh (wersja 12531)
-+++ mod-scsi.sh (kopia robocza)
-@@ -39,7 +39,7 @@
- local n
- for n in $PRESCSIMODS; do
- if [ "X$n" = "Xunknown" ]; then
-- debug "Finding SCSI modules using scsi_hostadapter"
-+ verbose "Finding SCSI modules using scsi_hostadapter"
- local mod scsimodules=$(modprobe_conf | awk '/scsi_hostadapter/ { print $3 }')
- for mod in $scsimodules; do
- # for now allow scsi modules to come from anywhere. There are some
-Index: mod-fbsplash.sh
-===================================================================
---- mod-fbsplash.sh (wersja 12531)
-+++ mod-fbsplash.sh (kopia robocza)
-@@ -42,7 +42,7 @@
- if ! is_yes "$FB_SPLASH"; then
- return
- fi
-- debug "Generating fbsplash"
-+ verbose "Generating fbsplash"
-
- if [ -r /etc/sysconfig/fbsplash ]; then
- . /etc/sysconfig/fbsplash
-@@ -64,7 +64,7 @@
- for res in $FB_SPLASH_RESOLUTIONS; do
- if [ -f "/etc/splash/$SPLASH_THEME/$res.cfg" ]; then
- $fbsplash_geninitramfs -c $DESTDIR -r $res $SPLASH_THEME && \
-- debug "Added $res $SPLASH_THEME theme to initramfs."
-+ verbose "Added $res $SPLASH_THEME theme to initramfs."
- else
- warn "/etc/splash/$SPLASH_THEME/$res.cfg doesn't exist, skipped"
- fi
-Index: mod-udev.sh
-===================================================================
---- mod-udev.sh (wersja 12531)
-+++ mod-udev.sh (kopia robocza)
-@@ -41,7 +41,7 @@
- # generate initrd fragment
- # @access public
- initrd_gen_udev() {
-- debug "Setting up udev..."
-+ verbose "Setting up udev..."
-
- inst_d /sbin /etc/udev
- inst_exec $udevd /sbin/udevd
-@@ -55,7 +55,9 @@
-
- local e
- for e in ata_id cdrom_id collect firmware scsi_id v4l_id; do
-- inst_exec $initrd_dir/udev/$e /lib/udev/$e
-+ if [ -e "$initrd_dir/udev/$e" ]; then
-+ inst_exec $initrd_dir/udev/$e /lib/udev/$e
-+ fi
- done
-
- # blkid installed by mod-blkid
-Index: mod-usbkbd.sh
-===================================================================
---- mod-usbkbd.sh (wersja 12531)
-+++ mod-usbkbd.sh (kopia robocza)
-@@ -4,7 +4,7 @@
- # geninitrd mod: usbkbd
-
- find_modules_usbkbd() {
-- debug "Finding USB keyboard modules"
-+ verbose "Finding USB keyboard modules"
-
- if [ "$(echo /sys/class/input/input*)" = "/sys/class/input/input*" ]; then
- return
-@@ -20,9 +20,9 @@
- if [ "$bInterfaceClass" = "03" -a "$bInterfaceProtocol" = "01" ]; then
- module=$(readlink $i/device/driver/module)
- module=$(basename $module)
--
-+
- if [ -n "$module" ]; then
-- debug "Found USB Keyboard: $(cat $i/name)"
-+ verbose "Found USB Keyboard: $(cat $i/name)"
- modules="$modules $module"
- fi
- fi
-@@ -34,7 +34,7 @@
- module=$(basename $module)
-
- if [ -n "$module" ]; then
-- debug "Found USB Logitech Unifying Device: $(cat $i/name)"
-+ verbose "Found USB Logitech Unifying Device: $(cat $i/name)"
- modules="$modules $module"
- fi
- fi
-Index: tests/partitions2
-===================================================================
---- tests/partitions2 (wersja 0)
-+++ tests/partitions2 (wersja 12560)
-@@ -0,0 +1,24 @@
-+
-+major minor #blocks name
-+
-+ 3 0 78150744 hda
-+ 3 1 216846 hda1
-+ 3 2 20482875 hda2
-+ 3 3 72292 hda3
-+ 3 4 1 hda4
-+ 3 5 136521 hda5
-+ 3 6 9775521 hda6
-+ 3 7 46941898 hda7
-+ 3 8 522081 hda8
-+ 3 64 78150744 hdb
-+ 3 65 128488 hdb1
-+ 3 66 64260 hdb2
-+ 3 67 10241437 hdb3
-+ 3 68 1 hdb4
-+ 3 69 5116671 hdb5
-+ 3 70 9775521 hdb6
-+ 3 71 9775521 hdb7
-+ 3 72 9775521 hdb8
-+ 3 73 33270583 hdb9
-+ 254 0 5107712 dm-0
-+ 9 6 9775360 md6
-Index: tests/initramfs_switchroot.sh
-===================================================================
---- tests/initramfs_switchroot.sh (wersja 12531)
-+++ tests/initramfs_switchroot.sh (kopia robocza)
-@@ -3,6 +3,7 @@
-
- . ./setup-test.sh
- proc=${proc:-/proc}
-+partitions=$proc/partitions
- flags=$-
-
- mount() {
-@@ -10,7 +11,7 @@
- }
-
- mknod() {
-- echo "mknod $@"
-+ : echo "mknod $@"
- }
-
- # parse 'root=xxx' kernel commandline
-@@ -21,25 +22,51 @@
-
- device=
- eval "$(
-- busybox awk -v c="$ROOT" '
-+ busybox awk -v root="$ROOT" '
-+ # http://9fans.net/archive/2006/09/261
-+ function h2d(str, hstr, res, num, n, digit, i) {
-+ hstr = "0123456789abdcef";
-+ res = 0;
-+ n = split(tolower(str), digit, "");
-+
-+ for (i = 1; i <= n; i++) {
-+ num = index(hstr, digit[i]) - 1;
-+ res = res + (num * 16 ^ (n - i));
-+ }
-+printf("# h2d(%s) -> [%s]\n", str, res);
-+
-+ return res;
-+ }
- BEGIN {
-- num_pattern_short = "[0-9a-f][0-9a-f][0-9a-f]";
-- num_pattern = "[0-9a-f]" num_pattern_short;
-+
-+ num_pattern_short = "[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]";
-+ num_pattern = "[0-9a-fA-F]" num_pattern_short;
- dev_pattern = "[hms][a-z][a-z]([0-9])+";
- partition = "";
- min = -1; maj = -1;
-
-- sub("^0x", "", c);
-- if (c ~ "^" num_pattern_short "$") sub("^", "0", c);
-- if (c ~ "^" num_pattern "$") {
-- maj = sprintf("%d",substr(c,1,2));
-- min = sprintf("%d",substr(c,3));
-+ # see if we have /dev/hdX or hdX, we can just take partition name
-+ if (root ~ "^\/dev\/" dev_pattern "$" || root ~ "^" dev_pattern "$") {
-+ partition = root
-+ sub("^/dev/", "", partition);
-+ printf("# partition regexp=%s;\n", partition);
-+
-+ } else {
-+ # unify values first
-+ if (root ~ "^" num_pattern_short "$") {
-+ # change "303" => "0x0303"
-+ root = "0x0" root
-+ } else if (root ~ "^" num_pattern "$") {
-+ # change "0303" => "0x0303"
-+ root = "0x" root
-+ }
-+
-+ maj = h2d(substr(root, 3, 2));
-+ min = h2d(substr(root, 5, 2));
-+printf("# BEGIN: root=[%s] maj=%s, min=%s\n", root, maj, min);
- }
-- if (c ~ "^\/dev\/" dev_pattern "$") sub("^/dev/","", c);
-- if (c ~ "^" dev_pattern "$") partition = c;
-- printf("# BEGIN: partition=%s; maj=%s, min=%s\n", partition, maj, min);
- }
-- { printf("# maj:[%s], min:[%s], part:[%s]\n", $1, $2, $4) }
-+{ printf("# maj:[%s], min:[%s], part:[%s]\n", $1, $2, $4) }
-
- partition && $4 == partition { maj = $1; min = $2; printf("# found partition: %s\n", partition) }
- $1 == maj && $2 == min { partition = $4; printf("# found maj and min: %s, %s\n", maj, min)}
-@@ -52,7 +79,7 @@
- printf("device=/dev/%s;\n", partition);
- }
- }
-- ' $proc/partitions
-+ ' $partitions
- )"
-
- if [ -z "$device" ]; then
-@@ -74,7 +101,7 @@
- # echo "init=$init"
- }
-
--proc=.
-+partitions=./partitions
- ROOTFS=xfs
-
- # We support passing root as hda3 /dev/hda3 0303 0x0303 and 303
-@@ -102,3 +129,22 @@
- runtest <<'EOF'
- mount -t xfs -r /dev/sda3 /newroot
- EOF
-+
-+ROOT=805
-+runtest <<'EOF'
-+mount -t xfs -r /dev/sda5 /newroot
-+EOF
-+
-+# lilo for dm-0
-+partitions=./partitions2
-+ROOT=fe00
-+runtest <<'EOF'
-+mount -t xfs -r /dev/dm-0 /newroot
-+EOF
-+
-+# lilo for dm-0
-+partitions=./partitions2
-+ROOT=FE00
-+runtest <<'EOF'
-+mount -t xfs -r /dev/dm-0 /newroot
-+EOF
-Index: tests/partitions
-===================================================================
---- tests/partitions (wersja 12531)
-+++ tests/partitions (kopia robocza)
-@@ -4,6 +4,7 @@
- 8 1 40131 sda1
- 8 2 8008402 sda2
- 8 3 480335467 sda3
-+ 8 5 384475581 sda5
- 8 16 488386584 sdb
- 8 17 40131 sdb1
- 8 18 8008402 sdb2
-Index: mod-luks.sh
-===================================================================
---- mod-luks.sh (wersja 12531)
-+++ mod-luks.sh (kopia robocza)
-@@ -34,7 +34,7 @@
-
- local dev dm_name=${node#/dev/mapper/}
- if [ "$node" = "$dm_name" ]; then
-- debug "is_luks: $node is not device mapper name"
-+ verbose "is_luks: $node is not device mapper name"
- return 1
- fi
-
-@@ -47,9 +47,9 @@
- fi
-
- if [ $rc = 0 ]; then
-- debug "is_luks: $node is cryptsetup luks"
-+ verbose "is_luks: $node is cryptsetup luks"
- else
-- debug "is_luks: $node is not cryptsetup luks"
-+ verbose "is_luks: $node is not cryptsetup luks"
- fi
- return $rc
- }
-@@ -95,7 +95,7 @@
- initrd_gen_devices
- # TODO: 'udevadm settle' is called by lukssetup, is udev optional?
-
-- debug "luks: process /etc/crypttab $LUKSNAME"
-+ verbose "luks: process /etc/crypttab $LUKSNAME"
- luks_crypttab $LUKSNAME
- }
-
-@@ -144,7 +144,7 @@
- inst $key $keyfile
- fi
-
-- debug "+ cryptsetup ${keyfile:+-d $keyfile} luksOpen '$src' '$dst'"
-+ verbose "+ cryptsetup ${keyfile:+-d $keyfile} luksOpen '$src' '$dst'"
- add_linuxrc <<-EOF
- # cryptsetup can be called twice and in case on crypt on lvm only second
- # will succeed because there will be no src device in first cryptsetup call
-Index: mod-bootsplash.sh
-===================================================================
---- mod-bootsplash.sh (wersja 12531)
-+++ mod-bootsplash.sh (kopia robocza)
-@@ -28,7 +28,7 @@
- fi
- local target="$1"
-
-- debug "Generating bootsplash"
-+ verbose "Generating bootsplash"
-
- if [ ! -x /bin/splash.bin ]; then
- warn "Failed to execute /bin/splash.bin. Is bootsplash package installed?"
-@@ -54,7 +54,7 @@
- for res in $BOOT_SPLASH_RESOLUTIONS; do
- if [ -f "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg" ]; then
- $bootsplash_geninitramfs -s -f "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg" >> "$target" && \
-- debug "Added $res $THEME theme to initrd."
-+ verbose "Added $res $THEME theme to initrd."
- else
- warn "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg doesn't exist, skipped"
- fi
-Index: mod-suspend.sh
-===================================================================
---- mod-suspend.sh (wersja 12531)
-+++ mod-suspend.sh (kopia robocza)
-@@ -36,7 +36,7 @@
- # save suspend VG int oseparate var
- LVM_SUSPENDVG=$LVM_VGVOLUMES
- LVM_VGVOLUMES=$vgvolumes
-- debug "suspend device is on LVM"
-+ verbose "suspend device is on LVM"
- fi
- }
-
-@@ -47,7 +47,7 @@
- return
- fi
-
-- debug "Setting up suspend..."
-+ verbose "Setting up suspend..."
-
- mknod $DESTDIR/dev/snapshot c 10 231
- mkdir -p $DESTDIR${resume_dev%/*}
-Index: mod-blkid.sh
-===================================================================
---- mod-blkid.sh (wersja 12531)
-+++ mod-blkid.sh (kopia robocza)
-@@ -22,7 +22,7 @@
- if ! is_yes "$USE_BLKID"; then
- return
- fi
-- debug "Adding BLKID support to initrd"
-+ verbose "Adding BLKID support to initrd"
-
- inst_exec $blkid /bin/blkid
- initrd_gen_devices
-Index: mod-nfs.sh
-===================================================================
---- mod-nfs.sh (wersja 12531)
-+++ mod-nfs.sh (kopia robocza)
-@@ -56,7 +56,7 @@
-
- # use root=/dev/ram0 init=/linuxrc when starting kernel or you will
- # have problems like init(XX) being child process of swapper(1).
-- debug "Adding rootfs on NFS support to initrd (dhcp)"
-+ verbose "Adding rootfs on NFS support to initrd (dhcp)"
- mknod "$DESTDIR/dev/urandom" c 1 9
- mkdir "$DESTDIR/newroot"
- add_linuxrc <<-'EOF'
-Index: mod-condecor.sh
-===================================================================
---- mod-condecor.sh (wersja 12531)
-+++ mod-condecor.sh (kopia robocza)
-@@ -26,7 +26,7 @@
- if ! is_yes "$FB_CON_DECOR"; then
- return
- fi
-- debug "Generating fbcondecor"
-+ verbose "Generating fbcondecor"
-
- if [ -r /etc/sysconfig/splash ]; then
- . /etc/sysconfig/splash
-@@ -48,7 +48,7 @@
- for res in $FB_SPLASH_RESOLUTIONS; do
- if [ -f "/etc/splash/$SPLASH_THEME/$res.cfg" ]; then
- $condecor_geninitramfs -c $DESTDIR -r $res $SPLASH_THEME && \
-- debug "Added $res $SPLASH_THEME theme to initramfs."
-+ verbose "Added $res $SPLASH_THEME theme to initramfs."
- else
- warn "/etc/splash/$SPLASH_THEME/$res.cfg doesn't exist, skipped"
- fi