summaryrefslogtreecommitdiffstats
path: root/sys-apps/mkinitrd/files/mkinitrd-6.0.93-ds.diff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/mkinitrd/files/mkinitrd-6.0.93-ds.diff')
-rw-r--r--sys-apps/mkinitrd/files/mkinitrd-6.0.93-ds.diff164
1 files changed, 164 insertions, 0 deletions
diff --git a/sys-apps/mkinitrd/files/mkinitrd-6.0.93-ds.diff b/sys-apps/mkinitrd/files/mkinitrd-6.0.93-ds.diff
new file mode 100644
index 0000000..a9fcd0a
--- /dev/null
+++ b/sys-apps/mkinitrd/files/mkinitrd-6.0.93-ds.diff
@@ -0,0 +1,164 @@
+diff -dPNur mkinitrd-6.0.93-patched/functions mkinitrd-6.0.93-patched-ds/functions
+--- mkinitrd-6.0.93-patched/functions 2012-11-19 23:57:17.000000000 +0100
++++ mkinitrd-6.0.93-patched-ds/functions 2012-11-19 23:59:42.000000000 +0100
+@@ -347,6 +347,15 @@
+ resolved="$items"
+ }
+
++get_numeric_dev() {
++(
++ fmt="%d:%d"
++ if [ "$1" = "hex" ]; then
++ fmt="%x:%x"
++ fi
++ ls -lH "$2" | awk '{ sub(/,/, "", $5); printf("'"$fmt"'", $5, $6); }'
++) 2>/dev/null
++}
+
+
+ # vim:ts=8:sw=4:sts=4:et
+diff -dPNur mkinitrd-6.0.93-patched/mkinitrd mkinitrd-6.0.93-patched-ds/mkinitrd
+--- mkinitrd-6.0.93-patched/mkinitrd 2012-11-19 23:57:17.000000000 +0100
++++ mkinitrd-6.0.93-patched-ds/mkinitrd 2012-11-20 00:05:55.000000000 +0100
+@@ -48,8 +48,6 @@
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
+ export PATH
+
+-. /etc/rc.d/init.d/functions
+-
+ # Set the umask. For iscsi, the initrd can contain plaintext
+ # password (chap secret), so only allow read by owner.
+ umask 077
+@@ -111,6 +109,7 @@
+ fi
+
+ $cmd "usage: `basename $0` [--version] [--help] [-v] [-f] [--preload <module>]"
++ $cmd " [--omit-ata-modules] [--busybox]"
+ $cmd " [--force-scsi-probe | --omit-scsi-modules]"
+ $cmd " [--omit-ide-modules]"
+ $cmd " [--image-version] [--force-raid-probe | --omit-raid-modules]"
+@@ -315,6 +314,7 @@
+ if echo $PWD | grep -q /virtio-pci/ ; then
+ findmodule virtio_pci
+ fi
++
+ while [ "$PWD" != "/sys/devices" ]; do
+ deps=
+ if [ -f modalias ]; then
+@@ -325,7 +325,8 @@
+ moduledep $MODALIAS
+ unset MODALIAS
+ fi
+-
++
++ if [ -z "$noata" ] ; then
+ [ -z "$deps" -a -L driver/module ] && \
+ deps=$(basename $(readlink driver/module))
+ for driver in $deps ; do
+@@ -335,6 +336,7 @@
+ [ "$driver" = "ata_piix" ] && findmodule ahci
+ [ "$driver" = "ahci" ] && findmodule ata_piix
+ done
++ fi
+ cd ..
+ done
+ }
+@@ -883,6 +885,12 @@
+ fi
+ PREMODS="$PREMODS $modname"
+ ;;
++ --omit-ata-modules)
++ noata=1
++ ;;
++ --busybox)
++ busybox=1
++ ;;
+ --omit-scsi-modules)
+ PRESCSIMODS=""
+ noscsi=1
+@@ -1289,9 +1297,14 @@
+ vecho "Building initrd in $MNTIMAGE"
+ inst /sbin/nash "$MNTIMAGE" /bin/nash
+ inst /sbin/modprobe "$MNTIMAGE" /bin/modprobe
+-inst /sbin/rmmod "$MNTIMAGE" /bin/rmmod
++#inst /sbin/rmmod "$MNTIMAGE" /bin/rmmod
+ inst /bin/ln "$MNTIMAGE"
+
++if [ -n "$busybox" ]; then
++ inst /bin/bb "$MNTIMAGE"
++ inst /bin/busybox "$MNTIMAGE"
++fi
++
+ if [ -e /etc/fstab.sys ]; then
+ inst /etc/fstab.sys "$MNTIMAGE"
+ fi
+@@ -1599,10 +1612,12 @@
+ /bin/ln -s fb0 /dev/fb
+ EOF
+
++if [ -x /bin/plymouthd ]; then
+ emit "/bin/plymouthd --attach-to-session"
+
+ emit "echo Setting up hotplug."
+ emit "hotplug"
++fi
+
+ # If we have drm loaded, include modesetting drivers
+ if [ "x$PROBE" == "xyes" ]; then
+@@ -1622,9 +1637,13 @@
+ EOF
+ fi
+
++if [ -x /lib/udev/console_init ]; then
+ [ -n "$I18N" ] && emit "/lib/udev/console_init tty0"
++fi
+
++if [ -x /bin/plymouthd ]; then
+ emit "plymouth --show-splash"
++fi
+
+ if [ -x /usr/libexec/plymouth/plymouth-populate-initrd ]; then
+ /usr/libexec/plymouth/plymouth-populate-initrd $(get_verbose) -t "$MNTIMAGE"
+@@ -1699,7 +1718,10 @@
+ emit "echo waiting for encrypted device $1 to appear (timeout 1min)"
+ emit "waitdev --timeout=60000000 $1"
+ emit "mkblkdevs"
++
++ if [ -x /bin/plymouthd ]; then
+ emit "plymouth ask-for-password --command \$LUKSUUID"
++ fi
+ }
+
+ for cryptdev in ${!cryptopart@} ; do
+@@ -1750,7 +1772,10 @@
+
+ emit "echo Mounting root filesystem."
+ emit "mount /sysroot"
++
++if [ -x /bin/plymouthd ]; then
+ emit "cond -ne 0 plymouth --hide-splash"
++fi
+
+ if [ -n "$loopfs" ]; then
+ emit "Cleaning up loop mount."
+@@ -1766,7 +1791,9 @@
+ fi
+
+ emit "loadpolicy"
++if [ -x /bin/plymouthd ]; then
+ emit "plymouth --newroot=/sysroot"
++fi
+ emit "echo Switching to new root and running init."
+
+ if [ ! -z "$BOOTCHART" ]; then
+@@ -1792,6 +1819,10 @@
+ emit "/bin/sleep 1s"
+ fi
+
++if [ -n "$busybox" ]; then
++ emit "/bin/bb"
++fi
++
+ emit "switchroot"
+ emit "echo Booting has failed."
+ emit "sleep -1"