dracut-043-172.git20151113
- git snapshot
This commit is contained in:
parent
368a0cb66f
commit
bb31e7fe65
31
0048-remove-the-incomplete-.img-file.patch
Normal file
31
0048-remove-the-incomplete-.img-file.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 7eeaa4ab146907eb56bc03d4aeba1feea8357c1e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chao Fan <cfan@redhat.com>
|
||||||
|
Date: Tue, 21 Jul 2015 17:18:42 +0800
|
||||||
|
Subject: [PATCH] remove the incomplete .img file
|
||||||
|
|
||||||
|
If the directory where the .img file is saved has no enough space, or in
|
||||||
|
other wrong conditions, dracut will get an incomplete file xxx.img. But
|
||||||
|
sometimes this .img file will be loaded when rebooting the system. And then
|
||||||
|
some bugs will happen because this .img file is wrong.
|
||||||
|
|
||||||
|
So I think dracut should remove the incomplete file because this .img file
|
||||||
|
with problems was made by dracut. And then the wrong file will not be loaded
|
||||||
|
anymore.
|
||||||
|
|
||||||
|
Signed-off-by: Chao Fan <cfan@redhat.com>
|
||||||
|
---
|
||||||
|
dracut.sh | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/dracut.sh b/dracut.sh
|
||||||
|
index ee0a039..122ae0c 100755
|
||||||
|
--- a/dracut.sh
|
||||||
|
+++ b/dracut.sh
|
||||||
|
@@ -1651,6 +1651,7 @@ if ! (
|
||||||
|
| $compress >> "$outfile"
|
||||||
|
); then
|
||||||
|
dfatal "dracut: creation of $outfile failed"
|
||||||
|
+ rm -f $outfile
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
dinfo "*** Creating initrd image file '$outfile' done ***"
|
@ -0,0 +1,25 @@
|
|||||||
|
From da5304aabcb7c1b541a8eeabc69627f05ad47c09 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexander Tsoy <alexander@tsoy.me>
|
||||||
|
Date: Tue, 28 Jul 2015 14:55:59 +0300
|
||||||
|
Subject: [PATCH] dracut-initramfs-restore: make mount error nonfatal
|
||||||
|
|
||||||
|
Script enables errexit option (set -e). So if /boot is not a mount point
|
||||||
|
or is already mounted, then script dies after unsuccessful mount
|
||||||
|
command. Fix this by always returning successful result.
|
||||||
|
---
|
||||||
|
dracut-initramfs-restore.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh
|
||||||
|
index 0e6a1a8..0c41a59 100644
|
||||||
|
--- a/dracut-initramfs-restore.sh
|
||||||
|
+++ b/dracut-initramfs-restore.sh
|
||||||
|
@@ -14,7 +14,7 @@ SKIP="$dracutbasedir/skipcpio"
|
||||||
|
|
||||||
|
[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
|
||||||
|
|
||||||
|
-mount -o ro /boot &>/dev/null
|
||||||
|
+mount -o ro /boot &>/dev/null || true
|
||||||
|
|
||||||
|
if [[ $MACHINE_ID ]] && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]] ; then
|
||||||
|
IMG="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
|
32
0062-network-net-lib.sh-add-is_ip.patch
Normal file
32
0062-network-net-lib.sh-add-is_ip.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 01b23b6900eabefbfd1f589b9f12c8ff38c5afc0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 12 Aug 2015 14:24:05 +0200
|
||||||
|
Subject: [PATCH] network/net-lib.sh: add is_ip()
|
||||||
|
|
||||||
|
add function to test if string is a valid IP
|
||||||
|
---
|
||||||
|
modules.d/40network/net-lib.sh | 12 ++++++++++++
|
||||||
|
1 file changed, 12 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
||||||
|
index 68bc095..5c65a2e 100755
|
||||||
|
--- a/modules.d/40network/net-lib.sh
|
||||||
|
+++ b/modules.d/40network/net-lib.sh
|
||||||
|
@@ -1,5 +1,17 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
+is_ip() {
|
||||||
|
+ echo "$1" | {
|
||||||
|
+ IFS=. read a b c d
|
||||||
|
+ test "$a" -ge 0 -a "$a" -le 255 \
|
||||||
|
+ -a "$b" -ge 0 -a "$b" -le 255 \
|
||||||
|
+ -a "$c" -ge 0 -a "$c" -le 255 \
|
||||||
|
+ -a "$d" -ge 0 -a "$d" -le 255 \
|
||||||
|
+ 2> /dev/null
|
||||||
|
+ } && return 0
|
||||||
|
+ return 1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
get_ip() {
|
||||||
|
local iface="$1" ip=""
|
||||||
|
ip=$(ip -o -f inet addr show $iface)
|
21
0063-systemd-add-systemd-run-and-systemd-escape.patch
Normal file
21
0063-systemd-add-systemd-run-and-systemd-escape.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
From b1b704bd67d0b397585618affcf12ad30ceae183 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 12 Aug 2015 14:24:45 +0200
|
||||||
|
Subject: [PATCH] systemd: add systemd-run and systemd-escape
|
||||||
|
|
||||||
|
---
|
||||||
|
modules.d/00systemd/module-setup.sh | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
|
||||||
|
index e763d9f..da95aee 100755
|
||||||
|
--- a/modules.d/00systemd/module-setup.sh
|
||||||
|
+++ b/modules.d/00systemd/module-setup.sh
|
||||||
|
@@ -129,6 +129,7 @@ install() {
|
||||||
|
echo swapoff \
|
||||||
|
kmod insmod rmmod modprobe modinfo depmod lsmod \
|
||||||
|
mount umount reboot poweroff \
|
||||||
|
+ systemd-run systemd-escape \
|
||||||
|
systemd-cgls systemd-tmpfiles
|
||||||
|
|
||||||
|
inst_multiple -o \
|
@ -0,0 +1,37 @@
|
|||||||
|
From 4e9ba952bfa607ac47bfe3cf4943ae3386da22bc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 12 Aug 2015 14:25:23 +0200
|
||||||
|
Subject: [PATCH] network/parse-ip-opts.sh: assume rd.neednet for multiple ip
|
||||||
|
options
|
||||||
|
|
||||||
|
set rd.neednet on the kernel cmdline to disable this behaviour
|
||||||
|
---
|
||||||
|
modules.d/40network/parse-ip-opts.sh | 8 +++++---
|
||||||
|
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
|
||||||
|
index a481b46..33bb068 100755
|
||||||
|
--- a/modules.d/40network/parse-ip-opts.sh
|
||||||
|
+++ b/modules.d/40network/parse-ip-opts.sh
|
||||||
|
@@ -36,8 +36,10 @@ unset count
|
||||||
|
# If needed, check if bootdev= contains anything usable
|
||||||
|
BOOTDEV=$(getarg bootdev=)
|
||||||
|
|
||||||
|
-if [ -n "$NEEDBOOTDEV" ] ; then
|
||||||
|
- [ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines"
|
||||||
|
+if [ -n "$NEEDBOOTDEV" ] && getargbool 1 rd.neednet; then
|
||||||
|
+ #[ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines"
|
||||||
|
+ echo "rd.neednet=1" > /etc/cmdline.d/dracut-neednet.conf
|
||||||
|
+ info "Multiple ip= arguments: assuming rd.neednet=1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check ip= lines
|
||||||
|
@@ -48,7 +50,7 @@ for p in $(getargs ip=); do
|
||||||
|
# make first device specified the BOOTDEV
|
||||||
|
if [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then
|
||||||
|
BOOTDEV="$dev"
|
||||||
|
- [ -n "$NEEDBOOTDEV" ] && warn "Setting bootdev to '$BOOTDEV'"
|
||||||
|
+ [ -n "$NEEDBOOTDEV" ] && info "Setting bootdev to '$BOOTDEV'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# skip ibft since we did it above
|
@ -0,0 +1,23 @@
|
|||||||
|
From 50e86bf02be003f3de6214f8012e62edde0085fc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 12 Aug 2015 14:27:01 +0200
|
||||||
|
Subject: [PATCH] nfs/parse-nfsroot.sh: silence useless warning if netroot is
|
||||||
|
not nfs
|
||||||
|
|
||||||
|
---
|
||||||
|
modules.d/95nfs/parse-nfsroot.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95nfs/parse-nfsroot.sh b/modules.d/95nfs/parse-nfsroot.sh
|
||||||
|
index 2200cad..54f73d8 100755
|
||||||
|
--- a/modules.d/95nfs/parse-nfsroot.sh
|
||||||
|
+++ b/modules.d/95nfs/parse-nfsroot.sh
|
||||||
|
@@ -38,7 +38,7 @@ if [ -n "$netroot" ] ; then
|
||||||
|
[ "$n" = "$netroot" ] && break
|
||||||
|
done
|
||||||
|
if [ "$n" = "$netroot" ]; then
|
||||||
|
- warn "Ignoring netroot argument for NFS"
|
||||||
|
+ #warn "Ignoring netroot argument for NFS"
|
||||||
|
netroot=$root
|
||||||
|
fi
|
||||||
|
else
|
@ -0,0 +1,22 @@
|
|||||||
|
From 8ba684be1c04976204d2b671ab90cb27791f467b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 12 Aug 2015 14:27:39 +0200
|
||||||
|
Subject: [PATCH] dracut-systemd/dracut-initqueue.sh: be verbose about timeout
|
||||||
|
|
||||||
|
Issue a warning, if timeout scripts are executed
|
||||||
|
---
|
||||||
|
modules.d/98dracut-systemd/dracut-initqueue.sh | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/modules.d/98dracut-systemd/dracut-initqueue.sh b/modules.d/98dracut-systemd/dracut-initqueue.sh
|
||||||
|
index af9cec2..881f639 100755
|
||||||
|
--- a/modules.d/98dracut-systemd/dracut-initqueue.sh
|
||||||
|
+++ b/modules.d/98dracut-systemd/dracut-initqueue.sh
|
||||||
|
@@ -55,6 +55,7 @@ while :; do
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $main_loop -gt $((2*$RDRETRY/3)) ]; then
|
||||||
|
+ warn "dracut-initqueue timeout - starting timeout scripts"
|
||||||
|
for job in $hookdir/initqueue/timeout/*.sh; do
|
||||||
|
[ -e "$job" ] || break
|
||||||
|
job=$job . $job
|
@ -0,0 +1,65 @@
|
|||||||
|
From f41720c3115011afb9577ed063a4bc521dc707ec Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 12 Aug 2015 14:28:45 +0200
|
||||||
|
Subject: [PATCH] base/dracut-lib.sh: forget about the idea of output
|
||||||
|
redirection
|
||||||
|
|
||||||
|
It's just not working :-/
|
||||||
|
---
|
||||||
|
modules.d/99base/dracut-lib.sh | 24 ++++--------------------
|
||||||
|
1 file changed, 4 insertions(+), 20 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
|
||||||
|
index 200c263..1eaf4b3 100755
|
||||||
|
--- a/modules.d/99base/dracut-lib.sh
|
||||||
|
+++ b/modules.d/99base/dracut-lib.sh
|
||||||
|
@@ -51,45 +51,29 @@ str_ends() {
|
||||||
|
[ "${1%*"$2"}" != "$1" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
-# Dup stdout and stderr, so that subshell redirection does not affect logging.
|
||||||
|
-if [ -z "$DRACUT_STDOUT" ]; then
|
||||||
|
- if [ -n "$BASH" ]; then
|
||||||
|
- readonly DRACUT_STDOUT=98
|
||||||
|
- readonly DRACUT_STDERR=98
|
||||||
|
- exec 98>&1
|
||||||
|
- exec 99>&2
|
||||||
|
- else
|
||||||
|
- readonly DRACUT_STDOUT=8
|
||||||
|
- readonly DRACUT_STDERR=9
|
||||||
|
- exec 8>&1
|
||||||
|
- exec 9>&2
|
||||||
|
- fi
|
||||||
|
-fi
|
||||||
|
-
|
||||||
|
-
|
||||||
|
if [ -z "$DRACUT_SYSTEMD" ]; then
|
||||||
|
|
||||||
|
warn() {
|
||||||
|
check_quiet
|
||||||
|
echo "<28>dracut Warning: $*" > /dev/kmsg
|
||||||
|
- echo "dracut Warning: $*" >&$DRACUT_STDERR
|
||||||
|
+ echo "dracut Warning: $*" >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
info() {
|
||||||
|
check_quiet
|
||||||
|
echo "<30>dracut: $*" > /dev/kmsg
|
||||||
|
[ "$DRACUT_QUIET" != "yes" ] && \
|
||||||
|
- echo "dracut: $*" >&$DRACUT_STDERR
|
||||||
|
+ echo "dracut: $*" >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
warn() {
|
||||||
|
- echo "Warning: $*" >&$DRACUT_STDERR
|
||||||
|
+ echo "Warning: $*" >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
info() {
|
||||||
|
- echo "$*" >&$DRACUT_STDOUT
|
||||||
|
+ echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
fi
|
295
0068-iscsi-integrate-with-systemd-and-improve-robustness.patch
Normal file
295
0068-iscsi-integrate-with-systemd-and-improve-robustness.patch
Normal file
@ -0,0 +1,295 @@
|
|||||||
|
From d94050ddaea8343d8adb8f151c8f4cad591d29d9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 12 Aug 2015 14:33:49 +0200
|
||||||
|
Subject: [PATCH] iscsi: integrate with systemd and improve robustness
|
||||||
|
|
||||||
|
parse-cmdline sets up an initial initiator-name to let iscsid start.
|
||||||
|
|
||||||
|
iscsid is started before doing any iscsistart business.
|
||||||
|
|
||||||
|
iscsistart is done with systemd-run asynchrone to do things in
|
||||||
|
paralllel. Also restarted for every new interface which shows up.
|
||||||
|
|
||||||
|
If rd.iscsi.waitnet (default) is set, iscsistart is done only
|
||||||
|
after all interfaces are up.
|
||||||
|
|
||||||
|
If not all interfaces are up and rd.iscsi.testroute (default) is set,
|
||||||
|
the route to a iscsi target IP is checked and skipped, if there is none.
|
||||||
|
|
||||||
|
If all things fail, we issue a "dummy" interface iscsiroot to retry
|
||||||
|
everything in the initqueue/timeout.
|
||||||
|
---
|
||||||
|
modules.d/95iscsi/cleanup-iscsi.sh | 2 +-
|
||||||
|
modules.d/95iscsi/iscsiroot.sh | 116 ++++++++++++++++++++++++-----------
|
||||||
|
modules.d/95iscsi/module-setup.sh | 31 ++++++++++
|
||||||
|
modules.d/95iscsi/parse-iscsiroot.sh | 13 +++-
|
||||||
|
4 files changed, 125 insertions(+), 37 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95iscsi/cleanup-iscsi.sh b/modules.d/95iscsi/cleanup-iscsi.sh
|
||||||
|
index e97d65a..bfc8aef 100755
|
||||||
|
--- a/modules.d/95iscsi/cleanup-iscsi.sh
|
||||||
|
+++ b/modules.d/95iscsi/cleanup-iscsi.sh
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
-[ -e /sys/module/bnx2i ] && killproc iscsiuio
|
||||||
|
+[ -z "${DRACUT_SYSTEMD}" ] && [ -e /sys/module/bnx2i ] && killproc iscsiuio
|
||||||
|
|
||||||
|
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
index 460e438..fc62425 100755
|
||||||
|
--- a/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
+++ b/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
@@ -36,7 +36,7 @@ iroot=${iroot#:}
|
||||||
|
# figured out a way how to check whether this is built-in or not
|
||||||
|
modprobe crc32c 2>/dev/null
|
||||||
|
|
||||||
|
-if [ -e /sys/module/bnx2i ] && ! [ -e /tmp/iscsiuio-started ]; then
|
||||||
|
+if [ -z "${DRACUT_SYSTEMD}" ] && [ -e /sys/module/bnx2i ] && ! [ -e /tmp/iscsiuio-started ]; then
|
||||||
|
iscsiuio
|
||||||
|
> /tmp/iscsiuio-started
|
||||||
|
fi
|
||||||
|
@@ -105,28 +105,47 @@ handle_netroot()
|
||||||
|
|
||||||
|
parse_iscsi_root "$1" || return 1
|
||||||
|
|
||||||
|
+ # Bail out early, if there is no route to the destination
|
||||||
|
+ if is_ip "$iscsi_target_ip" && [ "$netif" != "dummy" ] && ! all_ifaces_up && getargbool 1 rd.iscsi.testroute; then
|
||||||
|
+ ip route get "$iscsi_target_ip" >/dev/null 2>&1 || return 0
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
# XXX is this needed?
|
||||||
|
getarg ro && iscsirw=ro
|
||||||
|
getarg rw && iscsirw=rw
|
||||||
|
fsopts=${fsopts:+$fsopts,}${iscsirw}
|
||||||
|
|
||||||
|
+ if [ -z $iscsi_initiator ] && [ -f /sys/firmware/ibft/initiator/initiator-name ] && ! [ -f /tmp/iscsi_set_initiator ]; then
|
||||||
|
+ iscsi_initiator=$(while read line || [ -n "$line" ]; do echo $line;done < /sys/firmware/ibft/initiator/initiator-name)
|
||||||
|
+ echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi
|
||||||
|
+ rm -f /etc/iscsi/initiatorname.iscsi
|
||||||
|
+ mkdir -p /etc/iscsi
|
||||||
|
+ ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
||||||
|
+ systemctl restart iscsid
|
||||||
|
+ sleep 1
|
||||||
|
+ > /tmp/iscsi_set_initiator
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
if [ -z $iscsi_initiator ]; then
|
||||||
|
- # XXX Where are these from?
|
||||||
|
+ [ -f /run/initiatorname.iscsi ] && . /run/initiatorname.iscsi
|
||||||
|
[ -f /etc/initiatorname.iscsi ] && . /etc/initiatorname.iscsi
|
||||||
|
[ -f /etc/iscsi/initiatorname.iscsi ] && . /etc/iscsi/initiatorname.iscsi
|
||||||
|
iscsi_initiator=$InitiatorName
|
||||||
|
-
|
||||||
|
- # XXX rfc3720 says 'SCSI Initiator Name: The iSCSI Initiator Name specifies
|
||||||
|
- # the worldwide unique name of the initiator.' Could we use hostname/ip
|
||||||
|
- # if missing?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z $iscsi_initiator ]; then
|
||||||
|
- if [ -f /sys/firmware/ibft/initiator/initiator-name ]; then
|
||||||
|
- iscsi_initiator=$(while read line || [ -n "$line" ]; do echo $line;done < /sys/firmware/ibft/initiator/initiator-name)
|
||||||
|
- fi
|
||||||
|
+ iscsi_initiator=$(iscsi-iname)
|
||||||
|
+ echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi
|
||||||
|
+ rm -f /etc/iscsi/initiatorname.iscsi
|
||||||
|
+ mkdir -p /etc/iscsi
|
||||||
|
+ ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
||||||
|
+ systemctl restart iscsid
|
||||||
|
+ > /tmp/iscsi_set_initiator
|
||||||
|
+ # FIXME: iscsid is not yet ready, when the service is :-/
|
||||||
|
+ sleep 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
+
|
||||||
|
if [ -z $iscsi_target_port ]; then
|
||||||
|
iscsi_target_port=3260
|
||||||
|
fi
|
||||||
|
@@ -135,23 +154,21 @@ handle_netroot()
|
||||||
|
iscsi_target_group=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- if [ -z $iscsi_initiator ]; then
|
||||||
|
- # XXX is this correct?
|
||||||
|
- iscsi_initiator=$(iscsi-iname)
|
||||||
|
- fi
|
||||||
|
-
|
||||||
|
if [ -z $iscsi_lun ]; then
|
||||||
|
iscsi_lun=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
- echo "InitiatorName='$iscsi_initiator'" > /run/initiatorname.iscsi
|
||||||
|
+ echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi
|
||||||
|
ln -fs /run/initiatorname.iscsi /dev/.initiatorname.iscsi
|
||||||
|
-
|
||||||
|
+ if ! [ -e /etc/iscsi/initiatorname.iscsi ]; then
|
||||||
|
+ mkdir -p /etc/iscsi
|
||||||
|
+ ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
||||||
|
+ fi
|
||||||
|
# FIXME $iscsi_protocol??
|
||||||
|
|
||||||
|
- if [ "$root" = "dhcp" ]; then
|
||||||
|
+ if [ "$root" = "dhcp" ] || [ "$netroot" = "dhcp" ]; then
|
||||||
|
# if root is not specified try to mount the whole iSCSI LUN
|
||||||
|
- printf 'SYMLINK=="disk/by-path/*-iscsi-*-%s", SYMLINK+="root"\n' $iscsi_lun >> /etc/udev/rules.d/99-iscsi-root.rules
|
||||||
|
+ printf 'SYMLINK=="disk/by-path/*-iscsi-*-%s", SYMLINK+="root"\n' "$iscsi_lun" >> /etc/udev/rules.d/99-iscsi-root.rules
|
||||||
|
udevadm control --reload
|
||||||
|
write_fs_tab /dev/root
|
||||||
|
wait_for_dev -n /dev/root
|
||||||
|
@@ -161,29 +178,58 @@ handle_netroot()
|
||||||
|
echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > $hookdir/mount/01-$$-iscsi.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
- # force udevsettle to break
|
||||||
|
- > $hookdir/initqueue/work
|
||||||
|
-
|
||||||
|
- iscsistart -i $iscsi_initiator -t $iscsi_target_name \
|
||||||
|
- -g $iscsi_target_group -a $iscsi_target_ip \
|
||||||
|
- -p $iscsi_target_port \
|
||||||
|
- ${iscsi_username:+-u $iscsi_username} \
|
||||||
|
- ${iscsi_password:+-w $iscsi_password} \
|
||||||
|
- ${iscsi_in_username:+-U $iscsi_in_username} \
|
||||||
|
- ${iscsi_in_password:+-W $iscsi_in_password} \
|
||||||
|
- ${iscsi_iface_name:+--param iface.iscsi_ifacename=$iscsi_iface_name} \
|
||||||
|
- ${iscsi_netdev_name:+--param iface.net_ifacename=$iscsi_netdev_name} \
|
||||||
|
- ${iscsi_param} \
|
||||||
|
- || :
|
||||||
|
-
|
||||||
|
+ if [ -n "$DRACUT_SYSTEMD" ] && command -v systemd-run >/dev/null 2>&1; then
|
||||||
|
+ netroot_enc=$(systemd-escape "iscsistart_${1}")
|
||||||
|
+ status=$(systemctl is-active "$netroot_enc" 2>/dev/null)
|
||||||
|
+ is_active=$?
|
||||||
|
+ if [ $is_active -ne 0 ]; then
|
||||||
|
+ if [ "$status" != "activating" ] && ! systemctl is-failed "$netroot_enc" >/dev/null 2>&1; then
|
||||||
|
+ systemd-run --no-block --service-type=oneshot --remain-after-exit --quiet \
|
||||||
|
+ --description="Login iSCSI Target $iscsi_target_name" \
|
||||||
|
+ --unit="$netroot_enc" -- \
|
||||||
|
+ $(command -v iscsistart) \
|
||||||
|
+ -i $iscsi_initiator -t $iscsi_target_name \
|
||||||
|
+ -g $iscsi_target_group -a $iscsi_target_ip \
|
||||||
|
+ -p $iscsi_target_port \
|
||||||
|
+ ${iscsi_username:+-u $iscsi_username} \
|
||||||
|
+ ${iscsi_password:+-w $iscsi_password} \
|
||||||
|
+ ${iscsi_in_username:+-U $iscsi_in_username} \
|
||||||
|
+ ${iscsi_in_password:+-W $iscsi_in_password} \
|
||||||
|
+ ${iscsi_iface_name:+--param iface.iscsi_ifacename=$iscsi_iface_name} \
|
||||||
|
+ ${iscsi_netdev_name:+--param iface.net_ifacename=$iscsi_netdev_name} \
|
||||||
|
+ ${iscsi_param} >/dev/null 2>&1
|
||||||
|
+ else
|
||||||
|
+ systemctl --no-block restart "$netroot_enc" >/dev/null 2>&1
|
||||||
|
+ fi
|
||||||
|
+ fi
|
||||||
|
+ else
|
||||||
|
+ > $hookdir/initqueue/work
|
||||||
|
+ iscsistart -i $iscsi_initiator -t $iscsi_target_name \
|
||||||
|
+ -g $iscsi_target_group -a $iscsi_target_ip \
|
||||||
|
+ -p $iscsi_target_port \
|
||||||
|
+ ${iscsi_username:+-u $iscsi_username} \
|
||||||
|
+ ${iscsi_password:+-w $iscsi_password} \
|
||||||
|
+ ${iscsi_in_username:+-U $iscsi_in_username} \
|
||||||
|
+ ${iscsi_in_password:+-W $iscsi_in_password} \
|
||||||
|
+ ${iscsi_iface_name:+--param iface.iscsi_ifacename=$iscsi_iface_name} \
|
||||||
|
+ ${iscsi_netdev_name:+--param iface.net_ifacename=$iscsi_netdev_name} \
|
||||||
|
+ ${iscsi_param} \
|
||||||
|
+ || :
|
||||||
|
+ fi
|
||||||
|
netroot_enc=$(str_replace "$1" '/' '\2f')
|
||||||
|
echo 'started' > "/tmp/iscsistarted-iscsi:${netroot_enc}"
|
||||||
|
+ return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
ret=0
|
||||||
|
|
||||||
|
+if [ "$netif" != "dummy" ] && getargbool 1 rd.iscsi.waitnet; then
|
||||||
|
+ all_ifaces_up || exit 0
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
# loop over all netroot parameter
|
||||||
|
-if getarg netroot; then
|
||||||
|
+netroot=$(getarg netroot)
|
||||||
|
+if [ $? -eq 0 ] && [ "$netroot" != "dhcp" ]; then
|
||||||
|
for nroot in $(getargs netroot); do
|
||||||
|
[ "${nroot%%:*}" = "iscsi" ] || continue
|
||||||
|
nroot="${nroot##iscsi:}"
|
||||||
|
@@ -210,6 +256,6 @@ fi
|
||||||
|
|
||||||
|
need_shutdown
|
||||||
|
|
||||||
|
-# now we have a root filesystem somewhere in /dev/sda*
|
||||||
|
+# now we have a root filesystem somewhere in /dev/sd*
|
||||||
|
# let the normal block handler handle root=
|
||||||
|
exit $ret
|
||||||
|
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
||||||
|
index 406a9da..3002591 100755
|
||||||
|
--- a/modules.d/95iscsi/module-setup.sh
|
||||||
|
+++ b/modules.d/95iscsi/module-setup.sh
|
||||||
|
@@ -226,6 +226,37 @@ install() {
|
||||||
|
inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot"
|
||||||
|
if ! dracut_module_included "systemd"; then
|
||||||
|
inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh"
|
||||||
|
+ else
|
||||||
|
+ inst_multiple -o \
|
||||||
|
+ $systemdsystemunitdir/iscsi.service \
|
||||||
|
+ $systemdsystemunitdir/iscsid.service \
|
||||||
|
+ $systemdsystemunitdir/iscsid.socket \
|
||||||
|
+ $systemdsystemunitdir/iscsiuio.service \
|
||||||
|
+ $systemdsystemunitdir/iscsiuio.socket \
|
||||||
|
+ iscsiadm iscsid
|
||||||
|
+
|
||||||
|
+ mkdir -p "${initdir}/$systemdsystemunitdir/sockets.target.wants"
|
||||||
|
+ for i in \
|
||||||
|
+ iscsiuio.socket \
|
||||||
|
+ ; do
|
||||||
|
+ ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/sockets.target.wants/${i}"
|
||||||
|
+ done
|
||||||
|
+
|
||||||
|
+ mkdir -p "${initdir}/$systemdsystemunitdir/basic.target.wants"
|
||||||
|
+ for i in \
|
||||||
|
+ iscsid.service \
|
||||||
|
+ ; do
|
||||||
|
+ ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/basic.target.wants/${i}"
|
||||||
|
+ done
|
||||||
|
+
|
||||||
|
+ # Make sure iscsid is started after dracut-cmdline and ready for the initqueue
|
||||||
|
+ mkdir -p "${initdir}/$systemdsystemunitdir/iscsid.service.d"
|
||||||
|
+ (
|
||||||
|
+ echo "[Unit]"
|
||||||
|
+ echo "After=dracut-cmdline.service"
|
||||||
|
+ echo "Before=dracut-initqueue.service"
|
||||||
|
+ ) > "${initdir}/$systemdsystemunitdir/iscsid.service.d/dracut.conf"
|
||||||
|
fi
|
||||||
|
+
|
||||||
|
dracut_need_initqueue
|
||||||
|
}
|
||||||
|
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
index 52f7a97..2532ada 100755
|
||||||
|
--- a/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
@@ -62,9 +62,10 @@ if [ -n "$iscsi_firmware" ] ; then
|
||||||
|
[ -z "$netroot" ] && netroot=iscsi:
|
||||||
|
modprobe -b -q iscsi_boot_sysfs 2>/dev/null
|
||||||
|
modprobe -b -q iscsi_ibft
|
||||||
|
- initqueue --onetime --timeout /sbin/iscsiroot dummy "$netroot" "$NEWROOT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
+initqueue --onetime --timeout /sbin/iscsiroot dummy "$netroot" "$NEWROOT"
|
||||||
|
+
|
||||||
|
# If it's not iscsi we don't continue
|
||||||
|
[ "${netroot%%:*}" = "iscsi" ] || return
|
||||||
|
|
||||||
|
@@ -86,6 +87,16 @@ if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; the
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
+if arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=) && [ -n "$arg" ]; then
|
||||||
|
+ iscsi_initiator=$arg
|
||||||
|
+ echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi
|
||||||
|
+ ln -fs /run/initiatorname.iscsi /dev/.initiatorname.iscsi
|
||||||
|
+ if ! [ -e /etc/iscsi/initiatorname.iscsi ]; then
|
||||||
|
+ mkdir -p /etc/iscsi
|
||||||
|
+ ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
||||||
|
+ fi
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
if [ -n "$iscsi_firmware" ] ; then
|
||||||
|
echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh
|
||||||
|
else
|
23
0069-TEST-30-ISCSI-dhcpd.conf-set-the-LUN.patch
Normal file
23
0069-TEST-30-ISCSI-dhcpd.conf-set-the-LUN.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
From 52b91b66980d0de18a52c6c1c5334364b115fee2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 12 Aug 2015 14:40:42 +0200
|
||||||
|
Subject: [PATCH] TEST-30-ISCSI/dhcpd.conf: set the LUN
|
||||||
|
|
||||||
|
set the LUN, so the udev rule to mount the disk matches
|
||||||
|
---
|
||||||
|
test/TEST-30-ISCSI/dhcpd.conf | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/test/TEST-30-ISCSI/dhcpd.conf b/test/TEST-30-ISCSI/dhcpd.conf
|
||||||
|
index 6eb035b..22c1790 100644
|
||||||
|
--- a/test/TEST-30-ISCSI/dhcpd.conf
|
||||||
|
+++ b/test/TEST-30-ISCSI/dhcpd.conf
|
||||||
|
@@ -15,7 +15,7 @@ subnet 192.168.50.0 netmask 255.255.255.0 {
|
||||||
|
# NFSv3: last octect starts at 0x00 and works up
|
||||||
|
|
||||||
|
group {
|
||||||
|
- option root-path "iscsi:192.168.50.1::::iqn.2009-06.dracut:target0";
|
||||||
|
+ option root-path "iscsi:192.168.50.1:::1:iqn.2009-06.dracut:target0";
|
||||||
|
|
||||||
|
host iscsi-1 {
|
||||||
|
hardware ethernet 52:54:00:12:34:00;
|
226
0070-TEST-30-ISCSI-switch-to-scsi-target-utils.patch
Normal file
226
0070-TEST-30-ISCSI-switch-to-scsi-target-utils.patch
Normal file
@ -0,0 +1,226 @@
|
|||||||
|
From c22c43f81a5f15c8759e6aa69773d0e9010c4741 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 12 Aug 2015 14:42:03 +0200
|
||||||
|
Subject: [PATCH] TEST-30-ISCSI: switch to scsi-target-utils
|
||||||
|
|
||||||
|
netbsd-iscsi is not available on RHEL
|
||||||
|
|
||||||
|
Beef up the testsuite to use the two targets over different
|
||||||
|
interfaces.
|
||||||
|
|
||||||
|
Test the new iSCSI parameters rd.iscsi.waitnet and rd.iscsi.testroute.
|
||||||
|
---
|
||||||
|
README.testsuite | 2 +-
|
||||||
|
test/TEST-30-ISCSI/server-init.sh | 17 ++++++++++-
|
||||||
|
test/TEST-30-ISCSI/targets | 25 ----------------
|
||||||
|
test/TEST-30-ISCSI/test.sh | 62 ++++++++++++++++++++++++++-------------
|
||||||
|
4 files changed, 59 insertions(+), 47 deletions(-)
|
||||||
|
delete mode 100644 test/TEST-30-ISCSI/targets
|
||||||
|
|
||||||
|
diff --git a/README.testsuite b/README.testsuite
|
||||||
|
index b539d90..f9f60d4 100644
|
||||||
|
--- a/README.testsuite
|
||||||
|
+++ b/README.testsuite
|
||||||
|
@@ -6,9 +6,9 @@ mdadm \
|
||||||
|
lvm2 \
|
||||||
|
cryptsetup \
|
||||||
|
nfs-utils \
|
||||||
|
-netbsd-iscsi \
|
||||||
|
nbd \
|
||||||
|
dhcp-server \
|
||||||
|
+scsi-target-utils \
|
||||||
|
iscsi-initiator-utils
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/test/TEST-30-ISCSI/server-init.sh b/test/TEST-30-ISCSI/server-init.sh
|
||||||
|
index 0407b17..64a4755 100755
|
||||||
|
--- a/test/TEST-30-ISCSI/server-init.sh
|
||||||
|
+++ b/test/TEST-30-ISCSI/server-init.sh
|
||||||
|
@@ -12,10 +12,25 @@ ip link set lo up
|
||||||
|
ip link set dev eth0 name ens3
|
||||||
|
ip addr add 192.168.50.1/24 dev ens3
|
||||||
|
ip link set ens3 up
|
||||||
|
+ip link set dev eth1 name ens4
|
||||||
|
+ip addr add 192.168.51.1/24 dev ens4
|
||||||
|
+ip link set ens4 up
|
||||||
|
>/var/lib/dhcpd/dhcpd.leases
|
||||||
|
chmod 777 /var/lib/dhcpd/dhcpd.leases
|
||||||
|
dhcpd -d -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases &
|
||||||
|
-/usr/sbin/iscsi-target -D -t iqn.2009-06.dracut &
|
||||||
|
+
|
||||||
|
+tgtd
|
||||||
|
+tgtadm --lld iscsi --mode target --op new --tid 1 --targetname iqn.2009-06.dracut:target0
|
||||||
|
+tgtadm --lld iscsi --mode target --op new --tid 2 --targetname iqn.2009-06.dracut:target1
|
||||||
|
+tgtadm --lld iscsi --mode target --op new --tid 3 --targetname iqn.2009-06.dracut:target2
|
||||||
|
+tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 -b /dev/sdb
|
||||||
|
+tgtadm --lld iscsi --mode logicalunit --op new --tid 2 --lun 2 -b /dev/sdc
|
||||||
|
+tgtadm --lld iscsi --mode logicalunit --op new --tid 3 --lun 3 -b /dev/sdd
|
||||||
|
+tgtadm --lld iscsi --mode target --op bind --tid 1 -I 192.168.50.101
|
||||||
|
+tgtadm --lld iscsi --mode target --op bind --tid 2 -I 192.168.51.101
|
||||||
|
+tgtadm --lld iscsi --mode target --op bind --tid 3 -I 192.168.50.101
|
||||||
|
+
|
||||||
|
+
|
||||||
|
# Wait forever for the VM to die
|
||||||
|
echo "Serving iSCSI"
|
||||||
|
while :; do
|
||||||
|
diff --git a/test/TEST-30-ISCSI/targets b/test/TEST-30-ISCSI/targets
|
||||||
|
deleted file mode 100644
|
||||||
|
index 6a6872e..0000000
|
||||||
|
--- a/test/TEST-30-ISCSI/targets
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,25 +0,0 @@
|
||||||
|
-# $NetBSD: targets,v 1.2 2006/03/04 21:53:16 agc Exp $
|
||||||
|
-#
|
||||||
|
-# Structure of this file:
|
||||||
|
-#
|
||||||
|
-# + an extent is a straight (offset, length) pair of a file or device
|
||||||
|
-# it's the lowest common storage denominator
|
||||||
|
-# at least one is needed
|
||||||
|
-# + a device is made up of one or more extents or other devices
|
||||||
|
-# devices can be added in a hierachical manner, to enhance resilience
|
||||||
|
-# + in this example, no device definitions are necessary, as the target
|
||||||
|
-# will just use a simple extent for persistent storage
|
||||||
|
-# + a target is made up of 1 or more devices
|
||||||
|
-# The code does not support RAID1 recovery at present
|
||||||
|
-
|
||||||
|
-# Simple file showing 1 extent, mapped straight into 1 target
|
||||||
|
-
|
||||||
|
-# extents file start length
|
||||||
|
-extent0 /dev/sdb 0 20971520
|
||||||
|
-extent1 /dev/sdc 0 20971520
|
||||||
|
-extent2 /dev/sdd 0 20971520
|
||||||
|
-
|
||||||
|
-# target flags storage netmask
|
||||||
|
-target0 rw extent0 192.168.50.0/24
|
||||||
|
-target1 rw extent1 192.168.50.0/24
|
||||||
|
-target2 rw extent2 192.168.50.0/24
|
||||||
|
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
|
||||||
|
index 59e9c5b..cc6ec4e 100755
|
||||||
|
--- a/test/TEST-30-ISCSI/test.sh
|
||||||
|
+++ b/test/TEST-30-ISCSI/test.sh
|
||||||
|
@@ -3,8 +3,10 @@ TEST_DESCRIPTION="root filesystem over iSCSI"
|
||||||
|
|
||||||
|
KVERSION=${KVERSION-$(uname -r)}
|
||||||
|
|
||||||
|
-#DEBUGFAIL="rd.shell"
|
||||||
|
-#SERIAL="tcp:127.0.0.1:9999"
|
||||||
|
+#DEBUGFAIL="rd.shell rd.break rd.debug loglevel=7 "
|
||||||
|
+DEBUGFAIL="loglevel=1"
|
||||||
|
+#SERVER_DEBUG="rd.debug loglevel=7"
|
||||||
|
+SERIAL="tcp:127.0.0.1:9999"
|
||||||
|
SERIAL="null"
|
||||||
|
|
||||||
|
run_server() {
|
||||||
|
@@ -16,12 +18,13 @@ run_server() {
|
||||||
|
-drive format=raw,index=1,media=disk,file=$TESTDIR/root.ext3 \
|
||||||
|
-drive format=raw,index=2,media=disk,file=$TESTDIR/iscsidisk2.img \
|
||||||
|
-drive format=raw,index=3,media=disk,file=$TESTDIR/iscsidisk3.img \
|
||||||
|
- -m 256M -smp 2 \
|
||||||
|
+ -m 512M -smp 2 \
|
||||||
|
-display none \
|
||||||
|
-serial $SERIAL \
|
||||||
|
-net nic,macaddr=52:54:00:12:34:56,model=e1000 \
|
||||||
|
+ -net nic,macaddr=52:54:00:12:34:57,model=e1000 \
|
||||||
|
-net socket,listen=127.0.0.1:12330 \
|
||||||
|
- -append "root=/dev/sda rootfstype=ext3 rw rd.debug loglevel=77 console=ttyS0,115200n81 selinux=0" \
|
||||||
|
+ -append "root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
|
||||||
|
-initrd $TESTDIR/initramfs.server \
|
||||||
|
-pidfile $TESTDIR/server.pid -daemonize || return 1
|
||||||
|
sudo chmod 644 $TESTDIR/server.pid || return 1
|
||||||
|
@@ -41,10 +44,11 @@ run_client() {
|
||||||
|
|
||||||
|
$testdir/run-qemu \
|
||||||
|
-drive format=raw,index=0,media=disk,file=$TESTDIR/client.img \
|
||||||
|
- -m 256M -smp 2 -nographic \
|
||||||
|
+ -m 512M -smp 2 -nographic \
|
||||||
|
-net nic,macaddr=52:54:00:12:34:00,model=e1000 \
|
||||||
|
+ -net nic,macaddr=52:54:00:12:34:01,model=e1000 \
|
||||||
|
-net socket,connect=127.0.0.1:12330 \
|
||||||
|
- -append "$* rw quiet rd.auto rd.retry=5 rd.debug rd.info console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \
|
||||||
|
+ -append "$* rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug=0 $DEBUGFAIL" \
|
||||||
|
-initrd $TESTDIR/initramfs.testing
|
||||||
|
if ! grep -F -m 1 -q iscsi-OK $TESTDIR/client.img; then
|
||||||
|
echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
|
||||||
|
@@ -56,20 +60,39 @@ run_client() {
|
||||||
|
}
|
||||||
|
|
||||||
|
do_test_run() {
|
||||||
|
+ run_client "root=dhcp" \
|
||||||
|
+ "root=/dev/root netroot=dhcp ip=ens3:dhcp" \
|
||||||
|
+ || return 1
|
||||||
|
|
||||||
|
-#
|
||||||
|
-# run_client "root=dhcp" \
|
||||||
|
-# "root=dhcp" \
|
||||||
|
-# || return 1
|
||||||
|
+ run_client "netroot=iscsi target0"\
|
||||||
|
+ "root=LABEL=singleroot netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0" \
|
||||||
|
+ "ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \
|
||||||
|
+ || return 1
|
||||||
|
|
||||||
|
- run_client "netroot=iscsi target0"\
|
||||||
|
- "root=LABEL=singleroot netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0" \
|
||||||
|
- "ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \
|
||||||
|
+ run_client "netroot=iscsi target1 target2" \
|
||||||
|
+ "root=LABEL=sysroot" \
|
||||||
|
+ "ip=192.168.50.101:::255.255.255.0::ens3:off" \
|
||||||
|
+ "ip=192.168.51.101:::255.255.255.0::ens4:off" \
|
||||||
|
+ "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
|
||||||
|
+ "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||||
|
+ || return 1
|
||||||
|
+
|
||||||
|
+ run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0" \
|
||||||
|
+ "root=LABEL=sysroot" \
|
||||||
|
+ "ip=192.168.50.101:::255.255.255.0::ens3:off" \
|
||||||
|
+ "ip=192.168.51.101:::255.255.255.0::ens4:off" \
|
||||||
|
+ "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
|
||||||
|
+ "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||||
|
+ "rd.waitnet=0" \
|
||||||
|
|| return 1
|
||||||
|
|
||||||
|
- run_client "netroot=iscsi target1 target2" \
|
||||||
|
- "root=LABEL=sysroot ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \
|
||||||
|
- "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target1 netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||||
|
+ run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \
|
||||||
|
+ "root=LABEL=sysroot" \
|
||||||
|
+ "ip=192.168.50.101:::255.255.255.0::ens3:off" \
|
||||||
|
+ "ip=192.168.51.101:::255.255.255.0::ens4:off" \
|
||||||
|
+ "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
|
||||||
|
+ "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||||
|
+ "rd.waitnet=0 rd.iscsi.testroute=0" \
|
||||||
|
|| return 1
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
@@ -170,7 +193,7 @@ test_setup() {
|
||||||
|
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||||
|
)
|
||||||
|
sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||||
|
- -o "dash plymouth dmraid" \
|
||||||
|
+ -o "dash plymouth dmraid nfs" \
|
||||||
|
-a "debug" \
|
||||||
|
-d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod" \
|
||||||
|
--no-hostonly-cmdline -N \
|
||||||
|
@@ -195,13 +218,12 @@ test_setup() {
|
||||||
|
dmesg mkdir cp ping \
|
||||||
|
modprobe tcpdump setsid \
|
||||||
|
/etc/services sleep mount chmod
|
||||||
|
- inst_multiple /usr/sbin/iscsi-target
|
||||||
|
+ inst_multiple tgtd tgtadm
|
||||||
|
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
||||||
|
[ -f ${_terminfodir}/l/linux ] && break
|
||||||
|
done
|
||||||
|
inst_multiple -o ${_terminfodir}/l/linux
|
||||||
|
instmods iscsi_tcp crc32c ipv6
|
||||||
|
- inst ./targets /etc/iscsi/targets
|
||||||
|
[ -f /etc/netconfig ] && inst_multiple /etc/netconfig
|
||||||
|
type -P dhcpd >/dev/null && inst_multiple dhcpd
|
||||||
|
[ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd
|
||||||
|
@@ -223,7 +245,7 @@ test_setup() {
|
||||||
|
# Make server's dracut image
|
||||||
|
$basedir/dracut.sh -l -i $TESTDIR/overlay / \
|
||||||
|
-a "dash udev-rules base rootfs-block fs-lib debug kernel-modules" \
|
||||||
|
- -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod e1000" \
|
||||||
|
+ -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod e1000 drbg" \
|
||||||
|
--no-hostonly-cmdline -N \
|
||||||
|
-f $TESTDIR/initramfs.server $KVERSION || return 1
|
||||||
|
|
@ -0,0 +1,27 @@
|
|||||||
|
From 69171aa8fa4bdd196709318582d73076677bd16c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 12 Aug 2015 15:11:17 +0200
|
||||||
|
Subject: [PATCH] dracut.cmdline.7.asc: document rd.iscsi.waitnet and
|
||||||
|
rd.iscsi.testroute
|
||||||
|
|
||||||
|
---
|
||||||
|
dracut.cmdline.7.asc | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
|
||||||
|
index 1a54377..8c7e965 100644
|
||||||
|
--- a/dracut.cmdline.7.asc
|
||||||
|
+++ b/dracut.cmdline.7.asc
|
||||||
|
@@ -713,6 +713,12 @@ iscsistart -b --param node.session.timeo.replacement_timeout=30
|
||||||
|
**rd.iscsi.ibft** **rd.iscsi.ibft=1**:
|
||||||
|
Turn on iBFT autoconfiguration for the interfaces
|
||||||
|
|
||||||
|
+**rd.iscsi.waitnet=0**:
|
||||||
|
+ Turn off waiting for all interfaces to be up before trying to login to the iSCSI targets.
|
||||||
|
+
|
||||||
|
+**rd.iscsi.testroute=0**:
|
||||||
|
+ Turn off checking, if the route to the iSCSI target IP is possible before trying to login.
|
||||||
|
+
|
||||||
|
FCoE
|
||||||
|
~~~~
|
||||||
|
**fcoe=**__<edd|interface|MAC>__:__{dcb|nodcb}__::
|
41
0072-iscsi-parse-iscsiroot.sh-use-iBFT-initiator-name.patch
Normal file
41
0072-iscsi-parse-iscsiroot.sh-use-iBFT-initiator-name.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From feb8dc685dca1229c517de9ec9854367b8c49524 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 12 Aug 2015 15:14:11 +0200
|
||||||
|
Subject: [PATCH] iscsi/parse-iscsiroot.sh: use iBFT initiator name
|
||||||
|
|
||||||
|
---
|
||||||
|
modules.d/95iscsi/parse-iscsiroot.sh | 14 +++++++++++++-
|
||||||
|
1 file changed, 13 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
index 2532ada..a889da1 100755
|
||||||
|
--- a/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
@@ -58,7 +58,7 @@ if [ -n "$iscsiroot" ] ; then
|
||||||
|
fi
|
||||||
|
|
||||||
|
# iscsi_firmware does not need argument checking
|
||||||
|
-if [ -n "$iscsi_firmware" ] ; then
|
||||||
|
+if [ -n "$iscsi_firmware" ] || getargbool 0 rd.iscsi.ibft -d "ip=ibft"; then
|
||||||
|
[ -z "$netroot" ] && netroot=iscsi:
|
||||||
|
modprobe -b -q iscsi_boot_sysfs 2>/dev/null
|
||||||
|
modprobe -b -q iscsi_ibft
|
||||||
|
@@ -97,6 +97,18 @@ if arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=) && [ -n "$arg" ]; then
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
+# If not given on the cmdline and initiator-name available via iBFT
|
||||||
|
+if [ -z $iscsi_initiator ] && [ -f /sys/firmware/ibft/initiator/initiator-name ] && ! [ -f /tmp/iscsi_set_initiator ]; then
|
||||||
|
+ iscsi_initiator=$(while read line || [ -n "$line" ]; do echo $line;done < /sys/firmware/ibft/initiator/initiator-name)
|
||||||
|
+ echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi
|
||||||
|
+ rm -f /etc/iscsi/initiatorname.iscsi
|
||||||
|
+ mkdir -p /etc/iscsi
|
||||||
|
+ ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
||||||
|
+ systemctl restart iscsid
|
||||||
|
+ sleep 1
|
||||||
|
+ > /tmp/iscsi_set_initiator
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
if [ -n "$iscsi_firmware" ] ; then
|
||||||
|
echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh
|
||||||
|
else
|
@ -0,0 +1,56 @@
|
|||||||
|
From 6802cf23499b05544079b26a39e339bb3476d38d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Thu, 13 Aug 2015 11:53:21 +0200
|
||||||
|
Subject: [PATCH] iscsi/iscsiroot.sh: handle timeout with all interfaces up
|
||||||
|
|
||||||
|
restart iscsid, because it may disbehaved
|
||||||
|
---
|
||||||
|
modules.d/95iscsi/iscsiroot.sh | 17 +++++++++++++----
|
||||||
|
1 file changed, 13 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
index fc62425..ad95812 100755
|
||||||
|
--- a/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
+++ b/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
@@ -197,13 +197,14 @@ handle_netroot()
|
||||||
|
${iscsi_in_password:+-W $iscsi_in_password} \
|
||||||
|
${iscsi_iface_name:+--param iface.iscsi_ifacename=$iscsi_iface_name} \
|
||||||
|
${iscsi_netdev_name:+--param iface.net_ifacename=$iscsi_netdev_name} \
|
||||||
|
- ${iscsi_param} >/dev/null 2>&1
|
||||||
|
+ ${iscsi_param} >/dev/null 2>&1 \
|
||||||
|
+ && { > $hookdir/initqueue/work ; }
|
||||||
|
else
|
||||||
|
- systemctl --no-block restart "$netroot_enc" >/dev/null 2>&1
|
||||||
|
+ systemctl --no-block restart "$netroot_enc" >/dev/null 2>&1 \
|
||||||
|
+ && { > $hookdir/initqueue/work ; }
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
- > $hookdir/initqueue/work
|
||||||
|
iscsistart -i $iscsi_initiator -t $iscsi_target_name \
|
||||||
|
-g $iscsi_target_group -a $iscsi_target_ip \
|
||||||
|
-p $iscsi_target_port \
|
||||||
|
@@ -214,7 +215,7 @@ handle_netroot()
|
||||||
|
${iscsi_iface_name:+--param iface.iscsi_ifacename=$iscsi_iface_name} \
|
||||||
|
${iscsi_netdev_name:+--param iface.net_ifacename=$iscsi_netdev_name} \
|
||||||
|
${iscsi_param} \
|
||||||
|
- || :
|
||||||
|
+ && { > $hookdir/initqueue/work ; }
|
||||||
|
fi
|
||||||
|
netroot_enc=$(str_replace "$1" '/' '\2f')
|
||||||
|
echo 'started' > "/tmp/iscsistarted-iscsi:${netroot_enc}"
|
||||||
|
@@ -227,6 +228,14 @@ if [ "$netif" != "dummy" ] && getargbool 1 rd.iscsi.waitnet; then
|
||||||
|
all_ifaces_up || exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
+if [ "$netif" = "dummy" ] && all_ifaces_up; then
|
||||||
|
+ # s.th. went wrong and the timeout script hits
|
||||||
|
+ # restart
|
||||||
|
+ systemctl restart iscsid
|
||||||
|
+ # damn iscsid is not ready after unit says it's ready
|
||||||
|
+ sleep 2
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
# loop over all netroot parameter
|
||||||
|
netroot=$(getarg netroot)
|
||||||
|
if [ $? -eq 0 ] && [ "$netroot" != "dhcp" ]; then
|
@ -0,0 +1,91 @@
|
|||||||
|
From 0a66b74b51f7d58916504e0e8bb01b6e981b489b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Thu, 13 Aug 2015 11:54:24 +0200
|
||||||
|
Subject: [PATCH] TEST-30-ISCSI: test more and set static initiator name
|
||||||
|
|
||||||
|
---
|
||||||
|
test/TEST-30-ISCSI/test.sh | 42 ++++++++++++++++++++++++++++++------------
|
||||||
|
1 file changed, 30 insertions(+), 12 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
|
||||||
|
index cc6ec4e..be3399a 100755
|
||||||
|
--- a/test/TEST-30-ISCSI/test.sh
|
||||||
|
+++ b/test/TEST-30-ISCSI/test.sh
|
||||||
|
@@ -48,7 +48,7 @@ run_client() {
|
||||||
|
-net nic,macaddr=52:54:00:12:34:00,model=e1000 \
|
||||||
|
-net nic,macaddr=52:54:00:12:34:01,model=e1000 \
|
||||||
|
-net socket,connect=127.0.0.1:12330 \
|
||||||
|
- -append "$* rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug=0 $DEBUGFAIL" \
|
||||||
|
+ -append "rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug=0 $DEBUGFAIL $*" \
|
||||||
|
-initrd $TESTDIR/initramfs.testing
|
||||||
|
if ! grep -F -m 1 -q iscsi-OK $TESTDIR/client.img; then
|
||||||
|
echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
|
||||||
|
@@ -60,22 +60,27 @@ run_client() {
|
||||||
|
}
|
||||||
|
|
||||||
|
do_test_run() {
|
||||||
|
+ initiator=$(iscsi-iname)
|
||||||
|
+
|
||||||
|
run_client "root=dhcp" \
|
||||||
|
- "root=/dev/root netroot=dhcp ip=ens3:dhcp" \
|
||||||
|
+ "root=/dev/root netroot=dhcp ip=ens3:dhcp" \
|
||||||
|
+ "rd.iscsi.initiator=$initiator" \
|
||||||
|
|| return 1
|
||||||
|
|
||||||
|
run_client "netroot=iscsi target0"\
|
||||||
|
- "root=LABEL=singleroot netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0" \
|
||||||
|
- "ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \
|
||||||
|
+ "root=LABEL=singleroot netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0" \
|
||||||
|
+ "ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \
|
||||||
|
+ "rd.iscsi.initiator=$initiator" \
|
||||||
|
|| return 1
|
||||||
|
|
||||||
|
run_client "netroot=iscsi target1 target2" \
|
||||||
|
- "root=LABEL=sysroot" \
|
||||||
|
- "ip=192.168.50.101:::255.255.255.0::ens3:off" \
|
||||||
|
- "ip=192.168.51.101:::255.255.255.0::ens4:off" \
|
||||||
|
- "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
|
||||||
|
- "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||||
|
- || return 1
|
||||||
|
+ "root=LABEL=sysroot" \
|
||||||
|
+ "ip=192.168.50.101:::255.255.255.0::ens3:off" \
|
||||||
|
+ "ip=192.168.51.101:::255.255.255.0::ens4:off" \
|
||||||
|
+ "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
|
||||||
|
+ "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||||
|
+ "rd.iscsi.initiator=$initiator" \
|
||||||
|
+ || return 1
|
||||||
|
|
||||||
|
run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0" \
|
||||||
|
"root=LABEL=sysroot" \
|
||||||
|
@@ -83,7 +88,8 @@ do_test_run() {
|
||||||
|
"ip=192.168.51.101:::255.255.255.0::ens4:off" \
|
||||||
|
"netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
|
||||||
|
"netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||||
|
- "rd.waitnet=0" \
|
||||||
|
+ "rd.iscsi.initiator=$initiator" \
|
||||||
|
+ "rd.waitnet=0 rd.retry=30" \
|
||||||
|
|| return 1
|
||||||
|
|
||||||
|
run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \
|
||||||
|
@@ -92,8 +98,20 @@ do_test_run() {
|
||||||
|
"ip=192.168.51.101:::255.255.255.0::ens4:off" \
|
||||||
|
"netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
|
||||||
|
"netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||||
|
- "rd.waitnet=0 rd.iscsi.testroute=0" \
|
||||||
|
+ "rd.iscsi.initiator=$initiator" \
|
||||||
|
+ "rd.waitnet=0 rd.iscsi.testroute=0 rd.retry=30" \
|
||||||
|
|| return 1
|
||||||
|
+
|
||||||
|
+ run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0 default GW" \
|
||||||
|
+ "root=LABEL=sysroot" \
|
||||||
|
+ "ip=192.168.50.101::192.168.50.1:255.255.255.0::ens3:off" \
|
||||||
|
+ "ip=192.168.51.101::192.168.51.1:255.255.255.0::ens4:off" \
|
||||||
|
+ "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
|
||||||
|
+ "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||||
|
+ "rd.iscsi.initiator=$initiator" \
|
||||||
|
+ "rd.waitnet=0 rd.iscsi.testroute=0 rd.retry=30" \
|
||||||
|
+ || return 1
|
||||||
|
+
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
30
0075-The-default-gateway-might-need-a-static-route.patch
Normal file
30
0075-The-default-gateway-might-need-a-static-route.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From 110858025aab221d135335d85dba9317f5ef15c6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Stijn Hoop <stijn@sandcat.nl>
|
||||||
|
Date: Sun, 23 Aug 2015 14:45:53 +0200
|
||||||
|
Subject: [PATCH] The default gateway might need a static route
|
||||||
|
|
||||||
|
Some hosting providers need a static route set in order to be
|
||||||
|
able to reach the default gateway. Be sure to retry adding
|
||||||
|
the default gateway after setting the static routes.
|
||||||
|
---
|
||||||
|
modules.d/40network/net-lib.sh | 7 +++++++
|
||||||
|
1 file changed, 7 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
||||||
|
index 5c65a2e..2e79619 100755
|
||||||
|
--- a/modules.d/40network/net-lib.sh
|
||||||
|
+++ b/modules.d/40network/net-lib.sh
|
||||||
|
@@ -129,6 +129,13 @@ setup_net() {
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
+ # If a static route was necessary to reach the gateway, the
|
||||||
|
+ # first gateway setup call will have failed with
|
||||||
|
+ # RTNETLINK answers: Network is unreachable
|
||||||
|
+ # Replace the default route again after static routes to cover
|
||||||
|
+ # this scenario.
|
||||||
|
+ [ -e /tmp/net.$netif.gw ] && . /tmp/net.$netif.gw
|
||||||
|
+
|
||||||
|
# Handle STP Timeout: arping the default gateway.
|
||||||
|
# (or the root server, if a) it's local or b) there's no gateway.)
|
||||||
|
# Note: This assumes that if no router is present the
|
@ -0,0 +1,23 @@
|
|||||||
|
From 9918afd244cbee479af4380c1fa2a7a81fba6bed Mon Sep 17 00:00:00 2001
|
||||||
|
From: Lidong Zhong <lzhong@suse.com>
|
||||||
|
Date: Mon, 24 Aug 2015 18:02:10 +0800
|
||||||
|
Subject: [PATCH] dracut-functions.sh: remove duplicate declaratio of local
|
||||||
|
variable
|
||||||
|
|
||||||
|
---
|
||||||
|
dracut-functions.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||||
|
index d559903..cb88078 100755
|
||||||
|
--- a/dracut-functions.sh
|
||||||
|
+++ b/dracut-functions.sh
|
||||||
|
@@ -429,7 +429,7 @@ shorten_persistent_dev() {
|
||||||
|
# $ find_block_device /usr
|
||||||
|
# 8:4
|
||||||
|
find_block_device() {
|
||||||
|
- local _majmin _dev _majmin _find_mpt
|
||||||
|
+ local _dev _majmin _find_mpt
|
||||||
|
_find_mpt="$1"
|
||||||
|
if [[ $use_fstab != yes ]]; then
|
||||||
|
[[ -d $_find_mpt/. ]]
|
22
0077-dracut.sh-remove-duplicate-call-of-push_host_devs.patch
Normal file
22
0077-dracut.sh-remove-duplicate-call-of-push_host_devs.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
From aa169b3bd37b74bdf1e15318ab423ef4b9001fd2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Lidong Zhong <lzhong@suse.com>
|
||||||
|
Date: Mon, 24 Aug 2015 18:27:54 +0800
|
||||||
|
Subject: [PATCH] dracut.sh: remove duplicate call of push_host_devs
|
||||||
|
|
||||||
|
There is no way exit between the two places that call push_host_devs
|
||||||
|
---
|
||||||
|
dracut.sh | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/dracut.sh b/dracut.sh
|
||||||
|
index f7d31a4..8ca319b 100755
|
||||||
|
--- a/dracut.sh
|
||||||
|
+++ b/dracut.sh
|
||||||
|
@@ -1113,7 +1113,6 @@ if [[ $hostonly ]]; then
|
||||||
|
_dev=$(find_block_device "$mp")
|
||||||
|
_bdev=$(readlink -f "/dev/block/$_dev")
|
||||||
|
[[ -b $_bdev ]] && _dev=$_bdev
|
||||||
|
- push_host_devs $_dev
|
||||||
|
[[ "$mp" == "/" ]] && root_devs+=("$_dev")
|
||||||
|
push_host_devs "$_dev"
|
||||||
|
if [[ $(find_mp_fstype "$mp") == btrfs ]]; then
|
@ -0,0 +1,23 @@
|
|||||||
|
From ea877ac6cc3df38d22728437b8a70bedee558f6a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Thu, 3 Sep 2015 12:31:34 +0200
|
||||||
|
Subject: [PATCH] dracut-functions.sh: fixed dracutbasedir, when sourced
|
||||||
|
directly
|
||||||
|
|
||||||
|
---
|
||||||
|
dracut-functions.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||||
|
index d559903..3982fc8 100755
|
||||||
|
--- a/dracut-functions.sh
|
||||||
|
+++ b/dracut-functions.sh
|
||||||
|
@@ -96,7 +96,7 @@ find_binary() {
|
||||||
|
|
||||||
|
if ! [[ $dracutbasedir ]]; then
|
||||||
|
dracutbasedir=${BASH_SOURCE[0]%/*}
|
||||||
|
- [[ $dracutbasedir = "dracut-functions" ]] && dracutbasedir="."
|
||||||
|
+ [[ $dracutbasedir = dracut-functions* ]] && dracutbasedir="."
|
||||||
|
[[ $dracutbasedir ]] || dracutbasedir="."
|
||||||
|
dracutbasedir="$(readlink -f $dracutbasedir)"
|
||||||
|
fi
|
22
0079-systemd-initrd-fix-typo-in-error-message.patch
Normal file
22
0079-systemd-initrd-fix-typo-in-error-message.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
From 5cb1e0efea5a331a743a6abac130003ad08b50ff Mon Sep 17 00:00:00 2001
|
||||||
|
From: yuwata <watanabe.yu+github@gmail.com>
|
||||||
|
Date: Mon, 7 Sep 2015 17:58:00 +0900
|
||||||
|
Subject: [PATCH] systemd-initrd: fix typo in error message.
|
||||||
|
|
||||||
|
---
|
||||||
|
modules.d/01systemd-initrd/module-setup.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/01systemd-initrd/module-setup.sh b/modules.d/01systemd-initrd/module-setup.sh
|
||||||
|
index e313967..fb6a9ea 100755
|
||||||
|
--- a/modules.d/01systemd-initrd/module-setup.sh
|
||||||
|
+++ b/modules.d/01systemd-initrd/module-setup.sh
|
||||||
|
@@ -5,7 +5,7 @@ check() {
|
||||||
|
[[ $mount_needs ]] && return 1
|
||||||
|
|
||||||
|
if ! dracut_module_included "systemd"; then
|
||||||
|
- derror "dracut-systemd needs systemd in the initramfs"
|
||||||
|
+ derror "systemd-initrd needs systemd in the initramfs"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
22
0080-systemd-networkd-fix-typo-in-error-message.patch
Normal file
22
0080-systemd-networkd-fix-typo-in-error-message.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
From 0888cf51ab82659ba71bca5ae6c5b6abe9a5ef06 Mon Sep 17 00:00:00 2001
|
||||||
|
From: yuwata <watanabe.yu+github@gmail.com>
|
||||||
|
Date: Mon, 7 Sep 2015 17:58:40 +0900
|
||||||
|
Subject: [PATCH] systemd-networkd: fix typo in error message
|
||||||
|
|
||||||
|
---
|
||||||
|
modules.d/02systemd-networkd/module-setup.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/02systemd-networkd/module-setup.sh b/modules.d/02systemd-networkd/module-setup.sh
|
||||||
|
index df4661f..58842c0 100755
|
||||||
|
--- a/modules.d/02systemd-networkd/module-setup.sh
|
||||||
|
+++ b/modules.d/02systemd-networkd/module-setup.sh
|
||||||
|
@@ -5,7 +5,7 @@ check() {
|
||||||
|
[[ $mount_needs ]] && return 1
|
||||||
|
|
||||||
|
if ! dracut_module_included "systemd"; then
|
||||||
|
- derror "dracut-systemd needs systemd in the initramfs"
|
||||||
|
+ derror "systemd-networkd needs systemd in the initramfs"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
23
0081-install-blob-fix-typos-in-usage.patch
Normal file
23
0081-install-blob-fix-typos-in-usage.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
From fc212358dab07011398c002849b2ebf8a412ffc8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: yuwata <watanabe.yu+github@gmail.com>
|
||||||
|
Date: Mon, 7 Sep 2015 18:00:16 +0900
|
||||||
|
Subject: [PATCH] install blob: fix typos in usage.
|
||||||
|
|
||||||
|
---
|
||||||
|
install/dracut-install.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/install/dracut-install.c b/install/dracut-install.c
|
||||||
|
index 0ff5c49..a7bfdb8 100644
|
||||||
|
--- a/install/dracut-install.c
|
||||||
|
+++ b/install/dracut-install.c
|
||||||
|
@@ -709,7 +709,8 @@ static void usage(int status)
|
||||||
|
" -L --logdir <DIR> Log files, which were installed from the host to <DIR>\n"
|
||||||
|
" -R --resolvelazy Only install shebang executables and libraries\n"
|
||||||
|
" for all SOURCE files\n"
|
||||||
|
- " -H --fips Also install all '.SOURCE.hmac' files\n"
|
||||||
|
+ " -H --hostonly Mark all SOURCE files as hostonly\n\n"
|
||||||
|
+ " -f --fips Also install all '.SOURCE.hmac' files\n"
|
||||||
|
" -v --verbose Show more output\n"
|
||||||
|
" --debug Show debug output\n"
|
||||||
|
" --version Show package version\n"
|
19
0082-dracut.8.asc-mention-lsinitrd-1-in-see-also.patch
Normal file
19
0082-dracut.8.asc-mention-lsinitrd-1-in-see-also.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
From 820f81016a31f069dc8ef9d7a6b65ffc1166daa5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 9 Sep 2015 11:30:52 +0200
|
||||||
|
Subject: [PATCH] dracut.8.asc: mention lsinitrd(1) in see also
|
||||||
|
|
||||||
|
---
|
||||||
|
dracut.8.asc | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/dracut.8.asc b/dracut.8.asc
|
||||||
|
index 7a7ef9d..1fbbda4 100644
|
||||||
|
--- a/dracut.8.asc
|
||||||
|
+++ b/dracut.8.asc
|
||||||
|
@@ -536,4 +536,4 @@ Will Woods
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
--------
|
||||||
|
-*dracut.cmdline*(7) *dracut.conf*(5)
|
||||||
|
+*dracut.cmdline*(7) *dracut.conf*(5) *lsinitrd*(1)
|
@ -0,0 +1,23 @@
|
|||||||
|
From 10d03bbfbc30a4ff596ffc77b73acdceef5a7826 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Colin Walters <walters@verbum.org>
|
||||||
|
Date: Thu, 17 Sep 2015 11:33:40 -0400
|
||||||
|
Subject: [PATCH] dir-locals: Avoid use of setq which triggers Emacs warning
|
||||||
|
|
||||||
|
Emacs has a whitelist of "safe" variables, using `setq` overrides
|
||||||
|
that and causes it to warn when opening any file by default.
|
||||||
|
|
||||||
|
Dropping the `setq` makes Emacs do the right thing.
|
||||||
|
---
|
||||||
|
.dir-locals.el | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/.dir-locals.el b/.dir-locals.el
|
||||||
|
index cbbcec4..8130058 100644
|
||||||
|
--- a/.dir-locals.el
|
||||||
|
+++ b/.dir-locals.el
|
||||||
|
@@ -1,3 +1,3 @@
|
||||||
|
-((nil . ((setq sh-basic-offset: 4)
|
||||||
|
- (setq indent-tabs-mode nil)
|
||||||
|
+((nil . ((sh-basic-offset . 4)
|
||||||
|
+ (indent-tabs-mode . nil)
|
||||||
|
)))
|
121
0084-lsinitrd-Suppress-cat-write-error-Broken-pipe.patch
Normal file
121
0084-lsinitrd-Suppress-cat-write-error-Broken-pipe.patch
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
From 3ce142861d88c357864d3a3bef7ec453826d737d Mon Sep 17 00:00:00 2001
|
||||||
|
From: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
|
||||||
|
Date: Wed, 4 Nov 2015 11:31:10 +0900
|
||||||
|
Subject: [PATCH] lsinitrd: Suppress "cat: write error: Broken pipe"
|
||||||
|
|
||||||
|
On systemd, SIGPIPE is ignored by default; see man 5 systemd.exec for
|
||||||
|
IgnoreSIGPIPE=. As a result, lsinitrd.sh under a systemd service
|
||||||
|
outputs "cat: write error: Broken pipe" in the processing of
|
||||||
|
determining a compression format of a given initramfs file using cat
|
||||||
|
command in the write part of a pipeline processing.
|
||||||
|
|
||||||
|
For example, this is a log message of kdump.service in RHEL7.1,
|
||||||
|
|
||||||
|
-- Logs begin at Wed 2015-11-04 09:57:33 JST, end at Wed 2015-11-04 09:58:28 JST. --
|
||||||
|
Nov 04 09:57:33 localhost systemd[1]: Stopping Crash recovery kernel arming...
|
||||||
|
Nov 04 09:57:33 localhost kdumpctl[22545]: kexec: unloaded kdump kernel
|
||||||
|
Nov 04 09:57:33 localhost kdumpctl[22545]: Stopping kdump: [OK]
|
||||||
|
Nov 04 09:57:33 localhost systemd[1]: Starting Crash recovery kernel arming...
|
||||||
|
Nov 04 09:57:36 localhost kdumpctl[22553]: Detected change(s) in the following file(s):
|
||||||
|
Nov 04 09:57:36 localhost kdumpctl[22553]: /etc/kdump.conf
|
||||||
|
Nov 04 09:57:36 localhost kdumpctl[22553]: Rebuilding /boot/initramfs-3.10.0-229.el7.x86_64kdump.img
|
||||||
|
Nov 04 09:57:40 localhost dracut[24914]: Executing: /usr/sbin/dracut --hostonly --hostonly-cmdline -o "plymouth dash resume" -f /boot/initramfs-3.10.0-229.el7.x86_64kdump.img 3.10.0-229.el7.x86_64
|
||||||
|
...<cut>...
|
||||||
|
Nov 04 09:58:12 localhost dracut[24914]: *** Creating image file done ***
|
||||||
|
Nov 04 09:58:12 localhost dracut[24914]: Image: /boot/initramfs-3.10.0-229.el7.x86_64kdump.img: 18M
|
||||||
|
Nov 04 09:58:12 localhost kdumpctl[22553]: cat: write error: Broken pipe
|
||||||
|
Nov 04 09:58:12 localhost dracut[24914]: ========================================================================
|
||||||
|
Nov 04 09:58:12 localhost dracut[24914]: Version: dracut-033-240.el7
|
||||||
|
Nov 04 09:58:12 localhost dracut[24914]:
|
||||||
|
Nov 04 09:58:12 localhost dracut[24914]: Arguments: --hostonly --hostonly-cmdline -o 'plymouth dash resume' -f
|
||||||
|
Nov 04 09:58:13 localhost dracut[24914]:
|
||||||
|
Nov 04 09:58:13 localhost dracut[24914]: dracut modules:
|
||||||
|
Nov 04 09:58:13 localhost dracut[24914]: bash
|
||||||
|
|
||||||
|
kdump.service builds and loads an initramfs for kdump kernel using
|
||||||
|
kdumpctl command which uses dracut command and so lsinitrd command,
|
||||||
|
too.
|
||||||
|
|
||||||
|
Although there's no actual harm except for the error message, there
|
||||||
|
has been several inquiries from customers about this message so
|
||||||
|
far. We should suppress this message to reduce needless
|
||||||
|
communications.
|
||||||
|
|
||||||
|
To suppress the message, this commit cleans up the processing of
|
||||||
|
reading the first 6 bytes of a given initramfs file without cat
|
||||||
|
command.
|
||||||
|
---
|
||||||
|
lsinitrd.sh | 59 ++++++++++++++++++++++++++++-------------------------------
|
||||||
|
1 file changed, 28 insertions(+), 31 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lsinitrd.sh b/lsinitrd.sh
|
||||||
|
index d2ddd76..441fb92 100755
|
||||||
|
--- a/lsinitrd.sh
|
||||||
|
+++ b/lsinitrd.sh
|
||||||
|
@@ -176,38 +176,35 @@ case $bin in
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
-CAT=$({
|
||||||
|
- if [[ $SKIP ]]; then
|
||||||
|
- $SKIP "$image"
|
||||||
|
+if [[ $SKIP ]] ; then
|
||||||
|
+ bin="$($SKIP "$image" | { read -N 6 bin && echo "$bin" ; })"
|
||||||
|
+else
|
||||||
|
+ read -N 6 bin < "$image"
|
||||||
|
+fi
|
||||||
|
+case $bin in
|
||||||
|
+ $'\x1f\x8b'*)
|
||||||
|
+ CAT="zcat --"
|
||||||
|
+ ;;
|
||||||
|
+ BZh*)
|
||||||
|
+ CAT="bzcat --"
|
||||||
|
+ ;;
|
||||||
|
+ $'\x71\xc7'*|070701)
|
||||||
|
+ CAT="cat --"
|
||||||
|
+ ;;
|
||||||
|
+ $'\x02\x21'*)
|
||||||
|
+ CAT="lz4 -d -c"
|
||||||
|
+ ;;
|
||||||
|
+ $'\x89'LZO$'\0'*)
|
||||||
|
+ CAT="lzop -d -c"
|
||||||
|
+ ;;
|
||||||
|
+ *)
|
||||||
|
+ if echo "test"|xz|xzcat --single-stream >/dev/null 2>&1; then
|
||||||
|
+ CAT="xzcat --single-stream --"
|
||||||
|
else
|
||||||
|
- cat "$image"
|
||||||
|
- fi } | {
|
||||||
|
- read -N 6 bin
|
||||||
|
- case $bin in
|
||||||
|
- $'\x1f\x8b'*)
|
||||||
|
- echo "zcat --"
|
||||||
|
- ;;
|
||||||
|
- BZh*)
|
||||||
|
- echo "bzcat --"
|
||||||
|
- ;;
|
||||||
|
- $'\x71\xc7'*|070701)
|
||||||
|
- echo "cat --"
|
||||||
|
- ;;
|
||||||
|
- $'\x02\x21'*)
|
||||||
|
- echo "lz4 -d -c"
|
||||||
|
- ;;
|
||||||
|
- $'\x89'LZO$'\0'*)
|
||||||
|
- echo "lzop -d -c"
|
||||||
|
- ;;
|
||||||
|
- *)
|
||||||
|
- if echo "test"|xz|xzcat --single-stream >/dev/null 2>&1; then
|
||||||
|
- echo "xzcat --single-stream --"
|
||||||
|
- else
|
||||||
|
- echo "xzcat --"
|
||||||
|
- fi
|
||||||
|
- ;;
|
||||||
|
- esac
|
||||||
|
- })
|
||||||
|
+ CAT="xzcat --"
|
||||||
|
+ fi
|
||||||
|
+ ;;
|
||||||
|
+esac
|
||||||
|
|
||||||
|
skipcpio()
|
||||||
|
{
|
26
0085-PKGFILE-update-to-latest-makepkg.patch
Normal file
26
0085-PKGFILE-update-to-latest-makepkg.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From eb150a4feedf5ae3d8393ce365357bc40cced1b8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Silvio Fricke <silvio.fricke@gmail.com>
|
||||||
|
Date: Sun, 8 Nov 2015 12:48:26 +0100
|
||||||
|
Subject: [PATCH] PKGFILE: update to latest makepkg
|
||||||
|
|
||||||
|
makepkg needs now a package-section.
|
||||||
|
|
||||||
|
Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
|
||||||
|
---
|
||||||
|
PKGBUILD | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/PKGBUILD b/PKGBUILD
|
||||||
|
index f7c3664..a9f1b5a 100644
|
||||||
|
--- a/PKGBUILD
|
||||||
|
+++ b/PKGBUILD
|
||||||
|
@@ -17,5 +17,9 @@ md5sums=()
|
||||||
|
build() {
|
||||||
|
cd ..
|
||||||
|
make sysconfdir=/etc || return 1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+package() {
|
||||||
|
+ cd ..
|
||||||
|
make DESTDIR="${pkgdir}" sysconfdir=/etc install || return 1
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
From 4cca17eeeca4254248d58562f2ae6b56a885b91e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Silvio Fricke <silvio.fricke@gmail.com>
|
||||||
|
Date: Sun, 8 Nov 2015 12:49:45 +0100
|
||||||
|
Subject: [PATCH] PKGFILE: version is now completely constructed from git
|
||||||
|
|
||||||
|
`pkgver` and `pkgrel` now hard coded to 1. The PKGFILE will getting
|
||||||
|
changed on a `makepkg`-run.
|
||||||
|
|
||||||
|
To prevent some version crashes no commit with changes to `pkgver` and
|
||||||
|
`pkgrel` should be accepted.
|
||||||
|
|
||||||
|
Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
|
||||||
|
---
|
||||||
|
PKGBUILD | 10 ++++++++--
|
||||||
|
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/PKGBUILD b/PKGBUILD
|
||||||
|
index a9f1b5a..c625bdb 100644
|
||||||
|
--- a/PKGBUILD
|
||||||
|
+++ b/PKGBUILD
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
pkgname=dracut-git
|
||||||
|
-pkgver=$(date +%s)
|
||||||
|
-pkgrel=$(git log --pretty=format:%h |head -n 1)
|
||||||
|
+pkgver=1
|
||||||
|
+pkgrel=1
|
||||||
|
pkgdesc="Initramfs generation utility"
|
||||||
|
arch=('i686' 'x86_64')
|
||||||
|
url="https://dracut.wiki.kernel.org/"
|
||||||
|
@@ -14,6 +14,12 @@ backup=(etc/dracut.conf)
|
||||||
|
source=()
|
||||||
|
md5sums=()
|
||||||
|
|
||||||
|
+pkgver() {
|
||||||
|
+ cd ..
|
||||||
|
+ desc="$(git describe)"
|
||||||
|
+ printf "%s.%s.%s" ${desc//-/ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
build() {
|
||||||
|
cd ..
|
||||||
|
make sysconfdir=/etc || return 1
|
32
0087-PKGFILE-prevent-out-of-tree-builds.patch
Normal file
32
0087-PKGFILE-prevent-out-of-tree-builds.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 0d5c02d3ab7b71a09d5d7b52a771f0fe0f32e4e2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Silvio Fricke <silvio.fricke@gmail.com>
|
||||||
|
Date: Sun, 8 Nov 2015 12:53:36 +0100
|
||||||
|
Subject: [PATCH] PKGFILE: prevent out of tree builds
|
||||||
|
|
||||||
|
With makepkg is it possible to build sources away from the PKGFILE. The
|
||||||
|
previous behavior was crash on build if this was setup. With this
|
||||||
|
patch we prevent this possibility.
|
||||||
|
|
||||||
|
Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
|
||||||
|
---
|
||||||
|
PKGBUILD | 7 +++++++
|
||||||
|
1 file changed, 7 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/PKGBUILD b/PKGBUILD
|
||||||
|
index c625bdb..05a32b0 100644
|
||||||
|
--- a/PKGBUILD
|
||||||
|
+++ b/PKGBUILD
|
||||||
|
@@ -14,6 +14,13 @@ backup=(etc/dracut.conf)
|
||||||
|
source=()
|
||||||
|
md5sums=()
|
||||||
|
|
||||||
|
+# out of tree builds disallowed for this PKGFILE
|
||||||
|
+BUILDDIR="${PWD}"
|
||||||
|
+PKGDEST="${PWD}"
|
||||||
|
+SRCDEST=""
|
||||||
|
+SRCPKGDEST=""
|
||||||
|
+LOGDEST=""
|
||||||
|
+
|
||||||
|
pkgver() {
|
||||||
|
cd ..
|
||||||
|
desc="$(git describe)"
|
25
0088-dracut-logger-prefix-stderr-output-with-dracut.patch
Normal file
25
0088-dracut-logger-prefix-stderr-output-with-dracut.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 8e1c4b354cdc01f32d7903fbd7564c2ea2a5a7a1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Mon, 9 Nov 2015 15:33:27 +0100
|
||||||
|
Subject: [PATCH] dracut-logger: prefix stderr output with "dracut: "
|
||||||
|
|
||||||
|
dnf updates of the kernel execute dracut in %post.
|
||||||
|
For the user it is not possible to distinguish the dracut output from
|
||||||
|
other error messages.
|
||||||
|
---
|
||||||
|
dracut-logger.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/dracut-logger.sh b/dracut-logger.sh
|
||||||
|
index e5c9358..d1cee98 100755
|
||||||
|
--- a/dracut-logger.sh
|
||||||
|
+++ b/dracut-logger.sh
|
||||||
|
@@ -324,7 +324,7 @@ _do_dlog() {
|
||||||
|
local msg="$*"
|
||||||
|
local lmsg="$lvlc: $*"
|
||||||
|
|
||||||
|
- (( $lvl <= $stdloglvl )) && echo "$msg" >&2
|
||||||
|
+ (( $lvl <= $stdloglvl )) && printf -- 'dracut: %s\n' "$msg" >&2
|
||||||
|
|
||||||
|
if (( $lvl <= $sysloglvl )); then
|
||||||
|
if [[ "$_dlogfd" ]]; then
|
@ -0,0 +1,23 @@
|
|||||||
|
From 97be933592a00289fba3755cf3a9aa3c5d3c4ee9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Frederick Grose <fgrose@sugarlabs.org>
|
||||||
|
Date: Mon, 9 Nov 2015 09:45:07 -0800
|
||||||
|
Subject: [PATCH] dmsquash-live-root: Request overflow support for persistent
|
||||||
|
snapshot.
|
||||||
|
|
||||||
|
---
|
||||||
|
modules.d/90dmsquash-live/dmsquash-live-root.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
||||||
|
index 531617e..714e1dc 100755
|
||||||
|
--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
||||||
|
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
||||||
|
@@ -171,7 +171,7 @@ do_live_overlay() {
|
||||||
|
# Create a snapshot of the base image
|
||||||
|
echo 0 $sz thin /dev/mapper/live-overlay-pool 0 $base | dmsetup create live-rw
|
||||||
|
else
|
||||||
|
- echo 0 $sz snapshot $base $over p 8 | dmsetup create live-rw
|
||||||
|
+ echo 0 $sz snapshot $base $over PO 8 | dmsetup create live-rw
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create a device that always points to a ro base image
|
@ -0,0 +1,45 @@
|
|||||||
|
From 49c9d8174ff7c25158861872bc0ea04a8cf2d242 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Frederick Grose <fgrose@sugarlabs.org>
|
||||||
|
Date: Mon, 9 Nov 2015 10:46:27 -0800
|
||||||
|
Subject: [PATCH] dmsquash-live-root: Use non-persistent metadata snapshots.
|
||||||
|
|
||||||
|
Transient snapshots can take advantage of smaller,
|
||||||
|
non-persistent metadata structures.
|
||||||
|
Make the --readonly option explicit rather than inferred
|
||||||
|
for the readonly_overlay target.
|
||||||
|
Assure that the live-base target is on the BASE_LOOPDEV.
|
||||||
|
---
|
||||||
|
modules.d/90dmsquash-live/dmsquash-live-root.sh | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
||||||
|
index 531617e..caf473b 100755
|
||||||
|
--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
||||||
|
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
||||||
|
@@ -141,7 +141,7 @@ do_live_overlay() {
|
||||||
|
# set up the snapshot
|
||||||
|
sz=$(blockdev --getsz $BASE_LOOPDEV)
|
||||||
|
if [ -n "$readonly_overlay" ]; then
|
||||||
|
- echo 0 $sz snapshot $BASE_LOOPDEV $OVERLAY_LOOPDEV p 8 | dmsetup create $readonly_overlay live-ro
|
||||||
|
+ echo 0 $sz snapshot $BASE_LOOPDEV $OVERLAY_LOOPDEV N 8 | dmsetup create --readonly live-ro
|
||||||
|
base="/dev/mapper/live-ro"
|
||||||
|
over=$RO_OVERLAY_LOOPDEV
|
||||||
|
else
|
||||||
|
@@ -175,7 +175,7 @@ do_live_overlay() {
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create a device that always points to a ro base image
|
||||||
|
- echo 0 $sz linear $base 0 | dmsetup create --readonly live-base
|
||||||
|
+ echo 0 $sz linear $BASE_LOOPDEV 0 | dmsetup create --readonly live-base
|
||||||
|
}
|
||||||
|
|
||||||
|
# live cd helper function
|
||||||
|
@@ -259,7 +259,7 @@ fi
|
||||||
|
if [ -b "$OSMIN_LOOPDEV" ]; then
|
||||||
|
# set up the devicemapper snapshot device, which will merge
|
||||||
|
# the normal live fs image, and the delta, into a minimzied fs image
|
||||||
|
- echo "0 $( blockdev --getsz $BASE_LOOPDEV ) snapshot $BASE_LOOPDEV $OSMIN_LOOPDEV p 8" | dmsetup create --readonly live-osimg-min
|
||||||
|
+ echo "0 $( blockdev --getsz $BASE_LOOPDEV ) snapshot $BASE_LOOPDEV $OSMIN_LOOPDEV N 8" | dmsetup create --readonly live-osimg-min
|
||||||
|
fi
|
||||||
|
|
||||||
|
ROOTFLAGS="$(getarg rootflags)"
|
23
0091-Makefile-fix-VERSION-and-GITVERSION.patch
Normal file
23
0091-Makefile-fix-VERSION-and-GITVERSION.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
From 8019e0eef3d36a4933ab96a8a8edfef5f3685593 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 30 Sep 2015 14:10:05 +0200
|
||||||
|
Subject: [PATCH] Makefile: fix VERSION and GITVERSION
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index f3a5c07..8454c63 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
-include dracut-version.sh
|
||||||
|
|
||||||
|
-VERSION = $(shell [ -d .git ] && git describe --abbrev=0 --tags 2>/dev/null || echo $(DRACUT_VERSION))
|
||||||
|
-GITVERSION = $(shell [ -d .git ] && { v=$$(git describe --tags 2>/dev/null); [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } )
|
||||||
|
+VERSION ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags 2>/dev/null || echo $(DRACUT_VERSION))
|
||||||
|
+GITVERSION ?= $(shell [ -d .git ] && { v=$$(git describe --tags 2>/dev/null); [ -n "$$v" ] && [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } )
|
||||||
|
|
||||||
|
-include Makefile.inc
|
||||||
|
|
33
0092-dracut.spec-omit-pkg-config-from-dependencies.patch
Normal file
33
0092-dracut.spec-omit-pkg-config-from-dependencies.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From 9befacf0c51e15fe8a199242c3bfd97d1adf455c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 30 Sep 2015 14:10:20 +0200
|
||||||
|
Subject: [PATCH] dracut.spec: omit pkg-config from dependencies
|
||||||
|
|
||||||
|
---
|
||||||
|
dracut.spec | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/dracut.spec b/dracut.spec
|
||||||
|
index 6ef5de7..d0bb9bd 100644
|
||||||
|
--- a/dracut.spec
|
||||||
|
+++ b/dracut.spec
|
||||||
|
@@ -1,6 +1,11 @@
|
||||||
|
%define dracutlibdir %{_prefix}/lib/dracut
|
||||||
|
%bcond_without doc
|
||||||
|
|
||||||
|
+# We ship a .pc file but don't want to have a dep on pkg-config. We
|
||||||
|
+# strip the automatically generated dep here and instead co-own the
|
||||||
|
+# directory.
|
||||||
|
+%global __requires_exclude pkg-config
|
||||||
|
+
|
||||||
|
# Variables must be defined
|
||||||
|
%define with_nbd 1
|
||||||
|
|
||||||
|
@@ -327,6 +332,7 @@ rm -rf -- $RPM_BUILD_ROOT
|
||||||
|
%endif
|
||||||
|
%dir %{_sysconfdir}/dracut.conf.d
|
||||||
|
%dir %{dracutlibdir}/dracut.conf.d
|
||||||
|
+%dir %{_datadir}/pkgconfig
|
||||||
|
%{_datadir}/pkgconfig/dracut.pc
|
||||||
|
|
||||||
|
%if %{with doc}
|
23
0093-fips-add-authenc-and-authencesn-kernel-modules.patch
Normal file
23
0093-fips-add-authenc-and-authencesn-kernel-modules.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
From c97209fe69dbbacb1f87acf5ec8a0e558e553ddc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 10 Nov 2015 17:35:27 +0100
|
||||||
|
Subject: [PATCH] fips: add authenc and authencesn kernel modules
|
||||||
|
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1115112#c5
|
||||||
|
---
|
||||||
|
modules.d/01fips/module-setup.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
|
||||||
|
index 758bf6b..7278347 100755
|
||||||
|
--- a/modules.d/01fips/module-setup.sh
|
||||||
|
+++ b/modules.d/01fips/module-setup.sh
|
||||||
|
@@ -13,7 +13,7 @@ depends() {
|
||||||
|
# called by dracut
|
||||||
|
installkernel() {
|
||||||
|
local _fipsmodules _mod
|
||||||
|
- _fipsmodules="aead aes_generic aes-x86_64 ansi_cprng arc4 blowfish camellia cast6 cbc ccm "
|
||||||
|
+ _fipsmodules="aead aes_generic aes-x86_64 ansi_cprng arc4 authenc authencesn blowfish camellia cast6 cbc ccm "
|
||||||
|
_fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod drbg "
|
||||||
|
_fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 "
|
||||||
|
_fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic "
|
98
0094-lvm-remove-all-quirk-arguments.patch
Normal file
98
0094-lvm-remove-all-quirk-arguments.patch
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
From 53a738465371db3cb7df533a3ae2b5648dfd13e4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 10 Nov 2015 17:55:50 +0100
|
||||||
|
Subject: [PATCH] lvm: remove all quirk arguments
|
||||||
|
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=742564
|
||||||
|
|
||||||
|
Once lvm2 starts using /run (bug 742554), it should be no longer
|
||||||
|
necessary to disable file-based locking in the vgchange call in
|
||||||
|
fedora-storage-init.
|
||||||
|
Removing '--sysinit' will make it safe to call LVM operations
|
||||||
|
concurrently from other units.
|
||||||
|
|
||||||
|
The --sysinit is a compound option consisting of:
|
||||||
|
|
||||||
|
-> --ignorelockingfailure - not needed anymore, the /run/lock/lvm is
|
||||||
|
available rw soon in boot process
|
||||||
|
|
||||||
|
-> --ignoremonitoring - not needed since /run is available, this would
|
||||||
|
require the dm-event.service to be run before
|
||||||
|
fedora-storage-init.service (and new lvm2-activation.service when
|
||||||
|
deployed). But that's a one line change - I'll have a look whether it
|
||||||
|
plays well with other services and if yes, I'll commit the change. N.B.:
|
||||||
|
This has a consequence that all volumes activated on vgchange -ay will
|
||||||
|
be monitored at the same time they're activated (which is a plus I
|
||||||
|
think). The lvm2-monitor will just grab all the other volumes not
|
||||||
|
activated at the time of the boot's vgchange -ay call. But that's not an
|
||||||
|
issue (for already monitored volumes, calling vgchange --monitor y will
|
||||||
|
just be a NOOP).
|
||||||
|
|
||||||
|
-> --poll n - not needed, we can run the polldaemon as the /run is
|
||||||
|
available and rw (in case there's unfinished merge or mirror sync from
|
||||||
|
previous system run, the poll-daemon will be triggered at boot now).
|
||||||
|
Actually, the polldaemon should be triggered as a service like dmeventd
|
||||||
|
is, not forked off from the LVM command itself, like from vgchange in
|
||||||
|
this case - we still need to change this - there's a bug open for this
|
||||||
|
request already (bug #814857). However, we don't have this feature ready
|
||||||
|
yet so I need to check whether this is OK with the early boot process
|
||||||
|
with the current state.
|
||||||
|
---
|
||||||
|
modules.d/90lvm/lvm_scan.sh | 28 ++++++++++++++--------------
|
||||||
|
1 file changed, 14 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh
|
||||||
|
index ead28aa..8bf0864 100755
|
||||||
|
--- a/modules.d/90lvm/lvm_scan.sh
|
||||||
|
+++ b/modules.d/90lvm/lvm_scan.sh
|
||||||
|
@@ -69,11 +69,19 @@ min=$2
|
||||||
|
sub=${3%% *}
|
||||||
|
sub=${sub%%\(*};
|
||||||
|
|
||||||
|
+lvm_ignorelockingfailure="--ignorelockingfailure"
|
||||||
|
+lvm_quirk_args="--ignorelockingfailure --ignoremonitoring"
|
||||||
|
+
|
||||||
|
check_lvm_ver 2 2 57 $maj $min $sub && \
|
||||||
|
- nopoll="--poll n"
|
||||||
|
+ lvm_quirk_args="$lvm_quirk_args --poll n"
|
||||||
|
|
||||||
|
if check_lvm_ver 2 2 65 $maj $min $sub; then
|
||||||
|
- sysinit=" --sysinit $extraargs"
|
||||||
|
+ lvm_quirk_args=" --sysinit $extraargs"
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+if check_lvm_ver 2 2 221 $maj $min $sub; then
|
||||||
|
+ lvm_quirk_args=" $extraargs"
|
||||||
|
+ unset lvm_ignorelockingfailure
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset extraargs
|
||||||
|
@@ -104,24 +112,16 @@ fi
|
||||||
|
|
||||||
|
if [ -n "$LVS" ] ; then
|
||||||
|
info "Scanning devices $lvmdevs for LVM logical volumes $LVS"
|
||||||
|
- lvm lvscan --ignorelockingfailure 2>&1 | vinfo
|
||||||
|
+ lvm lvscan $lvm_ignorelockingfailure 2>&1 | vinfo
|
||||||
|
for LV in $LVS; do
|
||||||
|
- if [ -z "$sysinit" ]; then
|
||||||
|
- lvm lvchange --yes -ay --ignorelockingfailure $nopoll --ignoremonitoring $LV 2>&1 | vinfo
|
||||||
|
- else
|
||||||
|
- lvm lvchange --yes -ay $sysinit $LV 2>&1 | vinfo
|
||||||
|
- fi
|
||||||
|
+ lvm lvchange --yes -ay $lvm_quirk_args $LV 2>&1 | vinfo
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$LVS" -o -n "$VGS" ]; then
|
||||||
|
info "Scanning devices $lvmdevs for LVM volume groups $VGS"
|
||||||
|
- lvm vgscan --ignorelockingfailure 2>&1 | vinfo
|
||||||
|
- if [ -z "$sysinit" ]; then
|
||||||
|
- lvm vgchange -ay --ignorelockingfailure $nopoll --ignoremonitoring $VGS 2>&1 | vinfo
|
||||||
|
- else
|
||||||
|
- lvm vgchange -ay $sysinit $VGS 2>&1 | vinfo
|
||||||
|
- fi
|
||||||
|
+ lvm vgscan $lvm_ignorelockingfailure 2>&1 | vinfo
|
||||||
|
+ lvm vgchange -ay $lvm_quirk_args $VGS 2>&1 | vinfo
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$lvmwritten" ]; then
|
@ -0,0 +1,38 @@
|
|||||||
|
From 875426f2fc1360401ddb5f97c67df031e54958d5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 11 Nov 2015 11:38:56 +0100
|
||||||
|
Subject: [PATCH] dracut.sh: remove "_EARLY" from CONFIG_MICROCODE_* checks
|
||||||
|
|
||||||
|
EARLY is merged in the main driver
|
||||||
|
---
|
||||||
|
dracut.sh | 10 +++++-----
|
||||||
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dracut.sh b/dracut.sh
|
||||||
|
index 2712e9e..9ba481b 100755
|
||||||
|
--- a/dracut.sh
|
||||||
|
+++ b/dracut.sh
|
||||||
|
@@ -1016,18 +1016,18 @@ fi
|
||||||
|
if [[ $early_microcode = yes ]]; then
|
||||||
|
if [[ $hostonly ]]; then
|
||||||
|
[[ $(get_cpu_vendor) == "AMD" ]] \
|
||||||
|
- && ! check_kernel_config CONFIG_MICROCODE_AMD_EARLY \
|
||||||
|
+ && ! check_kernel_config CONFIG_MICROCODE_AMD \
|
||||||
|
&& unset early_microcode
|
||||||
|
[[ $(get_cpu_vendor) == "Intel" ]] \
|
||||||
|
- && ! check_kernel_config CONFIG_MICROCODE_INTEL_EARLY \
|
||||||
|
+ && ! check_kernel_config CONFIG_MICROCODE_INTEL \
|
||||||
|
&& unset early_microcode
|
||||||
|
else
|
||||||
|
- ! check_kernel_config CONFIG_MICROCODE_AMD_EARLY \
|
||||||
|
- && ! check_kernel_config CONFIG_MICROCODE_INTEL_EARLY \
|
||||||
|
+ ! check_kernel_config CONFIG_MICROCODE_AMD \
|
||||||
|
+ && ! check_kernel_config CONFIG_MICROCODE_INTEL \
|
||||||
|
&& unset early_microcode
|
||||||
|
fi
|
||||||
|
[[ $early_microcode != yes ]] \
|
||||||
|
- && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]_EARLY!=y"
|
||||||
|
+ && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]!=y"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Need to be able to have non-root users read stuff (rpcbind etc)
|
25
0096-dracut.sh-quote-outfile-on-error-removal.patch
Normal file
25
0096-dracut.sh-quote-outfile-on-error-removal.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 2cc5e92e210d8eba1bce3068ca2be96b2427862d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 11 Nov 2015 11:49:34 +0100
|
||||||
|
Subject: [PATCH] dracut.sh: quote $outfile on error removal
|
||||||
|
|
||||||
|
---
|
||||||
|
dracut.sh | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/dracut.sh b/dracut.sh
|
||||||
|
index 9ba481b..1169037 100755
|
||||||
|
--- a/dracut.sh
|
||||||
|
+++ b/dracut.sh
|
||||||
|
@@ -1690,9 +1690,10 @@ if ! (
|
||||||
|
| $compress >> "$outfile"
|
||||||
|
); then
|
||||||
|
dfatal "dracut: creation of $outfile failed"
|
||||||
|
- rm -f $outfile
|
||||||
|
+ rm -f "$outfile"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
+
|
||||||
|
dinfo "*** Creating initrd image file '$outfile' done ***"
|
||||||
|
|
||||||
|
if (( maxloglvl >= 5 )); then
|
@ -0,0 +1,34 @@
|
|||||||
|
From 64c34f34593984d93d4781f1e5fa008871e11963 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 11 Nov 2015 12:16:13 +0100
|
||||||
|
Subject: [PATCH] dracut-systemd/module-setup.sh: remove duplicate vconsole
|
||||||
|
wants
|
||||||
|
|
||||||
|
Adding the dependency on vconsole is already done in the 00systemd
|
||||||
|
module and the rescue.service has this already in the unit file.
|
||||||
|
---
|
||||||
|
modules.d/98dracut-systemd/module-setup.sh | 11 -----------
|
||||||
|
1 file changed, 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/98dracut-systemd/module-setup.sh b/modules.d/98dracut-systemd/module-setup.sh
|
||||||
|
index d917557..900162c 100755
|
||||||
|
--- a/modules.d/98dracut-systemd/module-setup.sh
|
||||||
|
+++ b/modules.d/98dracut-systemd/module-setup.sh
|
||||||
|
@@ -43,17 +43,6 @@ install() {
|
||||||
|
|
||||||
|
inst_script "$moddir/rootfs-generator.sh" $systemdutildir/system-generators/dracut-rootfs-generator
|
||||||
|
|
||||||
|
- for i in \
|
||||||
|
- emergency.target \
|
||||||
|
- rescue.service \
|
||||||
|
- systemd-ask-password-console.service \
|
||||||
|
- systemd-ask-password-plymouth.service \
|
||||||
|
- ; do
|
||||||
|
- mkdir -p "${initdir}${systemdsystemunitdir}/${i}.wants"
|
||||||
|
- ln_r "${systemdsystemunitdir}/systemd-vconsole-setup.service" \
|
||||||
|
- "${systemdsystemunitdir}/${i}.wants/systemd-vconsole-setup.service"
|
||||||
|
- done
|
||||||
|
-
|
||||||
|
mkdir -p "${initdir}/$systemdsystemunitdir/initrd.target.wants"
|
||||||
|
for i in \
|
||||||
|
dracut-cmdline.service \
|
49
0098-Makefile-remove-output-file-before-creating-it.patch
Normal file
49
0098-Makefile-remove-output-file-before-creating-it.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From 3e1c531b4ebfcca8850b5fa56ea7ce2eeacb2cc9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 11 Nov 2015 12:33:07 +0100
|
||||||
|
Subject: [PATCH] Makefile: remove output file before creating it
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile | 11 ++++++++---
|
||||||
|
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 8454c63..44c58cc 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -82,20 +82,24 @@ all: doc
|
||||||
|
endif
|
||||||
|
|
||||||
|
%: %.xml
|
||||||
|
- xsltproc -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
|
||||||
|
+ @rm -f -- "$@"
|
||||||
|
+ xsltproc -o "$@" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
|
||||||
|
|
||||||
|
%.xml: %.asc
|
||||||
|
- asciidoc -d manpage -b docbook -o $@ $<
|
||||||
|
+ @rm -f -- "$@"
|
||||||
|
+ asciidoc -d manpage -b docbook -o "$@" $<
|
||||||
|
|
||||||
|
dracut.8: dracut.usage.asc dracut.8.asc
|
||||||
|
|
||||||
|
dracut.html: dracut.asc $(manpages) dracut.css dracut.usage.asc
|
||||||
|
+ @rm -f -- dracut.xml
|
||||||
|
asciidoc -a numbered -d book -b docbook -o dracut.xml dracut.asc
|
||||||
|
+ @rm -f -- dracut.html
|
||||||
|
xsltproc -o dracut.html --xinclude -nonet \
|
||||||
|
--stringparam custom.css.source dracut.css \
|
||||||
|
--stringparam generate.css.header 1 \
|
||||||
|
http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl dracut.xml
|
||||||
|
- rm -f -- dracut.xml
|
||||||
|
+ @rm -f -- dracut.xml
|
||||||
|
|
||||||
|
dracut.pc: Makefile.inc Makefile
|
||||||
|
@echo "Name: dracut" > dracut.pc
|
||||||
|
@@ -169,6 +173,7 @@ endif
|
||||||
|
install -m 0644 dracut.pc $(DESTDIR)${pkgconfigdatadir}/dracut.pc
|
||||||
|
|
||||||
|
dracut-version.sh:
|
||||||
|
+ @rm -f dracut-version.sh
|
||||||
|
@echo "DRACUT_VERSION=$(VERSION)$(GITVERSION)" > dracut-version.sh
|
||||||
|
|
||||||
|
clean:
|
65
0099-TEST-30-ISCSI-add-rd.scsi.firmware.patch
Normal file
65
0099-TEST-30-ISCSI-add-rd.scsi.firmware.patch
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
From 6251f82c6fee64461fcccf820a5d12e144f714d3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 25 Aug 2015 11:12:59 +0200
|
||||||
|
Subject: [PATCH] TEST-30-ISCSI: add rd.scsi.firmware
|
||||||
|
|
||||||
|
(cherry picked from commit 310574f7eaf68412035eb19855afe4ce2973b784)
|
||||||
|
---
|
||||||
|
test/TEST-30-ISCSI/test.sh | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
|
||||||
|
index be3399a..ffdb77f 100755
|
||||||
|
--- a/test/TEST-30-ISCSI/test.sh
|
||||||
|
+++ b/test/TEST-30-ISCSI/test.sh
|
||||||
|
@@ -3,8 +3,9 @@ TEST_DESCRIPTION="root filesystem over iSCSI"
|
||||||
|
|
||||||
|
KVERSION=${KVERSION-$(uname -r)}
|
||||||
|
|
||||||
|
-#DEBUGFAIL="rd.shell rd.break rd.debug loglevel=7 "
|
||||||
|
DEBUGFAIL="loglevel=1"
|
||||||
|
+#DEBUGFAIL="rd.shell rd.break rd.debug loglevel=7 "
|
||||||
|
+#DEBUGFAIL="rd.debug loglevel=7 "
|
||||||
|
#SERVER_DEBUG="rd.debug loglevel=7"
|
||||||
|
SERIAL="tcp:127.0.0.1:9999"
|
||||||
|
SERIAL="null"
|
||||||
|
@@ -70,6 +71,7 @@ do_test_run() {
|
||||||
|
run_client "netroot=iscsi target0"\
|
||||||
|
"root=LABEL=singleroot netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0" \
|
||||||
|
"ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \
|
||||||
|
+ "rd.iscsi.firmware" \
|
||||||
|
"rd.iscsi.initiator=$initiator" \
|
||||||
|
|| return 1
|
||||||
|
|
||||||
|
@@ -79,6 +81,7 @@ do_test_run() {
|
||||||
|
"ip=192.168.51.101:::255.255.255.0::ens4:off" \
|
||||||
|
"netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
|
||||||
|
"netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||||
|
+ "rd.iscsi.firmware" \
|
||||||
|
"rd.iscsi.initiator=$initiator" \
|
||||||
|
|| return 1
|
||||||
|
|
||||||
|
@@ -88,6 +91,7 @@ do_test_run() {
|
||||||
|
"ip=192.168.51.101:::255.255.255.0::ens4:off" \
|
||||||
|
"netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
|
||||||
|
"netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||||
|
+ "rd.iscsi.firmware" \
|
||||||
|
"rd.iscsi.initiator=$initiator" \
|
||||||
|
"rd.waitnet=0 rd.retry=30" \
|
||||||
|
|| return 1
|
||||||
|
@@ -98,6 +102,7 @@ do_test_run() {
|
||||||
|
"ip=192.168.51.101:::255.255.255.0::ens4:off" \
|
||||||
|
"netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
|
||||||
|
"netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||||
|
+ "rd.iscsi.firmware" \
|
||||||
|
"rd.iscsi.initiator=$initiator" \
|
||||||
|
"rd.waitnet=0 rd.iscsi.testroute=0 rd.retry=30" \
|
||||||
|
|| return 1
|
||||||
|
@@ -108,6 +113,7 @@ do_test_run() {
|
||||||
|
"ip=192.168.51.101::192.168.51.1:255.255.255.0::ens4:off" \
|
||||||
|
"netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
|
||||||
|
"netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||||
|
+ "rd.iscsi.firmware" \
|
||||||
|
"rd.iscsi.initiator=$initiator" \
|
||||||
|
"rd.waitnet=0 rd.iscsi.testroute=0 rd.retry=30" \
|
||||||
|
|| return 1
|
32
0100-initqueue-add-online-queue.patch
Normal file
32
0100-initqueue-add-online-queue.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From ab57132aa5df3f85123cd7991c402b3f9ebdce73 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 25 Aug 2015 11:13:23 +0200
|
||||||
|
Subject: [PATCH] initqueue: add online queue
|
||||||
|
|
||||||
|
(cherry picked from commit d3f61fb5cdaa56053ae8de0203a13722a7fe717a)
|
||||||
|
---
|
||||||
|
modules.d/99base/initqueue.sh | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/99base/initqueue.sh b/modules.d/99base/initqueue.sh
|
||||||
|
index 193cc5c..c301638 100755
|
||||||
|
--- a/modules.d/99base/initqueue.sh
|
||||||
|
+++ b/modules.d/99base/initqueue.sh
|
||||||
|
@@ -13,6 +13,8 @@ while [ $# -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
--onetime)
|
||||||
|
onetime="yes";;
|
||||||
|
+ --online)
|
||||||
|
+ qname="/online";;
|
||||||
|
--settled)
|
||||||
|
qname="/settled";;
|
||||||
|
--finished)
|
||||||
|
@@ -50,7 +52,7 @@ fi
|
||||||
|
{
|
||||||
|
[ -n "$onetime" ] && echo '[ -e "$job" ] && rm -f -- "$job"'
|
||||||
|
[ -n "$env" ] && echo "$env"
|
||||||
|
- echo "$exe $@"
|
||||||
|
+ echo "$exe" "$@"
|
||||||
|
} > "/tmp/$$-${job}.sh"
|
||||||
|
|
||||||
|
mv -f "/tmp/$$-${job}.sh" "$hookdir/initqueue${qname}/${job}.sh"
|
25
0101-dracut.spec-raise-systemd-requirement-to-219.patch
Normal file
25
0101-dracut.spec-raise-systemd-requirement-to-219.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 01430d27d4c04e06a958164e6945ec7581f7190f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 25 Aug 2015 11:13:38 +0200
|
||||||
|
Subject: [PATCH] dracut.spec: raise systemd requirement to >= 219
|
||||||
|
|
||||||
|
needs systemd-escape
|
||||||
|
|
||||||
|
(cherry picked from commit 35f40b75e444adae3b3c9bb610d635d9c17a753d)
|
||||||
|
---
|
||||||
|
dracut.spec | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/dracut.spec b/dracut.spec
|
||||||
|
index d0bb9bd..9e19fcc 100644
|
||||||
|
--- a/dracut.spec
|
||||||
|
+++ b/dracut.spec
|
||||||
|
@@ -114,7 +114,7 @@ Requires: kpartx
|
||||||
|
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} > 6
|
||||||
|
Requires: util-linux >= 2.21
|
||||||
|
-Requires: systemd >= 199
|
||||||
|
+Requires: systemd >= 219
|
||||||
|
Requires: procps-ng
|
||||||
|
Conflicts: grubby < 8.23
|
||||||
|
Conflicts: initscripts < 8.63-1
|
@ -0,0 +1,60 @@
|
|||||||
|
From 7391fef29ab9a4766b5eb04d05803f2ebaa95752 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 25 Aug 2015 11:14:38 +0200
|
||||||
|
Subject: [PATCH] iscsi/iscsiroot.sh: handle firmware in online queue
|
||||||
|
|
||||||
|
otherwise it does not get called, if no netroot is set
|
||||||
|
|
||||||
|
(cherry picked from commit 3bd3bbec319eccd28145f77e42b83b479286ff34)
|
||||||
|
---
|
||||||
|
modules.d/95iscsi/iscsiroot.sh | 32 +++++++++++++++-----------------
|
||||||
|
1 file changed, 15 insertions(+), 17 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
index ad95812..893f279 100755
|
||||||
|
--- a/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
+++ b/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
@@ -236,28 +236,26 @@ if [ "$netif" = "dummy" ] && all_ifaces_up; then
|
||||||
|
sleep 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
-# loop over all netroot parameter
|
||||||
|
-netroot=$(getarg netroot)
|
||||||
|
-if [ $? -eq 0 ] && [ "$netroot" != "dhcp" ]; then
|
||||||
|
- for nroot in $(getargs netroot); do
|
||||||
|
- [ "${nroot%%:*}" = "iscsi" ] || continue
|
||||||
|
- nroot="${nroot##iscsi:}"
|
||||||
|
- if [ -n "$nroot" ]; then
|
||||||
|
- handle_netroot "$nroot"
|
||||||
|
- ret=$(($ret + $?))
|
||||||
|
- fi
|
||||||
|
- done
|
||||||
|
+if [ "$netif" = "online" ]; then
|
||||||
|
if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
|
||||||
|
handle_firmware
|
||||||
|
- ret=$(($ret + $?))
|
||||||
|
+ ret=$?
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
- if [ -n "$iroot" ]; then
|
||||||
|
- handle_netroot "$iroot"
|
||||||
|
- ret=$?
|
||||||
|
+ # loop over all netroot parameter
|
||||||
|
+ nroot=$(getarg netroot)
|
||||||
|
+ if [ $? -eq 0 ] && [ "$nroot" != "dhcp" ]; then
|
||||||
|
+ for nroot in $(getargs netroot); do
|
||||||
|
+ [ "${nroot%%:*}" = "iscsi" ] || continue
|
||||||
|
+ nroot="${nroot##iscsi:}"
|
||||||
|
+ if [ -n "$nroot" ]; then
|
||||||
|
+ handle_netroot "$nroot"
|
||||||
|
+ ret=$(($ret + $?))
|
||||||
|
+ fi
|
||||||
|
+ done
|
||||||
|
else
|
||||||
|
- if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
|
||||||
|
- handle_firmware
|
||||||
|
+ if [ -n "$iroot" ]; then
|
||||||
|
+ handle_netroot "$iroot"
|
||||||
|
ret=$?
|
||||||
|
fi
|
||||||
|
fi
|
46
0103-iscsi-parse-iscsiroot.sh-do-not-modify-netroot.patch
Normal file
46
0103-iscsi-parse-iscsiroot.sh-do-not-modify-netroot.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
From 6138a45dd20319417a59f0592f67ac261a380031 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 25 Aug 2015 11:15:59 +0200
|
||||||
|
Subject: [PATCH] iscsi/parse-iscsiroot.sh: do not modify netroot
|
||||||
|
|
||||||
|
(cherry picked from commit 197e4c90b95f2d9e57104d3b462918c335494697)
|
||||||
|
---
|
||||||
|
modules.d/95iscsi/parse-iscsiroot.sh | 17 +++++++++++++----
|
||||||
|
1 file changed, 13 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
index a889da1..c167dad 100755
|
||||||
|
--- a/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
@@ -14,10 +14,17 @@
|
||||||
|
# This script is sourced, so root should be set. But let's be paranoid
|
||||||
|
[ -z "$root" ] && root=$(getarg root=)
|
||||||
|
if [ -z "$netroot" ]; then
|
||||||
|
- for netroot in $(getargs netroot=); do
|
||||||
|
- [ "${netroot%%:*}" = "iscsi" ] && break
|
||||||
|
+ for nroot in $(getargs netroot=); do
|
||||||
|
+ [ "${nroot%%:*}" = "iscsi" ] && break
|
||||||
|
done
|
||||||
|
- [ "${netroot%%:*}" = "iscsi" ] || unset netroot
|
||||||
|
+ if [ "${nroot%%:*}" = "iscsi" ]; then
|
||||||
|
+ netroot="$nroot"
|
||||||
|
+ else
|
||||||
|
+ for nroot in $(getargs netroot=); do
|
||||||
|
+ [ "${nroot%%:*}" = "dhcp" ] && break
|
||||||
|
+ done
|
||||||
|
+ netroot="$nroot"
|
||||||
|
+ fi
|
||||||
|
fi
|
||||||
|
[ -z "$iscsiroot" ] && iscsiroot=$(getarg iscsiroot=)
|
||||||
|
[ -z "$iscsi_firmware" ] && getargbool 0 rd.iscsi.firmware -y iscsi_firmware && iscsi_firmware="1"
|
||||||
|
@@ -59,7 +66,9 @@ fi
|
||||||
|
|
||||||
|
# iscsi_firmware does not need argument checking
|
||||||
|
if [ -n "$iscsi_firmware" ] || getargbool 0 rd.iscsi.ibft -d "ip=ibft"; then
|
||||||
|
- [ -z "$netroot" ] && netroot=iscsi:
|
||||||
|
+ if [ "$root" != "dhcp" ] && [ "$netroot" != "dhcp" ]; then
|
||||||
|
+ [ -z "$netroot" ] && netroot=iscsi:
|
||||||
|
+ fi
|
||||||
|
modprobe -b -q iscsi_boot_sysfs 2>/dev/null
|
||||||
|
modprobe -b -q iscsi_ibft
|
||||||
|
fi
|
199
0104-network-add-options-to-tweak-timeouts.patch
Normal file
199
0104-network-add-options-to-tweak-timeouts.patch
Normal file
@ -0,0 +1,199 @@
|
|||||||
|
From 2448fbf17b8deb28046b9721503cab15721716ca Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Fri, 3 Jul 2015 13:30:40 +0200
|
||||||
|
Subject: [PATCH] network: add options to tweak timeouts
|
||||||
|
|
||||||
|
rd.net.dhcp.retry=<cnt>
|
||||||
|
If this option is set, dracut will try to connect via dhcp
|
||||||
|
<cnt> times before failing. Default is 1.
|
||||||
|
|
||||||
|
rd.net.timeout.dhcp=<arg>
|
||||||
|
If this option is set, dhclient is called with "-timeout <arg>".
|
||||||
|
|
||||||
|
rd.net.timeout.iflink=<seconds>
|
||||||
|
Wait <seconds> until link shows up. Default is 60 seconds.
|
||||||
|
|
||||||
|
rd.net.timeout.ifup=<seconds>
|
||||||
|
Wait <seconds> until link has state "UP". Default is 20 seconds.
|
||||||
|
|
||||||
|
rd.net.timeout.route=<seconds>
|
||||||
|
Wait <seconds> until route shows up. Default is 20 seconds.
|
||||||
|
|
||||||
|
rd.net.timeout.ipv6dad=<seconds>
|
||||||
|
Wait <seconds> until IPv6 DAD is finished. Default is 50 seconds.
|
||||||
|
|
||||||
|
rd.net.timeout.ipv6auto=<seconds>
|
||||||
|
Wait <seconds> until IPv6 automatic addresses are assigned.
|
||||||
|
Default is 40 seconds.
|
||||||
|
|
||||||
|
rd.net.timeout.carrier=<seconds>
|
||||||
|
Wait <seconds> until carrier is recognized. Default is 5 seconds.
|
||||||
|
|
||||||
|
(cherry picked from commit d8ad687e1a4c0343eb076902b11aff2b2b2c4b85)
|
||||||
|
---
|
||||||
|
dracut.cmdline.7.asc | 25 +++++++++++++++++++++++++
|
||||||
|
modules.d/40network/ifup.sh | 26 ++++++++++++++++++++++----
|
||||||
|
modules.d/40network/net-lib.sh | 36 ++++++++++++++++++++++++++++++------
|
||||||
|
3 files changed, 77 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
|
||||||
|
index 8c7e965..d790afd 100644
|
||||||
|
--- a/dracut.cmdline.7.asc
|
||||||
|
+++ b/dracut.cmdline.7.asc
|
||||||
|
@@ -606,6 +606,31 @@ NFS
|
||||||
|
**rd.nfs.domain=**__<NFSv4 domain name>__::
|
||||||
|
Set the NFSv4 domain name. Will overwrite the settings in _/etc/idmap.conf_.
|
||||||
|
|
||||||
|
+**rd.net.dhcp.retry=**__<cnt>__::
|
||||||
|
+ If this option is set, dracut will try to connect via dhcp <cnt> times before failing.
|
||||||
|
+ Default is 1.
|
||||||
|
+
|
||||||
|
+**rd.net.timeout.dhcp=**__<arg>__::
|
||||||
|
+ If this option is set, dhclient is called with "-timeout <arg>".
|
||||||
|
+
|
||||||
|
+**rd.net.timeout.iflink=**__<seconds>__::
|
||||||
|
+ Wait <seconds> until link shows up. Default is 60 seconds.
|
||||||
|
+
|
||||||
|
+**rd.net.timeout.ifup=**__<seconds>__::
|
||||||
|
+ Wait <seconds> until link has state "UP". Default is 20 seconds.
|
||||||
|
+
|
||||||
|
+**rd.net.timeout.route=**__<seconds>__::
|
||||||
|
+ Wait <seconds> until route shows up. Default is 20 seconds.
|
||||||
|
+
|
||||||
|
+**rd.net.timeout.ipv6dad=**__<seconds>__::
|
||||||
|
+ Wait <seconds> until IPv6 DAD is finished. Default is 50 seconds.
|
||||||
|
+
|
||||||
|
+**rd.net.timeout.ipv6auto=**__<seconds>__::
|
||||||
|
+ Wait <seconds> until IPv6 automatic addresses are assigned. Default is 40 seconds.
|
||||||
|
+
|
||||||
|
+**rd.net.timeout.carrier=**__<seconds>__::
|
||||||
|
+ Wait <seconds> until carrier is recognized. Default is 5 seconds.
|
||||||
|
+
|
||||||
|
CIFS
|
||||||
|
~~~
|
||||||
|
**root=**cifs://[__<username>__[:__<password>__]@]__<server-ip>__:__<root-dir>__::
|
||||||
|
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||||
|
index 0138e01..bb20afe 100755
|
||||||
|
--- a/modules.d/40network/ifup.sh
|
||||||
|
+++ b/modules.d/40network/ifup.sh
|
||||||
|
@@ -93,15 +93,33 @@ do_dhcp() {
|
||||||
|
# event for nfsroot
|
||||||
|
# XXX add -V vendor class and option parsing per kernel
|
||||||
|
|
||||||
|
+ local _COUNT=0
|
||||||
|
+ local _timeout=$(getargs rd.net.timeout.dhcp=)
|
||||||
|
+ local _DHCPRETRY=$(getargs rd.net.dhcp.retry=)
|
||||||
|
+ _DHCPRETRY=${_DHCPRETRY:-1}
|
||||||
|
+
|
||||||
|
[ -e /tmp/dhclient.$netif.pid ] && return 0
|
||||||
|
|
||||||
|
if ! iface_has_link $netif; then
|
||||||
|
- echo "No carrier detected"
|
||||||
|
+ warn "No carrier detected on interface $netif"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
- echo "Starting dhcp for interface $netif"
|
||||||
|
- dhclient "$@" -1 -q -cf /etc/dhclient.conf -pf /tmp/dhclient.$netif.pid -lf /tmp/dhclient.$netif.lease $netif \
|
||||||
|
- || echo "dhcp failed"
|
||||||
|
+
|
||||||
|
+ while [ $_COUNT -lt $_DHCPRETRY ]; do
|
||||||
|
+ info "Starting dhcp for interface $netif"
|
||||||
|
+ dhclient "$@" \
|
||||||
|
+ ${_timeout:+-timeout $_timeout} \
|
||||||
|
+ -1 -q \
|
||||||
|
+ -cf /etc/dhclient.conf \
|
||||||
|
+ -pf /tmp/dhclient.$netif.pid \
|
||||||
|
+ -lf /tmp/dhclient.$netif.lease \
|
||||||
|
+ $netif \
|
||||||
|
+ && return 0
|
||||||
|
+ _COUNT=$(($_COUNT+1))
|
||||||
|
+ [ $_COUNT -lt $_DHCPRETRY ] && sleep 1
|
||||||
|
+ done
|
||||||
|
+ warn "dhcp for interface $netif failed"
|
||||||
|
+ return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
load_ipv6() {
|
||||||
|
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
||||||
|
index 2e79619..2f25de7 100755
|
||||||
|
--- a/modules.d/40network/net-lib.sh
|
||||||
|
+++ b/modules.d/40network/net-lib.sh
|
||||||
|
@@ -504,7 +504,11 @@ parse_ifname_opts() {
|
||||||
|
wait_for_if_link() {
|
||||||
|
local cnt=0
|
||||||
|
local li
|
||||||
|
- while [ $cnt -lt 600 ]; do
|
||||||
|
+ local timeout="$(getargs rd.net.timeout.iflink=)"
|
||||||
|
+ timeout=${timeout:-60}
|
||||||
|
+ timeout=$(($timeout*10))
|
||||||
|
+
|
||||||
|
+ while [ $cnt -lt $timeout ]; do
|
||||||
|
li=$(ip -o link show dev $1 2>/dev/null)
|
||||||
|
[ -n "$li" ] && return 0
|
||||||
|
sleep 0.1
|
||||||
|
@@ -516,7 +520,11 @@ wait_for_if_link() {
|
||||||
|
wait_for_if_up() {
|
||||||
|
local cnt=0
|
||||||
|
local li
|
||||||
|
- while [ $cnt -lt 200 ]; do
|
||||||
|
+ local timeout="$(getargs rd.net.timeout.ifup=)"
|
||||||
|
+ timeout=${timeout:-20}
|
||||||
|
+ timeout=$(($timeout*10))
|
||||||
|
+
|
||||||
|
+ while [ $cnt -lt $timeout ]; do
|
||||||
|
li=$(ip -o link show up dev $1)
|
||||||
|
[ -n "$li" ] && [ -z "${li##*state UP*}" ] && return 0
|
||||||
|
sleep 0.1
|
||||||
|
@@ -527,7 +535,11 @@ wait_for_if_up() {
|
||||||
|
|
||||||
|
wait_for_route_ok() {
|
||||||
|
local cnt=0
|
||||||
|
- while [ $cnt -lt 200 ]; do
|
||||||
|
+ local timeout="$(getargs rd.net.timeout.route=)"
|
||||||
|
+ timeout=${timeout:-20}
|
||||||
|
+ timeout=$(($timeout*10))
|
||||||
|
+
|
||||||
|
+ while [ $cnt -lt $timeout ]; do
|
||||||
|
li=$(ip route show)
|
||||||
|
[ -n "$li" ] && [ -z "${li##*$1*}" ] && return 0
|
||||||
|
sleep 0.1
|
||||||
|
@@ -539,7 +551,11 @@ wait_for_route_ok() {
|
||||||
|
wait_for_ipv6_dad() {
|
||||||
|
local cnt=0
|
||||||
|
local li
|
||||||
|
- while [ $cnt -lt 500 ]; do
|
||||||
|
+ local timeout="$(getargs rd.net.timeout.ipv6dad=)"
|
||||||
|
+ timeout=${timeout:-50}
|
||||||
|
+ timeout=$(($timeout*10))
|
||||||
|
+
|
||||||
|
+ while [ $cnt -lt $timeout ]; do
|
||||||
|
li=$(ip -6 addr show dev $1 scope link)
|
||||||
|
strstr "$li" "tentative" || return 0
|
||||||
|
sleep 0.1
|
||||||
|
@@ -551,7 +567,11 @@ wait_for_ipv6_dad() {
|
||||||
|
wait_for_ipv6_auto() {
|
||||||
|
local cnt=0
|
||||||
|
local li
|
||||||
|
- while [ $cnt -lt 400 ]; do
|
||||||
|
+ local timeout="$(getargs rd.net.timeout.ipv6auto=)"
|
||||||
|
+ timeout=${timeout:-40}
|
||||||
|
+ timeout=$(($timeout*10))
|
||||||
|
+
|
||||||
|
+ while [ $cnt -lt $timeout ]; do
|
||||||
|
li=$(ip -6 addr show dev $1)
|
||||||
|
if ! strstr "$li" "tentative"; then
|
||||||
|
strstr "$li" "dynamic" && return 0
|
||||||
|
@@ -579,8 +599,12 @@ iface_has_link() {
|
||||||
|
[ -n "$interface" ] || return 2
|
||||||
|
interface="/sys/class/net/$interface"
|
||||||
|
[ -d "$interface" ] || return 2
|
||||||
|
+ local timeout="$(getargs rd.net.timeout.carrier=)"
|
||||||
|
+ timeout=${timeout:-5}
|
||||||
|
+ timeout=$(($timeout*10))
|
||||||
|
+
|
||||||
|
linkup "$1"
|
||||||
|
- while [ $cnt -lt 50 ]; do
|
||||||
|
+ while [ $cnt -lt $timeout ]; do
|
||||||
|
[ "$(cat $interface/carrier)" = 1 ] && return 0
|
||||||
|
sleep 0.1
|
||||||
|
cnt=$(($cnt+1))
|
127
0105-fcoe-start-with-fcoemon-instead-of-fipvlan.patch
Normal file
127
0105-fcoe-start-with-fcoemon-instead-of-fipvlan.patch
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
From 4891d9a2ce693f5649b4a0e9214d00488e0b128c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chris Leech <cleech@redhat.com>
|
||||||
|
Date: Fri, 3 Jul 2015 13:40:12 +0200
|
||||||
|
Subject: [PATCH] fcoe: start with fcoemon instead of fipvlan
|
||||||
|
|
||||||
|
(cherry picked from commit d02f522089863af2a802cef9e63965349bfcc819)
|
||||||
|
---
|
||||||
|
modules.d/95fcoe/fcoe-up.sh | 30 ++++++++++++++++++++++++++++--
|
||||||
|
modules.d/95fcoe/module-setup.sh | 8 +++++---
|
||||||
|
modules.d/95fcoe/parse-fcoe.sh | 5 +----
|
||||||
|
3 files changed, 34 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh
|
||||||
|
index 950e4b6..fb3b4c4 100755
|
||||||
|
--- a/modules.d/95fcoe/fcoe-up.sh
|
||||||
|
+++ b/modules.d/95fcoe/fcoe-up.sh
|
||||||
|
@@ -15,6 +15,7 @@ type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
|
||||||
|
|
||||||
|
netif=$1
|
||||||
|
dcb=$2
|
||||||
|
+vlan="yes"
|
||||||
|
|
||||||
|
iflink=$(cat /sys/class/net/$netif/iflink)
|
||||||
|
ifindex=$(cat /sys/class/net/$netif/ifindex)
|
||||||
|
@@ -29,6 +30,21 @@ linkup "$netif"
|
||||||
|
netdriver=$(readlink -f /sys/class/net/$netif/device/driver)
|
||||||
|
netdriver=${netdriver##*/}
|
||||||
|
|
||||||
|
+write_fcoemon_cfg() {
|
||||||
|
+ echo FCOE_ENABLE=\"yes\" > /etc/fcoe/cfg-$netif
|
||||||
|
+ if [ "$dcb" = "dcb" ]; then
|
||||||
|
+ echo DCB_REQUIRED=\"yes\" >> /etc/fcoe/cfg-$netif
|
||||||
|
+ else
|
||||||
|
+ echo DCB_REQUIRED=\"no\" >> /etc/fcoe/cfg-$netif
|
||||||
|
+ fi
|
||||||
|
+ if [ "$vlan" = "yes" ]; then
|
||||||
|
+ echo AUTO_VLAN=\"yes\" >> /etc/fcoe/cfg-$netif
|
||||||
|
+ else
|
||||||
|
+ echo AUTO_VLAN=\"no\" >> /etc/fcoe/cfg-$netif
|
||||||
|
+ fi
|
||||||
|
+ echo MODE=\"fabric\" >> /etc/fcoe/cfg-$netif
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
if [ "$dcb" = "dcb" ]; then
|
||||||
|
# wait for lldpad to be ready
|
||||||
|
i=0
|
||||||
|
@@ -47,6 +63,13 @@ if [ "$dcb" = "dcb" ]; then
|
||||||
|
done
|
||||||
|
|
||||||
|
while [ $i -lt 60 ]; do
|
||||||
|
+ dcbtool sc "$netif" pfc e:1 a:1 w:1 && break
|
||||||
|
+ info "Retrying to turn dcb on"
|
||||||
|
+ sleep 1
|
||||||
|
+ i=$(($i+1))
|
||||||
|
+ done
|
||||||
|
+
|
||||||
|
+ while [ $i -lt 60 ]; do
|
||||||
|
dcbtool sc "$netif" app:fcoe e:1 a:1 w:1 && break
|
||||||
|
info "Retrying to turn fcoe on"
|
||||||
|
sleep 1
|
||||||
|
@@ -55,7 +78,8 @@ if [ "$dcb" = "dcb" ]; then
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
- fipvlan "$netif" -c -s
|
||||||
|
+ write_fcoemon_cfg
|
||||||
|
+ fcoemon --syslog
|
||||||
|
elif [ "$netdriver" = "bnx2x" ]; then
|
||||||
|
# If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan
|
||||||
|
modprobe 8021q
|
||||||
|
@@ -64,7 +88,9 @@ elif [ "$netdriver" = "bnx2x" ]; then
|
||||||
|
sleep 3
|
||||||
|
fipvlan "$netif" -c -s
|
||||||
|
else
|
||||||
|
- printf '%s' "$netif" > /sys/module/fcoe/parameters/create
|
||||||
|
+ vlan="no"
|
||||||
|
+ write_fcoemon_cfg
|
||||||
|
+ fcoemon --syslog
|
||||||
|
fi
|
||||||
|
|
||||||
|
need_shutdown
|
||||||
|
diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh
|
||||||
|
index 9c67f17..ae606aa 100755
|
||||||
|
--- a/modules.d/95fcoe/module-setup.sh
|
||||||
|
+++ b/modules.d/95fcoe/module-setup.sh
|
||||||
|
@@ -10,8 +10,7 @@ check() {
|
||||||
|
[ -z "$fcoe_ctlr" ] && return 255
|
||||||
|
}
|
||||||
|
|
||||||
|
- require_binaries dcbtool fipvlan lldpad ip readlink || return 1
|
||||||
|
-
|
||||||
|
+ require_binaries dcbtool fipvlan lldpad ip readlink fcoemon fcoeadm || return 1
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -67,9 +66,12 @@ cmdline() {
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
install() {
|
||||||
|
- inst_multiple ip dcbtool fipvlan lldpad readlink lldptool
|
||||||
|
+ inst_multiple ip dcbtool fipvlan lldpad readlink lldptool fcoemon fcoeadm
|
||||||
|
+ inst_libdir_file 'libhbalinux.so*'
|
||||||
|
+ inst "/etc/hba.conf" "/etc/hba.conf"
|
||||||
|
|
||||||
|
mkdir -m 0755 -p "$initdir/var/lib/lldpad"
|
||||||
|
+ mkdir -m 0755 -p "$initdir/etc/fcoe"
|
||||||
|
|
||||||
|
if [[ $hostonly_cmdline == "yes" ]] ; then
|
||||||
|
local _fcoeconf=$(cmdline)
|
||||||
|
diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh
|
||||||
|
index a214007..9f47184 100755
|
||||||
|
--- a/modules.d/95fcoe/parse-fcoe.sh
|
||||||
|
+++ b/modules.d/95fcoe/parse-fcoe.sh
|
||||||
|
@@ -18,12 +18,9 @@
|
||||||
|
# If it's not set we don't continue
|
||||||
|
[ -z "$fcoe" ] && return
|
||||||
|
|
||||||
|
-
|
||||||
|
-# BRCM: Later, should check whether bnx2x is loaded first before loading bnx2fc so do not load bnx2fc when there are no Broadcom adapters
|
||||||
|
-[ -d /sys/module/fcoe ] || modprobe -b -a fcoe || die "FCoE requested but kernel/initrd does not support FCoE"
|
||||||
|
+[ -e /sys/bus/fcoe/ctlr_create ] || modprobe -b -a fcoe || die "FCoE requested but kernel/initrd does not support FCoE"
|
||||||
|
|
||||||
|
initqueue --onetime modprobe -b -q bnx2fc
|
||||||
|
-udevadm settle --timeout=30
|
||||||
|
|
||||||
|
parse_fcoe_opts() {
|
||||||
|
local OLDIFS="$IFS"
|
36
0106-fcoe-EDD-parsing-patch-for-i40e.patch
Normal file
36
0106-fcoe-EDD-parsing-patch-for-i40e.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From 9a5bd6804a56d5c3091d26894c5302980b38252e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chris Leech <cleech@redhat.com>
|
||||||
|
Date: Fri, 3 Jul 2015 13:44:16 +0200
|
||||||
|
Subject: [PATCH] fcoe: EDD parsing patch for i40e
|
||||||
|
|
||||||
|
(cherry picked from commit 4031a2fa642c1db897c1340ad2718301bf873fb3)
|
||||||
|
---
|
||||||
|
modules.d/95fcoe/fcoe-edd.sh | 13 +++++++++++++
|
||||||
|
1 file changed, 13 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95fcoe/fcoe-edd.sh b/modules.d/95fcoe/fcoe-edd.sh
|
||||||
|
index 9ab2d3e..fb3dcd7 100755
|
||||||
|
--- a/modules.d/95fcoe/fcoe-edd.sh
|
||||||
|
+++ b/modules.d/95fcoe/fcoe-edd.sh
|
||||||
|
@@ -9,8 +9,21 @@ fi
|
||||||
|
|
||||||
|
for disk in /sys/firmware/edd/int13_*; do
|
||||||
|
[ -d $disk ] || continue
|
||||||
|
+ if [ -e ${disk}/pci_dev/driver ]; then
|
||||||
|
+ driver=`readlink ${disk}/pci_dev/driver`
|
||||||
|
+ driver=${driver##*/}
|
||||||
|
+ fi
|
||||||
|
+ # i40e uses dev_port 1 for a virtual fcoe function
|
||||||
|
+ if [ "${driver}" == "i40e" ]; then
|
||||||
|
+ dev_port=1
|
||||||
|
+ fi
|
||||||
|
for nic in ${disk}/pci_dev/net/*; do
|
||||||
|
[ -d $nic ] || continue
|
||||||
|
+ if [ -n "${dev_port}" -a -e ${nic}/dev_port ]; then
|
||||||
|
+ if [ `cat ${nic}/dev_port` -ne ${dev_port} ]; then
|
||||||
|
+ continue
|
||||||
|
+ fi
|
||||||
|
+ fi
|
||||||
|
if [ -e ${nic}/address ]; then
|
||||||
|
fcoe_interface=${nic##*/}
|
||||||
|
if ! [ -e "/tmp/.fcoe-$fcoe_interface" ]; then
|
87
0107-fcoe-fcoe-edd.sh-cleanup-the-script.patch
Normal file
87
0107-fcoe-fcoe-edd.sh-cleanup-the-script.patch
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
From cca313fa759997d8d2f2d1926e51c91b152e363b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Fri, 3 Jul 2015 13:52:32 +0200
|
||||||
|
Subject: [PATCH] fcoe/fcoe-edd.sh: cleanup the script
|
||||||
|
|
||||||
|
- check if modprobe was successful
|
||||||
|
- add a timeout for /sys/firmware/edd
|
||||||
|
- only remove the module, if it was loaded by the script
|
||||||
|
|
||||||
|
(cherry picked from commit 34203d03c0d43aa0aed12988d2719455e80eae54)
|
||||||
|
---
|
||||||
|
modules.d/95fcoe/fcoe-edd.sh | 46 ++++++++++++++++++++++++++++++--------------
|
||||||
|
1 file changed, 32 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95fcoe/fcoe-edd.sh b/modules.d/95fcoe/fcoe-edd.sh
|
||||||
|
index fb3dcd7..3b07ad3 100755
|
||||||
|
--- a/modules.d/95fcoe/fcoe-edd.sh
|
||||||
|
+++ b/modules.d/95fcoe/fcoe-edd.sh
|
||||||
|
@@ -1,36 +1,54 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
-dcb=$1
|
||||||
|
+dcb="$1"
|
||||||
|
|
||||||
|
-if ! [ -d /sys/firmware/edd ]; then
|
||||||
|
- modprobe edd
|
||||||
|
- while ! [ -d /sys/firmware/edd ]; do sleep 0.1; done
|
||||||
|
-fi
|
||||||
|
+_modprobe_r_edd="0"
|
||||||
|
+
|
||||||
|
+check_edd() {
|
||||||
|
+ local cnt=0
|
||||||
|
+
|
||||||
|
+ [ -d /sys/firmware/edd ] && return 0
|
||||||
|
+
|
||||||
|
+ _modprobe_r_edd="1"
|
||||||
|
+ modprobe edd || return $?
|
||||||
|
+
|
||||||
|
+ while [ $cnt -lt 600 ]; do
|
||||||
|
+ [ -d /sys/firmware/edd ] && return 0
|
||||||
|
+ cnt=$(($cnt+1))
|
||||||
|
+ sleep 0.1
|
||||||
|
+ done
|
||||||
|
+ return 1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+check_edd || exit 1
|
||||||
|
|
||||||
|
for disk in /sys/firmware/edd/int13_*; do
|
||||||
|
- [ -d $disk ] || continue
|
||||||
|
- if [ -e ${disk}/pci_dev/driver ]; then
|
||||||
|
- driver=`readlink ${disk}/pci_dev/driver`
|
||||||
|
+ [ -d "$disk" ] || continue
|
||||||
|
+ if [ -e "${disk}/pci_dev/driver" ]; then
|
||||||
|
+ driver=$(readlink "${disk}/pci_dev/driver")
|
||||||
|
driver=${driver##*/}
|
||||||
|
fi
|
||||||
|
# i40e uses dev_port 1 for a virtual fcoe function
|
||||||
|
if [ "${driver}" == "i40e" ]; then
|
||||||
|
dev_port=1
|
||||||
|
fi
|
||||||
|
- for nic in ${disk}/pci_dev/net/*; do
|
||||||
|
- [ -d $nic ] || continue
|
||||||
|
- if [ -n "${dev_port}" -a -e ${nic}/dev_port ]; then
|
||||||
|
- if [ `cat ${nic}/dev_port` -ne ${dev_port} ]; then
|
||||||
|
+ for nic in "${disk}"/pci_dev/net/*; do
|
||||||
|
+ [ -d "$nic" ] || continue
|
||||||
|
+ if [ -n "${dev_port}" -a -e "${nic}/dev_port" ]; then
|
||||||
|
+ if [ "$(cat ${nic}/dev_port)" -ne "${dev_port}" ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -e ${nic}/address ]; then
|
||||||
|
fcoe_interface=${nic##*/}
|
||||||
|
if ! [ -e "/tmp/.fcoe-$fcoe_interface" ]; then
|
||||||
|
- /sbin/fcoe-up $fcoe_interface $dcb
|
||||||
|
+ /sbin/fcoe-up "$fcoe_interface" "$dcb"
|
||||||
|
> "/tmp/.fcoe-$fcoe_interface"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
-modprobe -r edd
|
||||||
|
+
|
||||||
|
+[ "$_modprobe_r_edd" = "1" ] && modprobe -r edd
|
||||||
|
+
|
||||||
|
+unset _modprobe_r_edd
|
@ -0,0 +1,38 @@
|
|||||||
|
From 3913d061c4bdfad3f496f7a3d0a69e0f3ef51a47 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Fri, 3 Jul 2015 14:00:33 +0200
|
||||||
|
Subject: [PATCH] livenet: don't attempt to download the image for every
|
||||||
|
interface
|
||||||
|
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1152485
|
||||||
|
(cherry picked from commit e5f4bbd804e337a7efaf3a0cb4fc3a37b7e33b47)
|
||||||
|
---
|
||||||
|
modules.d/90livenet/livenetroot.sh | 10 +++++++++-
|
||||||
|
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/90livenet/livenetroot.sh b/modules.d/90livenet/livenetroot.sh
|
||||||
|
index 1bbee55..2e36ee9 100755
|
||||||
|
--- a/modules.d/90livenet/livenetroot.sh
|
||||||
|
+++ b/modules.d/90livenet/livenetroot.sh
|
||||||
|
@@ -7,12 +7,20 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||||
|
|
||||||
|
PATH=/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
|
+[ -e /tmp/livenet.downloaded ] && exit 0
|
||||||
|
+
|
||||||
|
# args get passed from 40network/netroot
|
||||||
|
netroot="$2"
|
||||||
|
liveurl="${netroot#livenet:}"
|
||||||
|
info "fetching $liveurl"
|
||||||
|
imgfile=$(fetch_url "$liveurl")
|
||||||
|
-[ $? = 0 ] || die "failed to download live image: error $?"
|
||||||
|
+
|
||||||
|
+if [ $? = 0 ]; then
|
||||||
|
+ warn "failed to download live image: error $?"
|
||||||
|
+ exit 1
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+> /tmp/livenet.downloaded
|
||||||
|
|
||||||
|
# TODO: couldn't dmsquash-live-root handle this?
|
||||||
|
if [ ${imgfile##*.} = "iso" ]; then
|
@ -0,0 +1,36 @@
|
|||||||
|
From 848edf22f0a2f664310026871139e1ab0f49bd52 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Fri, 3 Jul 2015 14:24:50 +0200
|
||||||
|
Subject: [PATCH] multipath: install all multipath path selector kernel modules
|
||||||
|
|
||||||
|
By default, dracut only builds in dm-service-time into the initramfs as
|
||||||
|
that is the default multipath.conf path selector. If the user changes
|
||||||
|
the path selector to "round robin" on the fly and runs dracut, multipath
|
||||||
|
does not find any paths on boot and the user will be dropped into a
|
||||||
|
shell.
|
||||||
|
|
||||||
|
Apparently, in RHEL7 dracut defaults to "hostonly" mode, i.e. modules
|
||||||
|
not currently in use at the time dracut runs do not get built into
|
||||||
|
initramfs. This is definitely one case where this doesn't work. A change
|
||||||
|
to reconfigure multipath probably should not render the system
|
||||||
|
unbootable.
|
||||||
|
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1195392
|
||||||
|
(cherry picked from commit f11d7a81e2eec37ed5b6708ed8cd359f0a5eaa69)
|
||||||
|
---
|
||||||
|
modules.d/90multipath/module-setup.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
|
||||||
|
index 321f13e..831c99f 100755
|
||||||
|
--- a/modules.d/90multipath/module-setup.sh
|
||||||
|
+++ b/modules.d/90multipath/module-setup.sh
|
||||||
|
@@ -84,7 +84,7 @@ installkernel() {
|
||||||
|
}
|
||||||
|
|
||||||
|
( find_kernel_modules_by_path drivers/scsi; if [ "$_arch" = "s390" -o "$_arch" = "s390x" ]; then find_kernel_modules_by_path drivers/s390/scsi; fi;
|
||||||
|
- find_kernel_modules_by_path drivers/md ) | mp_mod_filter | instmods
|
||||||
|
+ find_kernel_modules_by_path drivers/md ) | mp_mod_filter | hostonly='' instmods
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
73
0110-man-page-changed-grub.conf-to-grub2.cfg.patch
Normal file
73
0110-man-page-changed-grub.conf-to-grub2.cfg.patch
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
From 20486a16e9f2d203a1877ff5de0b1b0bf9d74d9a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Fri, 3 Jul 2015 14:28:55 +0200
|
||||||
|
Subject: [PATCH] man page: changed grub.conf to grub2.cfg
|
||||||
|
|
||||||
|
(cherry picked from commit 77c0b308259d3b91c536de9a49c0b99427c5924e)
|
||||||
|
---
|
||||||
|
dracut.usage.asc | 16 ++++++----------
|
||||||
|
1 file changed, 6 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dracut.usage.asc b/dracut.usage.asc
|
||||||
|
index b4a8663..2b25588 100644
|
||||||
|
--- a/dracut.usage.asc
|
||||||
|
+++ b/dracut.usage.asc
|
||||||
|
@@ -99,10 +99,6 @@ raid with encryption and LVM on top), as long as you specify the correct
|
||||||
|
filesystem LABEL or UUID on the kernel command line for your root device, dracut
|
||||||
|
will find it and boot from it.
|
||||||
|
|
||||||
|
-The kernel command line usually can be configured in _/boot/grub/grub.conf_ or
|
||||||
|
-_/boot/grub2/grub.cfg_, if grub is your bootloader and it also can be edited in
|
||||||
|
-the real boot process in the grub menu.
|
||||||
|
-
|
||||||
|
The kernel command line can also be provided by the dhcp server with the
|
||||||
|
root-path option. See <<NetworkBoot>>.
|
||||||
|
|
||||||
|
@@ -310,7 +306,7 @@ stick and mount that. Then you can store the output for later inspection.
|
||||||
|
In all cases, the following should be mentioned and attached to your bug report:
|
||||||
|
|
||||||
|
* The exact kernel command-line used. Typically from the bootloader
|
||||||
|
-configuration file (e.g. _/etc/grub.conf_) or from _/proc/cmdline_.
|
||||||
|
+configuration file (e.g. _/boot/grub2/grub.cfg_) or from _/proc/cmdline_.
|
||||||
|
* A copy of your disk partition information from _/etc/fstab_, which might be
|
||||||
|
obtained booting an old working initramfs or a rescue medium.
|
||||||
|
* Turn on dracut debugging (see _the 'debugging dracut' section_), and attach
|
||||||
|
@@ -345,7 +341,7 @@ logging during the system boot. This section documents configuring a
|
||||||
|
serial console connection to record boot messages.
|
||||||
|
|
||||||
|
. First, enable serial console output for both the kernel and the bootloader.
|
||||||
|
-. Open the file _/etc/grub.conf_ for editing. Below the line ''timeout=5'', add
|
||||||
|
+. Open the file _/boot/grub2/grub.cfg_ for editing. Below the line ''timeout=5'', add
|
||||||
|
the following:
|
||||||
|
+
|
||||||
|
----
|
||||||
|
@@ -353,14 +349,14 @@ serial --unit=0 --speed=9600
|
||||||
|
terminal --timeout=5 serial console
|
||||||
|
----
|
||||||
|
+
|
||||||
|
-. Also in _/etc/grub.conf_, add the following boot arguemnts to the ''kernel''
|
||||||
|
+. Also in _/boot/grub2/grub.cfg_, add the following boot arguemnts to the ''kernel''
|
||||||
|
line:
|
||||||
|
+
|
||||||
|
----
|
||||||
|
console=tty0 console=ttyS0,9600
|
||||||
|
----
|
||||||
|
+
|
||||||
|
-. When finished, the _/etc/grub.conf_ file should look similar to the example
|
||||||
|
+. When finished, the _/boot/grub2/grub.cfg_ file should look similar to the example
|
||||||
|
below.
|
||||||
|
+
|
||||||
|
----
|
||||||
|
@@ -395,10 +391,10 @@ dracut offers a shell for interactive debugging in the event dracut fails to
|
||||||
|
locate your root filesystem. To enable the shell:
|
||||||
|
|
||||||
|
. Add the boot parameter ''rd.shell'' to your bootloader configuration file
|
||||||
|
-(e.g. _/etc/grub.conf_)
|
||||||
|
+(e.g. _/boot/grub2/grub.cfg_)
|
||||||
|
. Remove the boot arguments ''rhgb'' and ''quiet''
|
||||||
|
+
|
||||||
|
-A sample _/etc/grub.conf_ bootloader configuration file is listed below.
|
||||||
|
+A sample _/boot/grub2/grub.cfg_ bootloader configuration file is listed below.
|
||||||
|
+
|
||||||
|
----
|
||||||
|
default=0
|
@ -0,0 +1,24 @@
|
|||||||
|
From 9af753c46896cfcb5480bbb1dd896e042043349c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Thu, 9 Jul 2015 16:14:50 +0200
|
||||||
|
Subject: [PATCH] crypt: install drbg unconditionally in hostonly mode
|
||||||
|
|
||||||
|
older kernels had the drbg kernel module and didn't need it
|
||||||
|
|
||||||
|
(cherry picked from commit 89948e58fd0f80def0912c18c503912873aa9c48)
|
||||||
|
---
|
||||||
|
modules.d/90crypt/module-setup.sh | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh
|
||||||
|
index e8c690e..4df520c 100755
|
||||||
|
--- a/modules.d/90crypt/module-setup.sh
|
||||||
|
+++ b/modules.d/90crypt/module-setup.sh
|
||||||
|
@@ -25,6 +25,7 @@ depends() {
|
||||||
|
# called by dracut
|
||||||
|
installkernel() {
|
||||||
|
instmods dm_crypt =crypto
|
||||||
|
+ hostonly="" instmods drbg
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
22
0112-iscsi-module-setup.sh-iscsid-need-var-lib-iscsi.patch
Normal file
22
0112-iscsi-module-setup.sh-iscsid-need-var-lib-iscsi.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
From f5753e1861c5eaf688d552ca50a6dd0f8e1d0f85 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Sat, 15 Aug 2015 13:22:07 +0200
|
||||||
|
Subject: [PATCH] iscsi/module-setup.sh: iscsid need /var/lib/iscsi
|
||||||
|
|
||||||
|
(cherry picked from commit f74b0a9f38838dddcf6f56daa9f20fc3e86087ca)
|
||||||
|
---
|
||||||
|
modules.d/95iscsi/module-setup.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
||||||
|
index 3002591..beb80e3 100755
|
||||||
|
--- a/modules.d/95iscsi/module-setup.sh
|
||||||
|
+++ b/modules.d/95iscsi/module-setup.sh
|
||||||
|
@@ -257,6 +257,6 @@ install() {
|
||||||
|
echo "Before=dracut-initqueue.service"
|
||||||
|
) > "${initdir}/$systemdsystemunitdir/iscsid.service.d/dracut.conf"
|
||||||
|
fi
|
||||||
|
-
|
||||||
|
+ inst_dir /var/lib/iscsi
|
||||||
|
dracut_need_initqueue
|
||||||
|
}
|
50
0113-TEST-30-ISCSI-fix-test-to-run-with-new-iscsi.patch
Normal file
50
0113-TEST-30-ISCSI-fix-test-to-run-with-new-iscsi.patch
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
From 0a10d7fc51e181f6e9c4715f563be3861c054a56 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Sat, 15 Aug 2015 13:22:44 +0200
|
||||||
|
Subject: [PATCH] TEST-30-ISCSI: fix test to run with new iscsi
|
||||||
|
|
||||||
|
(cherry picked from commit 836ca3f47eb0b0a4c97ae704b0b9619a00dbfa87)
|
||||||
|
---
|
||||||
|
test/TEST-30-ISCSI/test.sh | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
|
||||||
|
index ffdb77f..fc4bdce 100755
|
||||||
|
--- a/test/TEST-30-ISCSI/test.sh
|
||||||
|
+++ b/test/TEST-30-ISCSI/test.sh
|
||||||
|
@@ -49,7 +49,7 @@ run_client() {
|
||||||
|
-net nic,macaddr=52:54:00:12:34:00,model=e1000 \
|
||||||
|
-net nic,macaddr=52:54:00:12:34:01,model=e1000 \
|
||||||
|
-net socket,connect=127.0.0.1:12330 \
|
||||||
|
- -append "rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug=0 $DEBUGFAIL $*" \
|
||||||
|
+ -append "rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 $DEBUGFAIL $*" \
|
||||||
|
-initrd $TESTDIR/initramfs.testing
|
||||||
|
if ! grep -F -m 1 -q iscsi-OK $TESTDIR/client.img; then
|
||||||
|
echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
|
||||||
|
@@ -93,7 +93,7 @@ do_test_run() {
|
||||||
|
"netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||||
|
"rd.iscsi.firmware" \
|
||||||
|
"rd.iscsi.initiator=$initiator" \
|
||||||
|
- "rd.waitnet=0 rd.retry=30" \
|
||||||
|
+ "rd.iscsi.waitnet=0" \
|
||||||
|
|| return 1
|
||||||
|
|
||||||
|
run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \
|
||||||
|
@@ -104,7 +104,7 @@ do_test_run() {
|
||||||
|
"netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||||
|
"rd.iscsi.firmware" \
|
||||||
|
"rd.iscsi.initiator=$initiator" \
|
||||||
|
- "rd.waitnet=0 rd.iscsi.testroute=0 rd.retry=30" \
|
||||||
|
+ "rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \
|
||||||
|
|| return 1
|
||||||
|
|
||||||
|
run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0 default GW" \
|
||||||
|
@@ -115,7 +115,7 @@ do_test_run() {
|
||||||
|
"netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||||
|
"rd.iscsi.firmware" \
|
||||||
|
"rd.iscsi.initiator=$initiator" \
|
||||||
|
- "rd.waitnet=0 rd.iscsi.testroute=0 rd.retry=30" \
|
||||||
|
+ "rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \
|
||||||
|
|| return 1
|
||||||
|
|
||||||
|
return 0
|
120
0114-iscsi-handle-timeout-case-better.patch
Normal file
120
0114-iscsi-handle-timeout-case-better.patch
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
From bcbcacb5d66276157274c1e35d1fea2f937c4677 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 18 Aug 2015 11:50:15 +0200
|
||||||
|
Subject: [PATCH] iscsi: handle timeout case better
|
||||||
|
|
||||||
|
(cherry picked from commit bfe65f913a4bc6bc5fdb7aa75234c229a2ceef8f)
|
||||||
|
---
|
||||||
|
modules.d/95iscsi/iscsiroot.sh | 6 +++---
|
||||||
|
modules.d/95iscsi/parse-iscsiroot.sh | 41 +++++++++++++++++++++---------------
|
||||||
|
2 files changed, 27 insertions(+), 20 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
index 893f279..e730cb0 100755
|
||||||
|
--- a/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
+++ b/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
@@ -106,7 +106,7 @@ handle_netroot()
|
||||||
|
parse_iscsi_root "$1" || return 1
|
||||||
|
|
||||||
|
# Bail out early, if there is no route to the destination
|
||||||
|
- if is_ip "$iscsi_target_ip" && [ "$netif" != "dummy" ] && ! all_ifaces_up && getargbool 1 rd.iscsi.testroute; then
|
||||||
|
+ if is_ip "$iscsi_target_ip" && [ "$netif" != "timeout" ] && ! all_ifaces_up && getargbool 1 rd.iscsi.testroute; then
|
||||||
|
ip route get "$iscsi_target_ip" >/dev/null 2>&1 || return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
@@ -224,11 +224,11 @@ handle_netroot()
|
||||||
|
|
||||||
|
ret=0
|
||||||
|
|
||||||
|
-if [ "$netif" != "dummy" ] && getargbool 1 rd.iscsi.waitnet; then
|
||||||
|
+if [ "$netif" != "timeout" ] && getargbool 1 rd.iscsi.waitnet; then
|
||||||
|
all_ifaces_up || exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
-if [ "$netif" = "dummy" ] && all_ifaces_up; then
|
||||||
|
+if [ "$netif" = "timeout" ] && all_ifaces_up; then
|
||||||
|
# s.th. went wrong and the timeout script hits
|
||||||
|
# restart
|
||||||
|
systemctl restart iscsid
|
||||||
|
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
index c167dad..35628cc 100755
|
||||||
|
--- a/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
@@ -47,7 +47,11 @@ if [ "${root%%:*}" = "iscsi" ] ; then
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If it's not empty or iscsi we don't continue
|
||||||
|
-[ -z "$netroot" ] || [ "${netroot%%:*}" = "iscsi" ] || return
|
||||||
|
+for nroot in $(getargs netroot); do
|
||||||
|
+ [ "${nroot%%:*}" = "iscsi" ] || continue
|
||||||
|
+ netroot="$nroot"
|
||||||
|
+ break
|
||||||
|
+done
|
||||||
|
|
||||||
|
if [ -n "$iscsiroot" ] ; then
|
||||||
|
[ -z "$netroot" ] && netroot=$root
|
||||||
|
@@ -71,19 +75,18 @@ if [ -n "$iscsi_firmware" ] || getargbool 0 rd.iscsi.ibft -d "ip=ibft"; then
|
||||||
|
fi
|
||||||
|
modprobe -b -q iscsi_boot_sysfs 2>/dev/null
|
||||||
|
modprobe -b -q iscsi_ibft
|
||||||
|
+ # if no ip= is given, but firmware
|
||||||
|
+ echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh
|
||||||
|
+ initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "$netroot" "$NEWROOT"
|
||||||
|
+ initqueue --unique --onetime --settled /sbin/iscsiroot dummy "'$netroot'" "'$NEWROOT'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
-initqueue --onetime --timeout /sbin/iscsiroot dummy "$netroot" "$NEWROOT"
|
||||||
|
|
||||||
|
-# If it's not iscsi we don't continue
|
||||||
|
-[ "${netroot%%:*}" = "iscsi" ] || return
|
||||||
|
+[ -z "$netroot" ] || [ "${netroot%%:*}" = "iscsi" ] || return 1
|
||||||
|
|
||||||
|
-initqueue --onetime modprobe --all -b -q qla4xxx cxgb3i cxgb4i bnx2i be2iscsi
|
||||||
|
+initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "$netroot" "$NEWROOT"
|
||||||
|
|
||||||
|
-if [ -z "$iscsi_firmware" ] ; then
|
||||||
|
- type parse_iscsi_root >/dev/null 2>&1 || . /lib/net-lib.sh
|
||||||
|
- parse_iscsi_root "$netroot" || return
|
||||||
|
-fi
|
||||||
|
+initqueue --onetime modprobe --all -b -q qla4xxx cxgb3i cxgb4i bnx2i be2iscsi
|
||||||
|
|
||||||
|
# ISCSI actually supported?
|
||||||
|
if ! [ -e /sys/module/iscsi_tcp ]; then
|
||||||
|
@@ -92,7 +95,7 @@ fi
|
||||||
|
|
||||||
|
if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; then
|
||||||
|
if ! getargbool 1 rd.neednet >/dev/null || ! getarg "ip="; then
|
||||||
|
- initqueue --onetime --settled /sbin/iscsiroot dummy "$netroot" "$NEWROOT"
|
||||||
|
+ initqueue --unique --onetime --settled /sbin/iscsiroot dummy "'$netroot'" "'$NEWROOT'"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
@@ -113,17 +116,21 @@ if [ -z $iscsi_initiator ] && [ -f /sys/firmware/ibft/initiator/initiator-name ]
|
||||||
|
rm -f /etc/iscsi/initiatorname.iscsi
|
||||||
|
mkdir -p /etc/iscsi
|
||||||
|
ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
||||||
|
- systemctl restart iscsid
|
||||||
|
- sleep 1
|
||||||
|
> /tmp/iscsi_set_initiator
|
||||||
|
+ if systemctl --quiet is-active iscsid.service; then
|
||||||
|
+ systemctl restart iscsid
|
||||||
|
+ sleep 1
|
||||||
|
+ fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
-if [ -n "$iscsi_firmware" ] ; then
|
||||||
|
- echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh
|
||||||
|
-else
|
||||||
|
- netroot_enc=$(str_replace "$netroot" '/' '\2f')
|
||||||
|
+
|
||||||
|
+for nroot in $(getargs netroot); do
|
||||||
|
+ [ "${nroot%%:*}" = "iscsi" ] || continue
|
||||||
|
+ type parse_iscsi_root >/dev/null 2>&1 || . /lib/net-lib.sh
|
||||||
|
+ parse_iscsi_root "$nroot" || return 1
|
||||||
|
+ netroot_enc=$(str_replace "$nroot" '/' '\2f')
|
||||||
|
echo "[ -f '/tmp/iscsistarted-$netroot_enc' ]" > $hookdir/initqueue/finished/iscsi_started.sh
|
||||||
|
-fi
|
||||||
|
+done
|
||||||
|
|
||||||
|
# Done, all good!
|
||||||
|
rootok=1
|
@ -0,0 +1,24 @@
|
|||||||
|
From db7d7398186f025adb746fd9f70fb36249ba6f86 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 18 Aug 2015 11:52:56 +0200
|
||||||
|
Subject: [PATCH] systemd/dracut-cmdline.sh: print out cmdline in one line
|
||||||
|
|
||||||
|
(cherry picked from commit 93a5a3d3ca6738e3f0282c4d3fc8be3f38f150d3)
|
||||||
|
---
|
||||||
|
modules.d/98dracut-systemd/dracut-cmdline.sh | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/98dracut-systemd/dracut-cmdline.sh b/modules.d/98dracut-systemd/dracut-cmdline.sh
|
||||||
|
index 871f81b..a1dcf84 100755
|
||||||
|
--- a/modules.d/98dracut-systemd/dracut-cmdline.sh
|
||||||
|
+++ b/modules.d/98dracut-systemd/dracut-cmdline.sh
|
||||||
|
@@ -14,8 +14,7 @@ if ! getargbool 1 'rd.hostonly'; then
|
||||||
|
[ -f /tmp/99-cmdline-ask.conf ] && mv /tmp/99-cmdline-ask.conf /etc/cmdline.d/99-cmdline-ask.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
-info "Using kernel command line parameters:"
|
||||||
|
-getcmdline | vinfo
|
||||||
|
+info "Using kernel command line parameters:" $(getcmdline)
|
||||||
|
|
||||||
|
getargbool 0 rd.udev.log-priority=info -d rd.udev.info -d -n -y rdudevinfo && echo 'udev_log="info"' >> /etc/udev/udev.conf
|
||||||
|
getargbool 0 rd.udev.log-priority=debug -d rd.udev.debug -d -n -y rdudevdebug && echo 'udev_log="debug"' >> /etc/udev/udev.conf
|
@ -0,0 +1,25 @@
|
|||||||
|
From 93b9885a65e693d264e9199b42cf9a08b167b332 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 18 Aug 2015 11:53:31 +0200
|
||||||
|
Subject: [PATCH] network/ifup.sh: let dhcp client run in the background
|
||||||
|
|
||||||
|
we need to renew the lease
|
||||||
|
|
||||||
|
(cherry picked from commit fb2d643a385f1b02fbac6c2782b0026029c6bde7)
|
||||||
|
---
|
||||||
|
modules.d/40network/ifup.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||||
|
index bb20afe..ceb5f5c 100755
|
||||||
|
--- a/modules.d/40network/ifup.sh
|
||||||
|
+++ b/modules.d/40network/ifup.sh
|
||||||
|
@@ -109,7 +109,7 @@ do_dhcp() {
|
||||||
|
info "Starting dhcp for interface $netif"
|
||||||
|
dhclient "$@" \
|
||||||
|
${_timeout:+-timeout $_timeout} \
|
||||||
|
- -1 -q \
|
||||||
|
+ -q \
|
||||||
|
-cf /etc/dhclient.conf \
|
||||||
|
-pf /tmp/dhclient.$netif.pid \
|
||||||
|
-lf /tmp/dhclient.$netif.lease \
|
25
0117-network-ifup.sh-arping-for-static-IPv4-addresses.patch
Normal file
25
0117-network-ifup.sh-arping-for-static-IPv4-addresses.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 9ab5ddf16ab973ae63af8cad33b58e31b53ce170 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 18 Aug 2015 12:07:41 +0200
|
||||||
|
Subject: [PATCH] network/ifup.sh: arping for static IPv4 addresses
|
||||||
|
|
||||||
|
(cherry picked from commit 38180271c587f3053710bf38a6cda829d3a7c00f)
|
||||||
|
---
|
||||||
|
modules.d/40network/ifup.sh | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||||
|
index ceb5f5c..7da9171 100755
|
||||||
|
--- a/modules.d/40network/ifup.sh
|
||||||
|
+++ b/modules.d/40network/ifup.sh
|
||||||
|
@@ -158,6 +158,10 @@ do_static() {
|
||||||
|
ip addr add $ip/$mask ${srv:+peer $srv} dev $netif
|
||||||
|
wait_for_ipv6_dad $netif
|
||||||
|
else
|
||||||
|
+ if ! arping -f -q -D -c 2 -I $netif $ip; then
|
||||||
|
+ warn "Duplicate address detected for $ip for interface $netif."
|
||||||
|
+ return 1
|
||||||
|
+ fi
|
||||||
|
ip addr flush dev $netif
|
||||||
|
ip addr add $ip/$mask ${srv:+peer $srv} brd + dev $netif
|
||||||
|
fi
|
@ -0,0 +1,33 @@
|
|||||||
|
From 0c004c8e646a2d93d722e65203cc33239b6757be Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 18 Aug 2015 12:13:55 +0200
|
||||||
|
Subject: [PATCH] network/parse-ip-opts.sh: bind enx* interface to the MAC
|
||||||
|
|
||||||
|
do it automatically for the persistent naming scheme
|
||||||
|
|
||||||
|
(cherry picked from commit 2eb3b00133d572183ca022b626d200549ce4ffa8)
|
||||||
|
---
|
||||||
|
modules.d/40network/parse-ip-opts.sh | 10 ++++++++++
|
||||||
|
1 file changed, 10 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
|
||||||
|
index 33bb068..12f4765 100755
|
||||||
|
--- a/modules.d/40network/parse-ip-opts.sh
|
||||||
|
+++ b/modules.d/40network/parse-ip-opts.sh
|
||||||
|
@@ -111,6 +111,16 @@ for p in $(getargs ip=); do
|
||||||
|
die "Server-ip or dhcp for netboot needed, but current arguments say otherwise"
|
||||||
|
fi
|
||||||
|
|
||||||
|
+ if str_starts "$dev" "enx" && [ ${#dev} -eq 15 ]; then
|
||||||
|
+ printf -- "ifname=%s:%s:%s:%s:%s:%s:%s\n" \
|
||||||
|
+ "$dev" \
|
||||||
|
+ "${dev:3:2}" \
|
||||||
|
+ "${dev:5:2}" \
|
||||||
|
+ "${dev:7:2}" \
|
||||||
|
+ "${dev:9:2}" \
|
||||||
|
+ "${dev:11:2}" \
|
||||||
|
+ "${dev:13:2}" >> /etc/cmdline.d/80-enx.conf
|
||||||
|
+ fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# put BOOTIF in IFACES to make sure it comes up
|
32
0119-udev-rules-install-40-redhat.rules.patch
Normal file
32
0119-udev-rules-install-40-redhat.rules.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From dd8d161afe4a22455dd0139055215ca78fa9220d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 18 Aug 2015 12:25:53 +0200
|
||||||
|
Subject: [PATCH] udev-rules: install 40-redhat.rules
|
||||||
|
|
||||||
|
(cherry picked from commit 0c0abf97ccc2306a7089d53a0a1f92e80b2e733c)
|
||||||
|
---
|
||||||
|
modules.d/95udev-rules/module-setup.sh | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh
|
||||||
|
index 141d29d..f4f9cf8 100755
|
||||||
|
--- a/modules.d/95udev-rules/module-setup.sh
|
||||||
|
+++ b/modules.d/95udev-rules/module-setup.sh
|
||||||
|
@@ -27,6 +27,7 @@ install() {
|
||||||
|
fi
|
||||||
|
|
||||||
|
inst_rules \
|
||||||
|
+ 40-redhat.rules \
|
||||||
|
50-firmware.rules \
|
||||||
|
50-udev.rules \
|
||||||
|
50-udev-default.rules \
|
||||||
|
@@ -46,7 +47,8 @@ install() {
|
||||||
|
80-net-setup-link.rules \
|
||||||
|
95-late.rules \
|
||||||
|
"$moddir/59-persistent-storage.rules" \
|
||||||
|
- "$moddir/61-persistent-storage.rules"
|
||||||
|
+ "$moddir/61-persistent-storage.rules" \
|
||||||
|
+ ${NULL}
|
||||||
|
|
||||||
|
prepare_udev_rules 59-persistent-storage.rules 61-persistent-storage.rules
|
||||||
|
# debian udev rules
|
41
0120-fcoe-cleanup-lldpad.patch
Normal file
41
0120-fcoe-cleanup-lldpad.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From 4a88aaff1006b9c9126ecfe26e0a0eb286eea211 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 18 Aug 2015 12:27:32 +0200
|
||||||
|
Subject: [PATCH] fcoe: cleanup lldpad
|
||||||
|
|
||||||
|
Resolves: rhbz#1246217
|
||||||
|
(cherry picked from commit 69c437dd1c3b877f60ced307068e01619124fef4)
|
||||||
|
---
|
||||||
|
modules.d/95fcoe/cleanup-fcoe.sh | 10 ++++++++++
|
||||||
|
modules.d/95fcoe/module-setup.sh | 1 +
|
||||||
|
2 files changed, 11 insertions(+)
|
||||||
|
create mode 100644 modules.d/95fcoe/cleanup-fcoe.sh
|
||||||
|
|
||||||
|
diff --git a/modules.d/95fcoe/cleanup-fcoe.sh b/modules.d/95fcoe/cleanup-fcoe.sh
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..5ff4d05
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/modules.d/95fcoe/cleanup-fcoe.sh
|
||||||
|
@@ -0,0 +1,10 @@
|
||||||
|
+#!/bin/sh
|
||||||
|
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||||
|
+# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
|
+
|
||||||
|
+if [ -e /var/run/lldpad.pid ]; then
|
||||||
|
+ lldpad -k
|
||||||
|
+ mkdir -m 0755 -p /run/initramfs/state/dev/shm
|
||||||
|
+ cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1
|
||||||
|
+ echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab
|
||||||
|
+fi
|
||||||
|
diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh
|
||||||
|
index ae606aa..059bfde 100755
|
||||||
|
--- a/modules.d/95fcoe/module-setup.sh
|
||||||
|
+++ b/modules.d/95fcoe/module-setup.sh
|
||||||
|
@@ -82,6 +82,7 @@ install() {
|
||||||
|
inst "$moddir/fcoe-genrules.sh" "/sbin/fcoe-genrules.sh"
|
||||||
|
inst_hook pre-trigger 03 "$moddir/lldpad.sh"
|
||||||
|
inst_hook cmdline 99 "$moddir/parse-fcoe.sh"
|
||||||
|
+ inst_hook cleanup 90 "$moddir/cleanup-fcoe.sh"
|
||||||
|
dracut_need_initqueue
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
From c04a321b92ba9c7a5e63fc07e58607025c588bed Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 18 Aug 2015 12:40:01 +0200
|
||||||
|
Subject: [PATCH] network/net-lib.sh:ibft unset gateway or dns, if set to
|
||||||
|
0.0.0.0
|
||||||
|
|
||||||
|
(cherry picked from commit 942d60d8afad4eb8b131a33fe9618e3e8392d33f)
|
||||||
|
---
|
||||||
|
modules.d/40network/net-lib.sh | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
||||||
|
index 2f25de7..b61a1e8 100755
|
||||||
|
--- a/modules.d/40network/net-lib.sh
|
||||||
|
+++ b/modules.d/40network/net-lib.sh
|
||||||
|
@@ -242,9 +242,12 @@ ibft_to_cmdline() {
|
||||||
|
# skip not assigned ip adresses
|
||||||
|
[ "$ip" = "0.0.0.0" ] && continue
|
||||||
|
[ -e ${iface}/gateway ] && gw=$(read a < ${iface}/gateway; echo $a)
|
||||||
|
+ [ "$gateway" = "0.0.0.0" ] && unset $gateway
|
||||||
|
[ -e ${iface}/subnet-mask ] && mask=$(read a < ${iface}/subnet-mask; echo $a)
|
||||||
|
[ -e ${iface}/primary-dns ] && dns1=$(read a < ${iface}/primary-dns; echo $a)
|
||||||
|
+ [ "$dns1" = "0.0.0.0" ] && unset $dns1
|
||||||
|
[ -e ${iface}/secondary-dns ] && dns2=$(read a < ${iface}/secondary-dns; echo $a)
|
||||||
|
+ [ "$dns2" = "0.0.0.0" ] && unset $dns2
|
||||||
|
[ -e ${iface}/hostname ] && hostname=$(read a < ${iface}/hostname; echo $a)
|
||||||
|
if [ -n "$ip" ] && [ -n "$mask" ]; then
|
||||||
|
echo "ip=$ip::$gw:$mask:$hostname:$dev:none${dns1:+:$dns1}${dns2:+:$dns2}"
|
@ -0,0 +1,23 @@
|
|||||||
|
From 4483fff87c0a5074f3498bfd59387179c20c7ea3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 18 Aug 2015 12:41:12 +0200
|
||||||
|
Subject: [PATCH] network/dhclient: exit arping immediatly, if we get an answer
|
||||||
|
|
||||||
|
(cherry picked from commit d6bfa7052a620ebdd37f78655462120871c49ebd)
|
||||||
|
---
|
||||||
|
modules.d/40network/dhclient-script.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh
|
||||||
|
index 1d891cd..4e2090d 100755
|
||||||
|
--- a/modules.d/40network/dhclient-script.sh
|
||||||
|
+++ b/modules.d/40network/dhclient-script.sh
|
||||||
|
@@ -117,7 +117,7 @@ case $reason in
|
||||||
|
read layer2 < /sys/class/net/$netif/device/layer2
|
||||||
|
fi
|
||||||
|
if [ "$layer2" != "0" ]; then
|
||||||
|
- if ! arping -q -D -c 2 -I $netif $new_ip_address ; then
|
||||||
|
+ if ! arping -f -q -D -c 2 -I $netif $new_ip_address ; then
|
||||||
|
warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying"
|
||||||
|
exit 1
|
||||||
|
fi
|
41
0123-dmraid-only-scan-once-because-of-one-device.patch
Normal file
41
0123-dmraid-only-scan-once-because-of-one-device.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From a283636b83da0ea967bb0281a8f730750f6a2702 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 18 Aug 2015 15:04:31 +0200
|
||||||
|
Subject: [PATCH] dmraid: only scan once because of one device
|
||||||
|
|
||||||
|
(cherry picked from commit 80153acc0f8bbb3829575201e2a0ba3da41268a8)
|
||||||
|
---
|
||||||
|
modules.d/90dmraid/61-dmraid-imsm.rules | 2 +-
|
||||||
|
modules.d/90dmraid/dmraid.sh | 7 +++++++
|
||||||
|
2 files changed, 8 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/90dmraid/61-dmraid-imsm.rules b/modules.d/90dmraid/61-dmraid-imsm.rules
|
||||||
|
index 33e060b..de7e97e 100644
|
||||||
|
--- a/modules.d/90dmraid/61-dmraid-imsm.rules
|
||||||
|
+++ b/modules.d/90dmraid/61-dmraid-imsm.rules
|
||||||
|
@@ -24,6 +24,6 @@ PROGRAM=="/bin/sh -c 'for i in $sys/$devpath/holders/dm-[0-9]*; do [ -e $$i ] &&
|
||||||
|
ENV{DEVTYPE}!="partition", \
|
||||||
|
RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}"
|
||||||
|
|
||||||
|
-RUN+="/sbin/initqueue --onetime --unique --settled /sbin/dmraid_scan"
|
||||||
|
+RUN+="/sbin/initqueue --onetime --unique --settled /sbin/dmraid_scan $env{DEVNAME}"
|
||||||
|
|
||||||
|
LABEL="dm_end"
|
||||||
|
diff --git a/modules.d/90dmraid/dmraid.sh b/modules.d/90dmraid/dmraid.sh
|
||||||
|
index 3dcff38..e7a09b0 100755
|
||||||
|
--- a/modules.d/90dmraid/dmraid.sh
|
||||||
|
+++ b/modules.d/90dmraid/dmraid.sh
|
||||||
|
@@ -2,6 +2,13 @@
|
||||||
|
|
||||||
|
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||||
|
|
||||||
|
+dev="$1"
|
||||||
|
+devenc=$(str_replace "$1" '/' '\2f')
|
||||||
|
+
|
||||||
|
+[ -e /tmp/dmraid.$devenc ] && exit 0
|
||||||
|
+
|
||||||
|
+>/tmp/dmraid.$devenc
|
||||||
|
+
|
||||||
|
DM_RAIDS=$(getargs rd.dm.uuid -d rd_DM_UUID=)
|
||||||
|
|
||||||
|
if [ -n "$DM_RAIDS" ] || getargbool 0 rd.auto; then
|
@ -0,0 +1,24 @@
|
|||||||
|
From f939cffdac08fb40eac0e633a8d58965b9ee275a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 18 Aug 2015 15:05:11 +0200
|
||||||
|
Subject: [PATCH] test/TEST-04-FULL-SYSTEMD/create-root.sh: modprobe btrfs
|
||||||
|
|
||||||
|
why so ever... it used to load automatically
|
||||||
|
|
||||||
|
(cherry picked from commit 65977ef1d107c8741d9f2633b8618aa3aee2a49d)
|
||||||
|
---
|
||||||
|
test/TEST-04-FULL-SYSTEMD/create-root.sh | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/test/TEST-04-FULL-SYSTEMD/create-root.sh b/test/TEST-04-FULL-SYSTEMD/create-root.sh
|
||||||
|
index 5972bd3..0a66257 100755
|
||||||
|
--- a/test/TEST-04-FULL-SYSTEMD/create-root.sh
|
||||||
|
+++ b/test/TEST-04-FULL-SYSTEMD/create-root.sh
|
||||||
|
@@ -4,6 +4,7 @@ for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do
|
||||||
|
> "/etc/udev/rules.d/$x"
|
||||||
|
done
|
||||||
|
rm -f -- /etc/lvm/lvm.conf
|
||||||
|
+modprobe btrfs
|
||||||
|
udevadm control --reload
|
||||||
|
set -e
|
||||||
|
# save a partition at the beginning for future flagging purposes
|
22
0125-TEST-15-BTRFS-load-btrfs-module.patch
Normal file
22
0125-TEST-15-BTRFS-load-btrfs-module.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
From c606be49d7f78c688f3b4696bc2b05adaf408ec9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 18 Aug 2015 15:26:23 +0200
|
||||||
|
Subject: [PATCH] TEST-15-BTRFS: load btrfs module
|
||||||
|
|
||||||
|
(cherry picked from commit d9b5a98532b6823adb35f7c68766f4df9db8a3c9)
|
||||||
|
---
|
||||||
|
test/TEST-15-BTRFSRAID/create-root.sh | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/test/TEST-15-BTRFSRAID/create-root.sh b/test/TEST-15-BTRFSRAID/create-root.sh
|
||||||
|
index f4062f5..e95e57d 100755
|
||||||
|
--- a/test/TEST-15-BTRFSRAID/create-root.sh
|
||||||
|
+++ b/test/TEST-15-BTRFSRAID/create-root.sh
|
||||||
|
@@ -3,6 +3,7 @@
|
||||||
|
for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do
|
||||||
|
> "/etc/udev/rules.d/$x"
|
||||||
|
done
|
||||||
|
+modprobe btrfs
|
||||||
|
udevadm control --reload
|
||||||
|
# save a partition at the beginning for future flagging purposes
|
||||||
|
sfdisk -X gpt /dev/sda <<EOF
|
@ -0,0 +1,28 @@
|
|||||||
|
From 5193198dc9caabedfdd801a94bf936c69758aa14 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 19 Aug 2015 13:59:40 +0200
|
||||||
|
Subject: [PATCH] network/ifup.sh:do_static(): error out, if interface could
|
||||||
|
not be brought up
|
||||||
|
|
||||||
|
(cherry picked from commit 77f46adf5e5ab1f6da2e459bb55435d4b70842c5)
|
||||||
|
---
|
||||||
|
modules.d/40network/ifup.sh | 6 +++++-
|
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||||
|
index 7da9171..69a4567 100755
|
||||||
|
--- a/modules.d/40network/ifup.sh
|
||||||
|
+++ b/modules.d/40network/ifup.sh
|
||||||
|
@@ -150,7 +150,11 @@ do_ipv6auto() {
|
||||||
|
do_static() {
|
||||||
|
strglobin $ip '*:*:*' && load_ipv6
|
||||||
|
|
||||||
|
- linkup $netif
|
||||||
|
+ if ! linkup $netif; then
|
||||||
|
+ warn "Could bring interface $netif up!"
|
||||||
|
+ return 1
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
[ -n "$macaddr" ] && ip link set address $macaddr dev $netif
|
||||||
|
[ -n "$mtu" ] && ip link set mtu $mtu dev $netif
|
||||||
|
if strglobin $ip '*:*:*'; then
|
@ -0,0 +1,31 @@
|
|||||||
|
From 27a5aecf56fbfa9a8d92d86d7e68c2781c0b4523 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 19 Aug 2015 14:00:28 +0200
|
||||||
|
Subject: [PATCH] network/ifup.sh:do_static(): error out, if IP is already
|
||||||
|
assigned
|
||||||
|
|
||||||
|
(cherry picked from commit 32770ca79a1f6828ca9fdf4b6841e6a6d4e4754a)
|
||||||
|
---
|
||||||
|
modules.d/40network/ifup.sh | 9 +++++++++
|
||||||
|
1 file changed, 9 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||||
|
index 69a4567..381ff43 100755
|
||||||
|
--- a/modules.d/40network/ifup.sh
|
||||||
|
+++ b/modules.d/40network/ifup.sh
|
||||||
|
@@ -155,6 +155,15 @@ do_static() {
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
+ ip route get "$ip" | {
|
||||||
|
+ read a rest
|
||||||
|
+ if [ "$a" = "local" ]; then
|
||||||
|
+ warn "Not assigning $ip to interface $netif, cause it is already assigned!"
|
||||||
|
+ return 1
|
||||||
|
+ fi
|
||||||
|
+ return 0
|
||||||
|
+ } || return 1
|
||||||
|
+
|
||||||
|
[ -n "$macaddr" ] && ip link set address $macaddr dev $netif
|
||||||
|
[ -n "$mtu" ] && ip link set mtu $mtu dev $netif
|
||||||
|
if strglobin $ip '*:*:*'; then
|
@ -0,0 +1,29 @@
|
|||||||
|
From 782e909eef9c6e2ec5ebc8c2b0bb54761a0d92ad Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 25 Aug 2015 11:16:29 +0200
|
||||||
|
Subject: [PATCH] iscsi/parse-iscsiroot.sh: handle firmware in online queue
|
||||||
|
|
||||||
|
(cherry picked from commit 7f59cbd31817c81fa5aec9f86c33dfe1ce23ec6a)
|
||||||
|
---
|
||||||
|
modules.d/95iscsi/parse-iscsiroot.sh | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
index 35628cc..aa17f8e 100755
|
||||||
|
--- a/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
@@ -77,11 +77,11 @@ if [ -n "$iscsi_firmware" ] || getargbool 0 rd.iscsi.ibft -d "ip=ibft"; then
|
||||||
|
modprobe -b -q iscsi_ibft
|
||||||
|
# if no ip= is given, but firmware
|
||||||
|
echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh
|
||||||
|
- initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "$netroot" "$NEWROOT"
|
||||||
|
- initqueue --unique --onetime --settled /sbin/iscsiroot dummy "'$netroot'" "'$NEWROOT'"
|
||||||
|
+ initqueue --unique --online /sbin/iscsiroot online "iscsi:" "$NEWROOT"
|
||||||
|
+ initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "iscsi:" "$NEWROOT"
|
||||||
|
+ initqueue --unique --onetime --settled /sbin/iscsiroot online "iscsi:" "'$NEWROOT'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
-
|
||||||
|
[ -z "$netroot" ] || [ "${netroot%%:*}" = "iscsi" ] || return 1
|
||||||
|
|
||||||
|
initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "$netroot" "$NEWROOT"
|
@ -0,0 +1,35 @@
|
|||||||
|
From 3632be079bd7aa1cd456dc8aff2cc42d6a449a67 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 25 Aug 2015 11:16:46 +0200
|
||||||
|
Subject: [PATCH] iscsi/parse-iscsiroot.sh: restart iscsid with try-restart
|
||||||
|
|
||||||
|
(cherry picked from commit a6befb52eb5eeb87c0c41303fe08e50bd2fde0d3)
|
||||||
|
---
|
||||||
|
modules.d/95iscsi/parse-iscsiroot.sh | 7 ++-----
|
||||||
|
1 file changed, 2 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
index aa17f8e..dab58db 100755
|
||||||
|
--- a/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
@@ -99,7 +99,7 @@ if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; the
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
-if arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=) && [ -n "$arg" ]; then
|
||||||
|
+if arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=) && [ -n "$arg" ] && ! [ -f /run/initiatorname.iscsi ] ; then
|
||||||
|
iscsi_initiator=$arg
|
||||||
|
echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi
|
||||||
|
ln -fs /run/initiatorname.iscsi /dev/.initiatorname.iscsi
|
||||||
|
@@ -117,10 +117,7 @@ if [ -z $iscsi_initiator ] && [ -f /sys/firmware/ibft/initiator/initiator-name ]
|
||||||
|
mkdir -p /etc/iscsi
|
||||||
|
ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
||||||
|
> /tmp/iscsi_set_initiator
|
||||||
|
- if systemctl --quiet is-active iscsid.service; then
|
||||||
|
- systemctl restart iscsid
|
||||||
|
- sleep 1
|
||||||
|
- fi
|
||||||
|
+ systemctl try-restart iscsid && sleep 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
31
0130-network-ifup.sh-save-return-value-of-ifup.patch
Normal file
31
0130-network-ifup.sh-save-return-value-of-ifup.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 744c65939be7aa791d5538c6733e05d390c8cd3a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 25 Aug 2015 11:20:30 +0200
|
||||||
|
Subject: [PATCH] network/ifup.sh: save return value of ifup
|
||||||
|
|
||||||
|
(cherry picked from commit b4006781e8a59dc69a0dd3836fce137f08b23001)
|
||||||
|
---
|
||||||
|
modules.d/40network/ifup.sh | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||||
|
index 381ff43..647c856 100755
|
||||||
|
--- a/modules.d/40network/ifup.sh
|
||||||
|
+++ b/modules.d/40network/ifup.sh
|
||||||
|
@@ -373,6 +373,7 @@ for p in $(getargs ip=); do
|
||||||
|
do_static ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
+ ret=$?
|
||||||
|
|
||||||
|
> /tmp/net.${netif}.up
|
||||||
|
|
||||||
|
@@ -380,7 +381,7 @@ for p in $(getargs ip=); do
|
||||||
|
dhcp|on|any|dhcp6)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
- if [ $? -eq 0 ]; then
|
||||||
|
+ if [ $ret -eq 0 ]; then
|
||||||
|
setup_net $netif
|
||||||
|
source_hook initqueue/online $netif
|
||||||
|
if [ -z "$manualup" ]; then
|
51
0131-network-also-mark-interfaces-up-with-their-MAC.patch
Normal file
51
0131-network-also-mark-interfaces-up-with-their-MAC.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
From 26fbe97bbe3079d7dc63b19fb3a0728570da7628 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 25 Aug 2015 11:30:00 +0200
|
||||||
|
Subject: [PATCH] network: also mark interfaces up with their MAC
|
||||||
|
|
||||||
|
(cherry picked from commit 53537f4d23091457f644ab8b3edf09c2dca4351c)
|
||||||
|
---
|
||||||
|
modules.d/40network/dhclient-script.sh | 7 +++++++
|
||||||
|
modules.d/40network/ifup.sh | 4 ++++
|
||||||
|
2 files changed, 11 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh
|
||||||
|
index 4e2090d..f55611d 100755
|
||||||
|
--- a/modules.d/40network/dhclient-script.sh
|
||||||
|
+++ b/modules.d/40network/dhclient-script.sh
|
||||||
|
@@ -139,6 +139,10 @@ case $reason in
|
||||||
|
|
||||||
|
echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh
|
||||||
|
>/tmp/net.$netif.up
|
||||||
|
+ if [ -e /sys/class/net/${netif}/address ]; then
|
||||||
|
+ > /tmp/net.$(cat /sys/class/net/${netif}/address).up
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
;;
|
||||||
|
|
||||||
|
RENEW|REBIND)
|
||||||
|
@@ -171,6 +175,9 @@ case $reason in
|
||||||
|
|
||||||
|
echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh
|
||||||
|
>/tmp/net.$netif.up
|
||||||
|
+ if [ -e /sys/class/net/${netif}/address ]; then
|
||||||
|
+ > /tmp/net.$(cat /sys/class/net/${netif}/address).up
|
||||||
|
+ fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
RENEW6|REBIND6)
|
||||||
|
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||||
|
index 647c856..dd47e4b 100755
|
||||||
|
--- a/modules.d/40network/ifup.sh
|
||||||
|
+++ b/modules.d/40network/ifup.sh
|
||||||
|
@@ -377,6 +377,10 @@ for p in $(getargs ip=); do
|
||||||
|
|
||||||
|
> /tmp/net.${netif}.up
|
||||||
|
|
||||||
|
+ if [ -e /sys/class/net/${netif}/address ]; then
|
||||||
|
+ > /tmp/net.$(cat /sys/class/net/${netif}/address).up
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
case $autoconf in
|
||||||
|
dhcp|on|any|dhcp6)
|
||||||
|
;;
|
@ -0,0 +1,24 @@
|
|||||||
|
From 686f9675dfb30f492723b8629e05f284054f2acb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 25 Aug 2015 11:37:16 +0200
|
||||||
|
Subject: [PATCH] network/ifup.sh: only use dhcp on unknown interfaces for
|
||||||
|
ip=dhcp
|
||||||
|
|
||||||
|
(cherry picked from commit 7c24815034241e490422691b5f18671c4b9812a9)
|
||||||
|
---
|
||||||
|
modules.d/40network/ifup.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||||
|
index dd47e4b..b83d7e7 100755
|
||||||
|
--- a/modules.d/40network/ifup.sh
|
||||||
|
+++ b/modules.d/40network/ifup.sh
|
||||||
|
@@ -410,7 +410,7 @@ if [ ! -e /tmp/net.${netif}.up ]; then
|
||||||
|
if getargs 'ip=dhcp6'; then
|
||||||
|
load_ipv6
|
||||||
|
do_dhcp -6
|
||||||
|
- else
|
||||||
|
+ elif getargs 'ip=dhcp'; then
|
||||||
|
do_dhcp -4
|
||||||
|
fi
|
||||||
|
fi
|
22
0133-cms-cmsifup.sh-do-not-use-ifup-m.patch
Normal file
22
0133-cms-cmsifup.sh-do-not-use-ifup-m.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
From 195b5d0725b7caf016def2ecedb915c1422e043a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 1 Sep 2015 17:21:53 +0200
|
||||||
|
Subject: [PATCH] cms/cmsifup.sh: do not use ifup -m
|
||||||
|
|
||||||
|
we don't want to bring the interface up several times
|
||||||
|
|
||||||
|
(cherry picked from commit 0852c38b7a2b893e4f9e5894ba09eebc649f047f)
|
||||||
|
---
|
||||||
|
modules.d/80cms/cmsifup.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/80cms/cmsifup.sh b/modules.d/80cms/cmsifup.sh
|
||||||
|
index b1b9616..902df8d 100755
|
||||||
|
--- a/modules.d/80cms/cmsifup.sh
|
||||||
|
+++ b/modules.d/80cms/cmsifup.sh
|
||||||
|
@@ -35,4 +35,4 @@ fi
|
||||||
|
IFACES="$IFACES $DEVICE"
|
||||||
|
echo "$IFACES" >> /tmp/net.ifaces
|
||||||
|
|
||||||
|
-ifup $DEVICE -m
|
||||||
|
+exec ifup "$DEVICE"
|
@ -0,0 +1,23 @@
|
|||||||
|
From b519ae7008aa20828b30f021b25c38cfd459f27c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 1 Sep 2015 17:22:37 +0200
|
||||||
|
Subject: [PATCH] network/ifup: fix warning about not bringing interface up
|
||||||
|
|
||||||
|
(cherry picked from commit 70f3c07846e92d11484a1f7b5cb84aacc47489b4)
|
||||||
|
---
|
||||||
|
modules.d/40network/ifup.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||||
|
index b83d7e7..9246da7 100755
|
||||||
|
--- a/modules.d/40network/ifup.sh
|
||||||
|
+++ b/modules.d/40network/ifup.sh
|
||||||
|
@@ -151,7 +151,7 @@ do_static() {
|
||||||
|
strglobin $ip '*:*:*' && load_ipv6
|
||||||
|
|
||||||
|
if ! linkup $netif; then
|
||||||
|
- warn "Could bring interface $netif up!"
|
||||||
|
+ warn "Could not bring interface $netif up!"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
41
0135-network-net-lib.sh-fix-wait_for_if_up.patch
Normal file
41
0135-network-net-lib.sh-fix-wait_for_if_up.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From 42b4fc90f2248444da3a769a3706503503df8e80 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 1 Sep 2015 17:22:56 +0200
|
||||||
|
Subject: [PATCH] network/net-lib.sh: fix wait_for_if_up()
|
||||||
|
|
||||||
|
wait for <*UP*> and not "state UP"
|
||||||
|
|
||||||
|
state can be UNKNOWN
|
||||||
|
|
||||||
|
(cherry picked from commit d8572e0bf4d49a8d2ec71726d0fd38d1c73ca3f7)
|
||||||
|
---
|
||||||
|
modules.d/40network/net-lib.sh | 16 +++++++++++++++-
|
||||||
|
1 file changed, 15 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
||||||
|
index b61a1e8..43528e2 100755
|
||||||
|
--- a/modules.d/40network/net-lib.sh
|
||||||
|
+++ b/modules.d/40network/net-lib.sh
|
||||||
|
@@ -529,7 +529,21 @@ wait_for_if_up() {
|
||||||
|
|
||||||
|
while [ $cnt -lt $timeout ]; do
|
||||||
|
li=$(ip -o link show up dev $1)
|
||||||
|
- [ -n "$li" ] && [ -z "${li##*state UP*}" ] && return 0
|
||||||
|
+ if [ -n "$li" ]; then
|
||||||
|
+ case "$li" in
|
||||||
|
+ *\<UP*)
|
||||||
|
+ return 0;;
|
||||||
|
+ *\<*,UP\>*)
|
||||||
|
+ return 0;;
|
||||||
|
+ *\<*,UP,*\>*)
|
||||||
|
+ return 0;;
|
||||||
|
+ esac
|
||||||
|
+ fi
|
||||||
|
+ if strstr "$li" "LOWER_UP" \
|
||||||
|
+ && strstr "$li" "state UNKNOWN" \
|
||||||
|
+ && ! strstr "$li" "DORMANT"; then
|
||||||
|
+ return 0
|
||||||
|
+ fi
|
||||||
|
sleep 0.1
|
||||||
|
cnt=$(($cnt+1))
|
||||||
|
done
|
23
0136-network-net-lib.sh-fix-IPv6-route-parsing.patch
Normal file
23
0136-network-net-lib.sh-fix-IPv6-route-parsing.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
From 29b885b46e5d2a368af70031e5d52ca21b9cdd31 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 1 Sep 2015 17:25:34 +0200
|
||||||
|
Subject: [PATCH] network/net-lib.sh: fix IPv6 route parsing
|
||||||
|
|
||||||
|
(cherry picked from commit a4c47ce0ddc7f7b46c2395709cf83f731f90685b)
|
||||||
|
---
|
||||||
|
modules.d/40network/net-lib.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
||||||
|
index 43528e2..8096481 100755
|
||||||
|
--- a/modules.d/40network/net-lib.sh
|
||||||
|
+++ b/modules.d/40network/net-lib.sh
|
||||||
|
@@ -120,7 +120,7 @@ setup_net() {
|
||||||
|
route_to_var "$_p" || continue
|
||||||
|
[ -n "$route_dev" ] && [ "$route_dev" != "$netif" ] && continue
|
||||||
|
ip route add "$route_mask" ${route_gw:+via "$route_gw"} ${route_dev:+dev "$route_dev"}
|
||||||
|
- if strstr ":" "$route_mask"; then
|
||||||
|
+ if strstr "$route_mask" ":"; then
|
||||||
|
printf -- "%s\n" "$route_mask ${route_gw:+via $route_gw} ${route_dev:+dev $route_dev}" \
|
||||||
|
> /tmp/net.route6."$netif"
|
||||||
|
else
|
40
0137-network-ifup-do-DHCP-for-BOOTDEV.patch
Normal file
40
0137-network-ifup-do-DHCP-for-BOOTDEV.patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
From 6cfdb5aa1f7aba5715f6d670e3b8b4c93d0d64a0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 1 Sep 2015 19:05:37 +0200
|
||||||
|
Subject: [PATCH] network/ifup: do DHCP for BOOTDEV
|
||||||
|
|
||||||
|
(cherry picked from commit 7316d68353cfd6e08f007d10ea3e32fa4d083487)
|
||||||
|
---
|
||||||
|
modules.d/40network/ifup.sh | 19 ++++++++++++++-----
|
||||||
|
1 file changed, 14 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||||
|
index 9246da7..366744f 100755
|
||||||
|
--- a/modules.d/40network/ifup.sh
|
||||||
|
+++ b/modules.d/40network/ifup.sh
|
||||||
|
@@ -407,11 +407,20 @@ fi
|
||||||
|
|
||||||
|
# no ip option directed at our interface?
|
||||||
|
if [ ! -e /tmp/net.${netif}.up ]; then
|
||||||
|
- if getargs 'ip=dhcp6'; then
|
||||||
|
- load_ipv6
|
||||||
|
- do_dhcp -6
|
||||||
|
- elif getargs 'ip=dhcp'; then
|
||||||
|
- do_dhcp -4
|
||||||
|
+ if [ -e /tmp/net.bootdev ]; then
|
||||||
|
+ BOOTDEV=$(cat /tmp/net.bootdev)
|
||||||
|
+ if [ "$netif" = "$BOOTDEV" ] || [ "$BOOTDEV" = "$(cat /sys/class/net/${netif}/address)" ]; then
|
||||||
|
+ load_ipv6
|
||||||
|
+ do_dhcp
|
||||||
|
+ fi
|
||||||
|
+ else
|
||||||
|
+ if getargs 'ip=dhcp6'; then
|
||||||
|
+ load_ipv6
|
||||||
|
+ do_dhcp -6
|
||||||
|
+ fi
|
||||||
|
+ if getargs 'ip=dhcp'; then
|
||||||
|
+ do_dhcp -4
|
||||||
|
+ fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
25
0138-livenet-livenetroot.sh-fixed-error-condition.patch
Normal file
25
0138-livenet-livenetroot.sh-fixed-error-condition.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 7d47178e0ddccbecfbf144348da24c1a3be32da2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Wed, 2 Sep 2015 09:47:35 +0200
|
||||||
|
Subject: [PATCH] livenet/livenetroot.sh: fixed error condition
|
||||||
|
|
||||||
|
copy&paste error
|
||||||
|
|
||||||
|
(cherry picked from commit b813b1b3064d4951c5403bb0f96480de9a355d8e)
|
||||||
|
---
|
||||||
|
modules.d/90livenet/livenetroot.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/90livenet/livenetroot.sh b/modules.d/90livenet/livenetroot.sh
|
||||||
|
index 2e36ee9..b7592bc 100755
|
||||||
|
--- a/modules.d/90livenet/livenetroot.sh
|
||||||
|
+++ b/modules.d/90livenet/livenetroot.sh
|
||||||
|
@@ -15,7 +15,7 @@ liveurl="${netroot#livenet:}"
|
||||||
|
info "fetching $liveurl"
|
||||||
|
imgfile=$(fetch_url "$liveurl")
|
||||||
|
|
||||||
|
-if [ $? = 0 ]; then
|
||||||
|
+if [ $? != 0 ]; then
|
||||||
|
warn "failed to download live image: error $?"
|
||||||
|
exit 1
|
||||||
|
fi
|
@ -0,0 +1,36 @@
|
|||||||
|
From e803d076f8689a92ae42de4f5675c51e8a9c492d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Thu, 3 Sep 2015 12:41:06 +0200
|
||||||
|
Subject: [PATCH] iscsi/parse-iscsiroot.sh: only set initiator-name, if not
|
||||||
|
empty
|
||||||
|
|
||||||
|
(cherry picked from commit eb87dc91d078ee942ef9c8bbc8e82f4ee4ccf0c6)
|
||||||
|
---
|
||||||
|
modules.d/95iscsi/parse-iscsiroot.sh | 14 ++++++++------
|
||||||
|
1 file changed, 8 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
index dab58db..81be6a9 100755
|
||||||
|
--- a/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
@@ -112,12 +112,14 @@ fi
|
||||||
|
# If not given on the cmdline and initiator-name available via iBFT
|
||||||
|
if [ -z $iscsi_initiator ] && [ -f /sys/firmware/ibft/initiator/initiator-name ] && ! [ -f /tmp/iscsi_set_initiator ]; then
|
||||||
|
iscsi_initiator=$(while read line || [ -n "$line" ]; do echo $line;done < /sys/firmware/ibft/initiator/initiator-name)
|
||||||
|
- echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi
|
||||||
|
- rm -f /etc/iscsi/initiatorname.iscsi
|
||||||
|
- mkdir -p /etc/iscsi
|
||||||
|
- ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
||||||
|
- > /tmp/iscsi_set_initiator
|
||||||
|
- systemctl try-restart iscsid && sleep 1
|
||||||
|
+ if [ -n "$iscsi_initiator" ]; then
|
||||||
|
+ echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi
|
||||||
|
+ rm -f /etc/iscsi/initiatorname.iscsi
|
||||||
|
+ mkdir -p /etc/iscsi
|
||||||
|
+ ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
||||||
|
+ > /tmp/iscsi_set_initiator
|
||||||
|
+ systemctl try-restart iscsid && sleep 1
|
||||||
|
+ fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
49
0140-network-move-ip-ibft-handling-to-network-module.patch
Normal file
49
0140-network-move-ip-ibft-handling-to-network-module.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From 73833796b4592b06777fa1991163b74e9bb1e477 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Thu, 3 Sep 2015 12:41:44 +0200
|
||||||
|
Subject: [PATCH] network: move "ip=ibft" handling to network module
|
||||||
|
|
||||||
|
(cherry picked from commit b334c83e4abdc1dd87276fa7de4617cd349a5a4f)
|
||||||
|
---
|
||||||
|
modules.d/40network/parse-ibft.sh | 2 ++
|
||||||
|
modules.d/90kernel-network-modules/module-setup.sh | 1 +
|
||||||
|
modules.d/95iscsi/parse-iscsiroot.sh | 2 +-
|
||||||
|
3 files changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/parse-ibft.sh b/modules.d/40network/parse-ibft.sh
|
||||||
|
index 144e205..8895b04 100755
|
||||||
|
--- a/modules.d/40network/parse-ibft.sh
|
||||||
|
+++ b/modules.d/40network/parse-ibft.sh
|
||||||
|
@@ -4,5 +4,7 @@ command -v getarg >/dev/null || . /lib/dracut-lib.sh
|
||||||
|
command -v ibft_to_cmdline >/dev/null || . /lib/net-lib.sh
|
||||||
|
|
||||||
|
if getargbool 0 rd.iscsi.ibft -d "ip=ibft"; then
|
||||||
|
+ modprobe -b -q iscsi_boot_sysfs 2>/dev/null
|
||||||
|
+ modprobe -b -q iscsi_ibft
|
||||||
|
ibft_to_cmdline
|
||||||
|
fi
|
||||||
|
diff --git a/modules.d/90kernel-network-modules/module-setup.sh b/modules.d/90kernel-network-modules/module-setup.sh
|
||||||
|
index b956ebe..18d7d96 100755
|
||||||
|
--- a/modules.d/90kernel-network-modules/module-setup.sh
|
||||||
|
+++ b/modules.d/90kernel-network-modules/module-setup.sh
|
||||||
|
@@ -62,6 +62,7 @@ installkernel() {
|
||||||
|
=drivers/net/team \
|
||||||
|
=drivers/net/ethernet \
|
||||||
|
ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net
|
||||||
|
+ hostonly="" instmods iscsi_ibft crc32c iscsi_boot_sysfs
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
index 81be6a9..63a822f 100755
|
||||||
|
--- a/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||||
|
@@ -69,7 +69,7 @@ if [ -n "$iscsiroot" ] ; then
|
||||||
|
fi
|
||||||
|
|
||||||
|
# iscsi_firmware does not need argument checking
|
||||||
|
-if [ -n "$iscsi_firmware" ] || getargbool 0 rd.iscsi.ibft -d "ip=ibft"; then
|
||||||
|
+if [ -n "$iscsi_firmware" ]; then
|
||||||
|
if [ "$root" != "dhcp" ] && [ "$netroot" != "dhcp" ]; then
|
||||||
|
[ -z "$netroot" ] && netroot=iscsi:
|
||||||
|
fi
|
37
0141-network-dhclient-script.sh-fix-RENEW.patch
Normal file
37
0141-network-dhclient-script.sh-fix-RENEW.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
From e847a78bb6fb65ca9ea7e7987f378639e6d395b8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 8 Sep 2015 11:44:13 +0200
|
||||||
|
Subject: [PATCH] network/dhclient-script.sh: fix RENEW
|
||||||
|
|
||||||
|
Remove check, if interface is already up. It is for RENEW.
|
||||||
|
|
||||||
|
new_prefix is apparently new_subnet_mask
|
||||||
|
|
||||||
|
(cherry picked from commit 52845b168d0909d72b4c2f0b6511ed18877a31e8)
|
||||||
|
---
|
||||||
|
modules.d/40network/dhclient-script.sh | 5 +----
|
||||||
|
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh
|
||||||
|
index f55611d..9aac2b1 100755
|
||||||
|
--- a/modules.d/40network/dhclient-script.sh
|
||||||
|
+++ b/modules.d/40network/dhclient-script.sh
|
||||||
|
@@ -8,9 +8,6 @@ type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
|
||||||
|
# We already need a set netif here
|
||||||
|
netif=$interface
|
||||||
|
|
||||||
|
-# Huh? Interface configured?
|
||||||
|
-[ -f "/tmp/net.$netif.up" ] && exit 0
|
||||||
|
-
|
||||||
|
setup_interface() {
|
||||||
|
ip=$new_ip_address
|
||||||
|
mtu=$new_interface_mtu
|
||||||
|
@@ -151,7 +148,7 @@ case $reason in
|
||||||
|
[ -n "$new_max_life" ] && lease_time=$new_max_life
|
||||||
|
preferred_lft=$lease_time
|
||||||
|
[ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life
|
||||||
|
- ip -4 addr change ${new_ip_address}/${new_prefix} broadcast ${new_broadcast_address} dev ${interface} \
|
||||||
|
+ ip -4 addr change ${new_ip_address}/${new_subnet_mask} broadcast ${new_broadcast_address} dev ${interface} \
|
||||||
|
${lease_time:+valid_lft $lease_time} ${preferred_lft:+preferred_lft ${preferred_lft}} \
|
||||||
|
>/dev/null 2>&1
|
||||||
|
;;
|
34
0142-network-add-all_ifaces_setup.patch
Normal file
34
0142-network-add-all_ifaces_setup.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From 5d90ba4fca3b5e3ca544ff76e6e7286eef16c438 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Thu, 10 Sep 2015 13:20:18 +0200
|
||||||
|
Subject: [PATCH] network: add all_ifaces_setup()
|
||||||
|
|
||||||
|
all_ifaces_up() is true, if all interfaces are up.
|
||||||
|
|
||||||
|
all_ifaces_setup() is true, if all interfaces are up and the gateways
|
||||||
|
and nameserver are setup.
|
||||||
|
|
||||||
|
(cherry picked from commit 63e75dc4cdb14e392e38a8973126c9a29b266411)
|
||||||
|
---
|
||||||
|
modules.d/40network/net-lib.sh | 8 ++++++++
|
||||||
|
1 file changed, 8 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
||||||
|
index 8096481..706a9a5 100755
|
||||||
|
--- a/modules.d/40network/net-lib.sh
|
||||||
|
+++ b/modules.d/40network/net-lib.sh
|
||||||
|
@@ -73,6 +73,14 @@ all_ifaces_up() {
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
+all_ifaces_setup() {
|
||||||
|
+ local iface="" IFACES=""
|
||||||
|
+ [ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces
|
||||||
|
+ for iface in $IFACES; do
|
||||||
|
+ [ -e /tmp/net.$iface.did-setup ] || return 1
|
||||||
|
+ done
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
get_netroot_ip() {
|
||||||
|
local prefix="" server="" rest=""
|
||||||
|
splitsep "$1" ":" prefix server rest
|
38
0143-iscsi-iscsiroot.sh-use-all_ifaces_setup.patch
Normal file
38
0143-iscsi-iscsiroot.sh-use-all_ifaces_setup.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
From df087c45d820f22e9bf772fa0009d68e647c0af7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Thu, 10 Sep 2015 13:21:53 +0200
|
||||||
|
Subject: [PATCH] iscsi/iscsiroot.sh: use all_ifaces_setup()
|
||||||
|
|
||||||
|
we want the route and gateway setup
|
||||||
|
|
||||||
|
(cherry picked from commit 7cddfbbadbc40a4b6d331be25a3c38ad3a52239b)
|
||||||
|
---
|
||||||
|
modules.d/95iscsi/iscsiroot.sh | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
index e730cb0..b14a71b 100755
|
||||||
|
--- a/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
+++ b/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
@@ -106,7 +106,7 @@ handle_netroot()
|
||||||
|
parse_iscsi_root "$1" || return 1
|
||||||
|
|
||||||
|
# Bail out early, if there is no route to the destination
|
||||||
|
- if is_ip "$iscsi_target_ip" && [ "$netif" != "timeout" ] && ! all_ifaces_up && getargbool 1 rd.iscsi.testroute; then
|
||||||
|
+ if is_ip "$iscsi_target_ip" && [ "$netif" != "timeout" ] && ! all_ifaces_setup && getargbool 1 rd.iscsi.testroute; then
|
||||||
|
ip route get "$iscsi_target_ip" >/dev/null 2>&1 || return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
@@ -225,10 +225,10 @@ handle_netroot()
|
||||||
|
ret=0
|
||||||
|
|
||||||
|
if [ "$netif" != "timeout" ] && getargbool 1 rd.iscsi.waitnet; then
|
||||||
|
- all_ifaces_up || exit 0
|
||||||
|
+ all_ifaces_setup || exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
-if [ "$netif" = "timeout" ] && all_ifaces_up; then
|
||||||
|
+if [ "$netif" = "timeout" ] && all_ifaces_setup; then
|
||||||
|
# s.th. went wrong and the timeout script hits
|
||||||
|
# restart
|
||||||
|
systemctl restart iscsid
|
@ -0,0 +1,61 @@
|
|||||||
|
From 19b0065cac88259026d43e48454544f7628c2963 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Thu, 10 Sep 2015 13:23:32 +0200
|
||||||
|
Subject: [PATCH] network/netroot.sh: better handling of $netroot and dhcp
|
||||||
|
|
||||||
|
if $netroot is emtpy, get it from cmdline
|
||||||
|
|
||||||
|
check cmdline directly for root=dhcp(6) and netroot=dhcp(6)
|
||||||
|
|
||||||
|
(cherry picked from commit 17cee31b115a146bca5519b6ac4b422080d764c7)
|
||||||
|
---
|
||||||
|
modules.d/40network/netroot.sh | 17 +++++++++++------
|
||||||
|
1 file changed, 11 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/40network/netroot.sh b/modules.d/40network/netroot.sh
|
||||||
|
index 0fccaf1..c80a59f 100755
|
||||||
|
--- a/modules.d/40network/netroot.sh
|
||||||
|
+++ b/modules.d/40network/netroot.sh
|
||||||
|
@@ -12,6 +12,11 @@ command -v setup_net >/dev/null || . /lib/net-lib.sh
|
||||||
|
# no sense in doing something if no (net)root info is available
|
||||||
|
# or root is already there
|
||||||
|
[ -d $NEWROOT/proc ] && exit 0
|
||||||
|
+
|
||||||
|
+if [ -z "$netroot" ]; then
|
||||||
|
+ netroot=$(getarg netroot=)
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
[ -z "$netroot" ] && exit 1
|
||||||
|
|
||||||
|
# Set or override primary interface
|
||||||
|
@@ -33,7 +38,7 @@ esac
|
||||||
|
# Figure out the handler for root=dhcp by recalling all netroot cmdline
|
||||||
|
# handlers when this is not called from manually network bringing up.
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
- if [ "$netroot" = "dhcp" ] || [ "$netroot" = "dhcp6" ] ; then
|
||||||
|
+ if getarg "root=dhcp" || getarg "netroot=dhcp" || getarg "root=dhcp6" || getarg "netroot=dhcp6"; then
|
||||||
|
# Load dhcp options
|
||||||
|
[ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
|
||||||
|
|
||||||
|
@@ -45,6 +50,8 @@ if [ -z "$2" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
+ rm -f -- $hookdir/initqueue/finished/dhcp.sh
|
||||||
|
+
|
||||||
|
# Set netroot to new_root_path, so cmdline parsers don't call
|
||||||
|
netroot=$new_root_path
|
||||||
|
|
||||||
|
@@ -74,9 +81,7 @@ source_hook netroot $netif
|
||||||
|
|
||||||
|
# Run the handler; don't store the root, it may change from device to device
|
||||||
|
# XXX other variables to export?
|
||||||
|
-if $handler $netif $netroot $NEWROOT; then
|
||||||
|
- rm -f -- $hookdir/initqueue/finished/dhcp.sh
|
||||||
|
- # Network rootfs mount successful - save interface info for ifcfg etc.
|
||||||
|
- save_netinfo $netif
|
||||||
|
-fi
|
||||||
|
+[ -n "$handler" ] && "$handler" "$netif" "$netroot" "$NEWROOT"
|
||||||
|
+save_netinfo $netif
|
||||||
|
+
|
||||||
|
exit 0
|
@ -0,0 +1,83 @@
|
|||||||
|
From b5363e834a5fe49d5651c12e70f664b96c841cae Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Thu, 10 Sep 2015 13:25:13 +0200
|
||||||
|
Subject: [PATCH] iscsi/iscsiroot.sh: handle iscsi_firmware in online and
|
||||||
|
timeout queue
|
||||||
|
|
||||||
|
The return code of iscsi_firmware is broken, so set the marker
|
||||||
|
unconditionally.
|
||||||
|
|
||||||
|
(cherry picked from commit fd3eddf06990a617a2f90b0a699947ab3faf2cc2)
|
||||||
|
---
|
||||||
|
modules.d/95iscsi/iscsiroot.sh | 43 +++++++++++++++++++-----------------------
|
||||||
|
1 file changed, 19 insertions(+), 24 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
index b14a71b..5752cce 100755
|
||||||
|
--- a/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
+++ b/modules.d/95iscsi/iscsiroot.sh
|
||||||
|
@@ -43,29 +43,23 @@ fi
|
||||||
|
|
||||||
|
handle_firmware()
|
||||||
|
{
|
||||||
|
- if ! [ -e /tmp/iscsistarted-firmware ]; then
|
||||||
|
- if ! iscsistart -f; then
|
||||||
|
- warn "iscistart: Could not get list of targets from firmware."
|
||||||
|
- return 1
|
||||||
|
- fi
|
||||||
|
+ if ! iscsistart -f; then
|
||||||
|
+ warn "iscistart: Could not get list of targets from firmware."
|
||||||
|
+ return 1
|
||||||
|
+ fi
|
||||||
|
|
||||||
|
- for p in $(getargs rd.iscsi.param -d iscsi_param); do
|
||||||
|
- iscsi_param="$iscsi_param --param $p"
|
||||||
|
- done
|
||||||
|
+ for p in $(getargs rd.iscsi.param -d iscsi_param); do
|
||||||
|
+ iscsi_param="$iscsi_param --param $p"
|
||||||
|
+ done
|
||||||
|
|
||||||
|
- if ! iscsistart -b $iscsi_param; then
|
||||||
|
- warn "'iscsistart -b $iscsi_param' failed"
|
||||||
|
- fi
|
||||||
|
+ if ! iscsistart -b $iscsi_param; then
|
||||||
|
+ warn "'iscsistart -b $iscsi_param' failed with return code $?"
|
||||||
|
+ fi
|
||||||
|
|
||||||
|
- if [ -d /sys/class/iscsi_session ]; then
|
||||||
|
- echo 'started' > "/tmp/iscsistarted-iscsi:"
|
||||||
|
- echo 'started' > "/tmp/iscsistarted-firmware"
|
||||||
|
- else
|
||||||
|
- return 1
|
||||||
|
- fi
|
||||||
|
+ echo 'started' > "/tmp/iscsistarted-iscsi:"
|
||||||
|
+ echo 'started' > "/tmp/iscsistarted-firmware"
|
||||||
|
|
||||||
|
- need_shutdown
|
||||||
|
- fi
|
||||||
|
+ need_shutdown
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -236,15 +230,16 @@ if [ "$netif" = "timeout" ] && all_ifaces_setup; then
|
||||||
|
sleep 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
-if [ "$netif" = "online" ]; then
|
||||||
|
- if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
|
||||||
|
+if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
|
||||||
|
+ if [ "$netif" = "timeout" ] || [ "$netif" = "online" ]; then
|
||||||
|
handle_firmware
|
||||||
|
ret=$?
|
||||||
|
fi
|
||||||
|
-else
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+if ! [ "$netif" = "online" ]; then
|
||||||
|
# loop over all netroot parameter
|
||||||
|
- nroot=$(getarg netroot)
|
||||||
|
- if [ $? -eq 0 ] && [ "$nroot" != "dhcp" ]; then
|
||||||
|
+ if nroot=$(getarg netroot) && [ "$nroot" != "dhcp" ]; then
|
||||||
|
for nroot in $(getargs netroot); do
|
||||||
|
[ "${nroot%%:*}" = "iscsi" ] || continue
|
||||||
|
nroot="${nroot##iscsi:}"
|
@ -0,0 +1,45 @@
|
|||||||
|
From b73e00aff7baf6b48e9b7af6ea1defee724b13a9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 15 Sep 2015 16:04:09 +0200
|
||||||
|
Subject: [PATCH] dracut.sh: add command line option for install_i18_all
|
||||||
|
|
||||||
|
--no-hostonly-i18n -> install_i18n_all=yes
|
||||||
|
--hostonly-i18n -> install_i18n_all=no
|
||||||
|
|
||||||
|
(cherry picked from commit 34b551a1c4d4513189807ee2a639c9214d887ddb)
|
||||||
|
---
|
||||||
|
dracut.sh | 7 +++++++
|
||||||
|
1 file changed, 7 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/dracut.sh b/dracut.sh
|
||||||
|
index 1169037..9128cb0 100755
|
||||||
|
--- a/dracut.sh
|
||||||
|
+++ b/dracut.sh
|
||||||
|
@@ -362,6 +362,8 @@ rearrange_params()
|
||||||
|
--long uefi \
|
||||||
|
--long uefi-stub: \
|
||||||
|
--long kernel-image: \
|
||||||
|
+ --long no-hostonly-i18n \
|
||||||
|
+ --long hostonly-i18n \
|
||||||
|
-- "$@")
|
||||||
|
|
||||||
|
if (( $? != 0 )); then
|
||||||
|
@@ -523,6 +525,10 @@ while :; do
|
||||||
|
hostonly_l="no" ;;
|
||||||
|
--hostonly-cmdline)
|
||||||
|
hostonly_cmdline_l="yes" ;;
|
||||||
|
+ --hostonly-i18n)
|
||||||
|
+ i18n_install_all_l="no" ;;
|
||||||
|
+ --no-hostonly-i18n)
|
||||||
|
+ i18n_install_all_l="yes" ;;
|
||||||
|
--no-hostonly-cmdline)
|
||||||
|
hostonly_cmdline_l="no" ;;
|
||||||
|
--persistent-policy)
|
||||||
|
@@ -716,6 +722,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
|
||||||
|
[[ $hostonly_l ]] && hostonly=$hostonly_l
|
||||||
|
[[ $hostonly_cmdline_l ]] && hostonly_cmdline=$hostonly_cmdline_l
|
||||||
|
[[ "$hostonly" == "yes" ]] && ! [[ $hostonly_cmdline ]] && hostonly_cmdline="yes"
|
||||||
|
+[[ $i18n_install_all_l ]] && i18n_install_all=$i18n_install_all_l
|
||||||
|
[[ $persistent_policy_l ]] && persistent_policy=$persistent_policy_l
|
||||||
|
[[ $use_fstab_l ]] && use_fstab=$use_fstab_l
|
||||||
|
[[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l
|
@ -0,0 +1,26 @@
|
|||||||
|
From 583fb23199d4c1293d38c72e0c29e74079441e46 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Tue, 15 Sep 2015 16:08:25 +0200
|
||||||
|
Subject: [PATCH] dracut.sh: do not create microcode, if no firmware is
|
||||||
|
available
|
||||||
|
|
||||||
|
(cherry picked from commit 13b5c1d09e0e242f1817057501292fe9d7e9ad92)
|
||||||
|
---
|
||||||
|
dracut.sh | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/dracut.sh b/dracut.sh
|
||||||
|
index 9128cb0..fe735bd 100755
|
||||||
|
--- a/dracut.sh
|
||||||
|
+++ b/dracut.sh
|
||||||
|
@@ -1617,6 +1617,10 @@ if [[ $early_microcode = yes ]]; then
|
||||||
|
break;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
+ for i in $_fwdir/$_fw/$_src; do
|
||||||
|
+ [ -e $i ] && break
|
||||||
|
+ break 2
|
||||||
|
+ done
|
||||||
|
cat $_fwdir/$_fw/$_src > $_dest_dir/${ucode_dest[$idx]}
|
||||||
|
create_early_cpio="yes"
|
||||||
|
fi
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user