* [PATCH 0/4] dracut: fix various issues with newly degraded md arrays
@ 2015-03-26 4:41 NeilBrown
[not found] ` <20150326043938.10121.34223.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: NeilBrown @ 2015-03-26 4:41 UTC (permalink / raw)
To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
When an md array is newly degraded at boot it will not be assembled
until mdraid_start.sh is run.
There are a few problem with the timeout handling that causes this
not to work properly in all circumstances.
These patches fix the bug I had reported.
Thanks,
NeilBrown
---
NeilBrown (4):
mdraid/mdraid_start.sh: tell mainloop if we make progress.
systemd/dracut-iniqueue - continue waiting if any timeout script makes progress
dracut-systemd/rootfs-generator.sh: always create generated files.
crypt/parse-crypt.sh: hide encrypted devices from systemd timeout warnings.
modules.d/90crypt/parse-crypt.sh | 4 ++
modules.d/90mdraid/mdraid_start.sh | 1
modules.d/98dracut-systemd/dracut-initqueue.sh | 1
modules.d/98dracut-systemd/rootfs-generator.sh | 15 ++++---
modules.d/99base/dracut-lib.sh | 53 +++++++++++++++---------
5 files changed, 48 insertions(+), 26 deletions(-)
--
Signature
^ permalink raw reply [flat|nested] 14+ messages in thread[parent not found: <20150326043938.10121.34223.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>]
* [PATCH 1/4] mdraid/mdraid_start.sh: tell mainloop if we make progress. [not found] ` <20150326043938.10121.34223.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org> @ 2015-03-26 4:41 ` NeilBrown 2015-03-26 4:41 ` [PATCH 2/4] systemd/dracut-iniqueue - continue waiting if any timeout script makes progress NeilBrown ` (2 subsequent siblings) 3 siblings, 0 replies; 14+ messages in thread From: NeilBrown @ 2015-03-26 4:41 UTC (permalink / raw) To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA mdraid_start is a number of scripts which run after a timeout. If it makes progress, it should tell the main loop so that it knows that it is worth waiting a bit longer. So in that case, create the initqueue/work file which the main loop checks for. Signed-off-by: NeilBrown <neilb-l3A5Bk7waGM@public.gmane.org> --- modules.d/90mdraid/mdraid_start.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/modules.d/90mdraid/mdraid_start.sh b/modules.d/90mdraid/mdraid_start.sh index 761e64f312d3..400ab5dc46c7 100755 --- a/modules.d/90mdraid/mdraid_start.sh +++ b/modules.d/90mdraid/mdraid_start.sh @@ -27,6 +27,7 @@ _md_force_run() { _path_d="${_path_s%/*}/degraded" [ ! -r "$_path_d" ] && continue + > $hookdir/initqueue/work done } ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/4] systemd/dracut-iniqueue - continue waiting if any timeout script makes progress [not found] ` <20150326043938.10121.34223.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org> 2015-03-26 4:41 ` [PATCH 1/4] mdraid/mdraid_start.sh: tell mainloop if we make progress NeilBrown @ 2015-03-26 4:41 ` NeilBrown 2015-03-26 4:41 ` [PATCH 3/4] dracut-systemd/rootfs-generator.sh: always create generated files NeilBrown 2015-03-26 4:41 ` [PATCH 4/4] crypt/parse-crypt.sh: hide encrypted devices from systemd timeout warnings NeilBrown 3 siblings, 0 replies; 14+ messages in thread From: NeilBrown @ 2015-03-26 4:41 UTC (permalink / raw) To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA A number of timeout scripts can be registered. If any one of them makes progress - e.g. assembles a degraded md array - then the main loop should wait a bit longer rather than pressing forward. This is particularly important is resume-from-hibernate requires a degraded md array. Both the script to forcibly assemble the md array and the script to abort hibernation if the device doesn't appear are 'timeout' scripts. There needs to be a reasonable delay between these running. So: if any script has indicated that progress was made, break of out the loop and go back to normal waiting. Signed-off-by: NeilBrown <neilb-l3A5Bk7waGM@public.gmane.org> --- 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 88cd1e056ed7..af9cec2c5b8c 100755 --- a/modules.d/98dracut-systemd/dracut-initqueue.sh +++ b/modules.d/98dracut-systemd/dracut-initqueue.sh @@ -60,6 +60,7 @@ while :; do job=$job . $job udevadm settle --timeout=0 >/dev/null 2>&1 || main_loop=0 [ -f $hookdir/initqueue/work ] && main_loop=0 + [ $main_loop -eq 0 ] && break done fi ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/4] dracut-systemd/rootfs-generator.sh: always create generated files. [not found] ` <20150326043938.10121.34223.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org> 2015-03-26 4:41 ` [PATCH 1/4] mdraid/mdraid_start.sh: tell mainloop if we make progress NeilBrown 2015-03-26 4:41 ` [PATCH 2/4] systemd/dracut-iniqueue - continue waiting if any timeout script makes progress NeilBrown @ 2015-03-26 4:41 ` NeilBrown 2015-03-26 4:41 ` [PATCH 4/4] crypt/parse-crypt.sh: hide encrypted devices from systemd timeout warnings NeilBrown 3 siblings, 0 replies; 14+ messages in thread From: NeilBrown @ 2015-03-26 4:41 UTC (permalink / raw) To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA When 'systemctl daemon-reload' is run, systemd will clean out /run/systemd/generator and re-run all the generators. So it is important that the generators always create the required files. rootfs-generator.sh currently does *not* create the desired files if $hookdir/initqueue/finished/devexists-${_name}.sh exists. This is not removed by "systectl daemon-reload" so the first time this generator is run it will do the right thing. Subsequent times it won't. This results in incorrect timeouts after "daemon-reload" is run. So let the existence of each file only guard the creation that file. Signed-off-by: NeilBrown <neilb-l3A5Bk7waGM@public.gmane.org> --- modules.d/98dracut-systemd/rootfs-generator.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modules.d/98dracut-systemd/rootfs-generator.sh b/modules.d/98dracut-systemd/rootfs-generator.sh index f3c7d1f237df..97512c07ab06 100755 --- a/modules.d/98dracut-systemd/rootfs-generator.sh +++ b/modules.d/98dracut-systemd/rootfs-generator.sh @@ -11,14 +11,15 @@ generator_wait_for_dev() _timeout=$(getarg rd.timeout) _timeout=${_timeout:-0} - [ -e "$hookdir/initqueue/finished/devexists-${_name}.sh" ] && return 0 + if ! [ -e "$hookdir/initqueue/finished/devexists-${_name}.sh" ]; then - printf '[ -e "%s" ]\n' $1 \ - >> "$hookdir/initqueue/finished/devexists-${_name}.sh" - { - printf '[ -e "%s" ] || ' $1 - printf 'warn "\"%s\" does not exist"\n' $1 - } >> "$hookdir/emergency/80-${_name}.sh" + printf '[ -e "%s" ]\n' $1 \ + >> "$hookdir/initqueue/finished/devexists-${_name}.sh" + { + printf '[ -e "%s" ] || ' $1 + printf 'warn "\"%s\" does not exist"\n' $1 + } >> "$hookdir/emergency/80-${_name}.sh" + fi _name=$(dev_unit_name "$1") if ! [ -L /run/systemd/generator/initrd.target.wants/${_name}.device ]; then ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/4] crypt/parse-crypt.sh: hide encrypted devices from systemd timeout warnings. [not found] ` <20150326043938.10121.34223.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org> ` (2 preceding siblings ...) 2015-03-26 4:41 ` [PATCH 3/4] dracut-systemd/rootfs-generator.sh: always create generated files NeilBrown @ 2015-03-26 4:41 ` NeilBrown [not found] ` <20150326044148.10121.15286.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org> 3 siblings, 1 reply; 14+ messages in thread From: NeilBrown @ 2015-03-26 4:41 UTC (permalink / raw) To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA When systemd's crypttab generator parsed crypttab, it tells systemd about several devices which may not appear until later in the boot sequence, and which are not needed while dract is running. This can particularly happen when an md array is encrypted, and the array is newly degraded so that it doesn't appear until dracut runs mdraid_start.sh. This can result in systemd printing warning messages which are inappropriate. So tell systemd that the timeout for each of these is zero. This is involves splitting some functionality out of wait_for_dev() That function does two things: - creates 'finished' hooks so that dracut will wait for the device, and - sets the systemd timeout for the device to zero, so systemd doesn't wait. We only want the second of these for most encrypted devices. So split that out into a new function set_systemd_timeout_for_dev(), and call it from parse-crypt.sh Signed-off-by: NeilBrown <neilb-l3A5Bk7waGM@public.gmane.org> --- modules.d/90crypt/parse-crypt.sh | 4 +++ modules.d/99base/dracut-lib.sh | 53 ++++++++++++++++++++++++-------------- 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/modules.d/90crypt/parse-crypt.sh b/modules.d/90crypt/parse-crypt.sh index 94ad1f63ae6f..5a64652cc51c 100755 --- a/modules.d/90crypt/parse-crypt.sh +++ b/modules.d/90crypt/parse-crypt.sh @@ -14,6 +14,10 @@ else LUKS=$(getargs rd.luks.uuid -d rd_LUKS_UUID) tout=$(getarg rd.luks.key.tout) + while read _dev _uuid ; do + set_systemd_timeout_for_dev $_dev + done + if [ -n "$LUKS" ]; then for luksid in $LUKS; do diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index 259e2057b67e..c8ff3c1a32d1 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -895,12 +895,10 @@ dev_unit_name() printf -- "%s" "$dev" } -# wait_for_dev <dev> -# -# Installs a initqueue-finished script, -# which will cause the main loop only to exit, -# if the device <dev> is recognized by the system. -wait_for_dev() +# set_systemd_timeout_for_dev <dev> +# Set 'rd.timeout' as the systemd timeout for <dev> + +set_systemd_timeout_for_dev() { local _name local _needreload @@ -915,19 +913,6 @@ wait_for_dev() _timeout=$(getarg rd.timeout) _timeout=${_timeout:-0} - _name="$(str_replace "$1" '/' '\x2f')" - - type mark_hostonly >/dev/null 2>&1 && mark_hostonly "$hookdir/initqueue/finished/devexists-${_name}.sh" - - [ -e "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh" ] && return 0 - - printf '[ -e "%s" ]\n' $1 \ - >> "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh" - { - printf '[ -e "%s" ] || ' $1 - printf 'warn "\"%s\" does not exist"\n' $1 - } >> "${PREFIX}$hookdir/emergency/80-${_name}.sh" - if [ -n "$DRACUT_SYSTEMD" ]; then _name=$(dev_unit_name "$1") if ! [ -L ${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device ]; then @@ -952,6 +937,36 @@ wait_for_dev() fi fi } +# wait_for_dev <dev> +# +# Installs a initqueue-finished script, +# which will cause the main loop only to exit, +# if the device <dev> is recognized by the system. +wait_for_dev() +{ + local _name + local _noreload + + if [ "$1" = "-n" ]; then + _noreload=-n + shift + fi + + _name="$(str_replace "$1" '/' '\x2f')" + + type mark_hostonly >/dev/null 2>&1 && mark_hostonly "$hookdir/initqueue/finished/devexists-${_name}.sh" + + [ -e "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh" ] && return 0 + + printf '[ -e "%s" ]\n' $1 \ + >> "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh" + { + printf '[ -e "%s" ] || ' $1 + printf 'warn "\"%s\" does not exist"\n' $1 + } >> "${PREFIX}$hookdir/emergency/80-${_name}.sh" + + set_systemd_timeout_for_dev $_noreload $1 +} cancel_wait_for_dev() { ^ permalink raw reply related [flat|nested] 14+ messages in thread
[parent not found: <20150326044148.10121.15286.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>]
* Re: [PATCH 4/4] crypt/parse-crypt.sh: hide encrypted devices from systemd timeout warnings. [not found] ` <20150326044148.10121.15286.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org> @ 2015-03-26 11:51 ` Harald Hoyer 2015-03-26 15:38 ` [Dracut GitHub] Patchset imported to github Dracut GitHub Import Bot 1 sibling, 0 replies; 14+ messages in thread From: Harald Hoyer @ 2015-03-26 11:51 UTC (permalink / raw) To: NeilBrown; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 26.03.2015 05:41, NeilBrown wrote: > When systemd's crypttab generator parsed crypttab, it tells systemd about > several devices which may not appear until later in the boot sequence, > and which are not needed while dract is running. > > This can particularly happen when an md array is encrypted, and the array > is newly degraded so that it doesn't appear until dracut runs > mdraid_start.sh. > > This can result in systemd printing warning messages which are > inappropriate. > > So tell systemd that the timeout for each of these is zero. > > This is involves splitting some functionality out of wait_for_dev() > > That function does two things: - creates 'finished' hooks so that dracut > will wait for the device, and - sets the systemd timeout for the device > to zero, so systemd doesn't wait. > > We only want the second of these for most encrypted devices. So split > that out into a new function set_systemd_timeout_for_dev(), and call it > from parse-crypt.sh > > Signed-off-by: NeilBrown <neilb-l3A5Bk7waGM@public.gmane.org> --- > modules.d/90crypt/parse-crypt.sh | 4 +++ > modules.d/99base/dracut-lib.sh | 53 > ++++++++++++++++++++++++-------------- 2 files changed, 38 insertions(+), > 19 deletions(-) > > diff --git a/modules.d/90crypt/parse-crypt.sh > b/modules.d/90crypt/parse-crypt.sh index 94ad1f63ae6f..5a64652cc51c 100755 > --- a/modules.d/90crypt/parse-crypt.sh +++ > b/modules.d/90crypt/parse-crypt.sh @@ -14,6 +14,10 @@ else LUKS=$(getargs > rd.luks.uuid -d rd_LUKS_UUID) tout=$(getarg rd.luks.key.tout) > > + while read _dev _uuid ; do + set_systemd_timeout_for_dev $_dev > + done + missing redirector from /etc/crypttab I guess ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Dracut GitHub] Patchset imported to github [not found] ` <20150326044148.10121.15286.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org> 2015-03-26 11:51 ` Harald Hoyer @ 2015-03-26 15:38 ` Dracut GitHub Import Bot 1 sibling, 0 replies; 14+ messages in thread From: Dracut GitHub Import Bot @ 2015-03-26 15:38 UTC (permalink / raw) To: initramfs-u79uwXL29TY76Z2rM5mHXA Patchset imported to github. Pull request: <https://github.com/haraldh/dracut/compare/master...dracut-mailing-devs:20150326044148.10121.15286.stgit@notabene.brown> ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] Take into account lib64 dirs when detecting version, modules and params
@ 2015-03-24 13:13 Amadeusz Żołnowski
[not found] ` <1427202794-18834-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Amadeusz Żołnowski @ 2015-03-24 13:13 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Amadeusz Żołnowski
---
lsinitrd.sh | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/lsinitrd.sh b/lsinitrd.sh
index 4f12c2c..dda0b74 100755
--- a/lsinitrd.sh
+++ b/lsinitrd.sh
@@ -108,6 +108,12 @@ if ! [[ -f "$image" ]]; then
exit 1
fi
+dracutlibdirs() {
+ for d in lib64/dracut lib/dracut usr/lib64/dracut usr/lib/dracut; do
+ echo "$d/$1"
+ done
+}
+
extract_files()
{
(( ${#filenames[@]} == 1 )) && nofileinfo=1
@@ -124,7 +130,8 @@ extract_files()
list_modules()
{
echo "dracut modules:"
- $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/modules.txt' 'usr/lib/dracut/modules.txt' 2>/dev/null
+ $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \
+ $(dracutlibdirs modules.txt) 2>/dev/null
((ret+=$?))
}
@@ -217,7 +224,8 @@ ret=0
if (( ${#filenames[@]} > 0 )); then
extract_files
else
- version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/dracut-*' 'usr/lib/dracut/dracut-*' 2>/dev/null)
+ version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \
+ $(dracutlibdirs 'dracut-*') 2>/dev/null)
((ret+=$?))
echo "Version: $version"
echo
@@ -226,7 +234,8 @@ else
echo "========================================================================"
else
echo -n "Arguments: "
- $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/build-parameter.txt' 'usr/lib/dracut/build-parameter.txt' 2>/dev/null
+ $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \
+ $(dracutlibdirs build-parameter.txt) 2>/dev/null
echo
list_modules
list_files
--
2.3.3
^ permalink raw reply related [flat|nested] 14+ messages in thread[parent not found: <1427202794-18834-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>]
* [Dracut GitHub] Patchset imported to github [not found] ` <1427202794-18834-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org> @ 2015-03-26 15:38 ` Dracut GitHub Import Bot 0 siblings, 0 replies; 14+ messages in thread From: Dracut GitHub Import Bot @ 2015-03-26 15:38 UTC (permalink / raw) To: initramfs-u79uwXL29TY76Z2rM5mHXA Patchset imported to github. Pull request: <https://github.com/haraldh/dracut/compare/master...dracut-mailing-devs:1427202794-18834-1-git-send-email-aidecoe@aidecoe.name> ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 4/4] 95fcoe-uefi: Test for EFI firmware
@ 2015-03-23 16:12 Thomas Renninger
[not found] ` <1427127138-12932-5-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Thomas Renninger @ 2015-03-23 16:12 UTC (permalink / raw)
To: harald-H+wXaHxf7aLQT0dZR+AlfA
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, trenn-l3A5Bk7waGM,
Hannes Reinecke
From: Hannes Reinecke <hare-l3A5Bk7waGM@public.gmane.org>
The fcoe-uefi module should test for EFI firmware when called
in 'hostonly' mode; of no EFI firmware is found then the module
doesn't need to be included.
References: bnc#882412
Signed-off-by: Hannes Reinecke <hare-l3A5Bk7waGM@public.gmane.org>
Signed-off-by: Thomas Renninger <trenn-l3A5Bk7waGM@public.gmane.org>
---
modules.d/95fcoe-uefi/module-setup.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh
index 8b8c810..5d8477c 100755
--- a/modules.d/95fcoe-uefi/module-setup.sh
+++ b/modules.d/95fcoe-uefi/module-setup.sh
@@ -2,6 +2,9 @@
# called by dracut
check() {
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
+ [ -d /sys/firmware/efi ] || return 255
+ }
require_binaries dcbtool fipvlan lldpad ip readlink || return 1
return 0
}
--
2.1.4
^ permalink raw reply related [flat|nested] 14+ messages in thread[parent not found: <1427127138-12932-5-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>]
* [Dracut GitHub] Patchset imported to github [not found] ` <1427127138-12932-5-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org> @ 2015-03-26 15:38 ` Dracut GitHub Import Bot 0 siblings, 0 replies; 14+ messages in thread From: Dracut GitHub Import Bot @ 2015-03-26 15:38 UTC (permalink / raw) To: initramfs-u79uwXL29TY76Z2rM5mHXA Patchset imported to github. Pull request: <https://github.com/haraldh/dracut/compare/master...dracut-mailing-devs:1427127138-12932-5-git-send-email-trenn@suse.de> ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] Add support for ethernet point-to-point connections configured via DHCP @ 2015-03-05 11:07 Gerd von Egidy 2015-03-26 15:38 ` [Dracut GitHub] Patchset imported to github Dracut GitHub Import Bot 0 siblings, 1 reply; 14+ messages in thread From: Gerd von Egidy @ 2015-03-05 11:07 UTC (permalink / raw) To: initramfs-u79uwXL29TY76Z2rM5mHXA When current dracut receives an ip with netmask of 255.255.255.255 via DHCP, setting the also supplied default gateway fails (because it is obviously not within the netmask). The setup with a netmask of /32 is quite common in colocation datacenters where you don't want the machines of two different customers to directly talk to each other. At least two of the biggest colocation providers in Germany (1&1 and Strato) do it that way. NetworkManager supports this kind of setup and the dhclient-scripts of several distributions too. In this patch I have implemented a simple approach very similar to what is found in Debian. The dhclient-script from Fedora uses a more sophisticated approach, but that relies on the ipcalc utility which would introduce a dependency on Fedora-initscripts for dracut. Signed-off-by: Gerd von Egidy <gerd.von.egidy-XXsH3GEs1jrby3iVrkZq2A@public.gmane.org> --- modules.d/40network/dhclient-script.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh index 50f1985..98352ec 100755 --- a/modules.d/40network/dhclient-script.sh +++ b/modules.d/40network/dhclient-script.sh @@ -43,7 +43,13 @@ setup_interface() { valid_lft ${lease_time} preferred_lft ${lease_time} \ dev $netif - [ -n "$gw" ] && echo ip route replace default via $gw dev $netif > /tmp/net.$netif.gw + if [ -n "$gw" ] ; then + if [ "$mask" == "255.255.255.255" ] ; then + # point-to-point connection => set explicit route to gateway + echo ip route add $gw dev $netif > /tmp/net.$netif.gw + fi + echo ip route replace default via $gw dev $netif >> /tmp/net.$netif.gw + fi [ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf if [ -n "$namesrv" ] ; then -- 1.9.3 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Dracut GitHub] Patchset imported to github 2015-03-05 11:07 [PATCH] Add support for ethernet point-to-point connections configured via DHCP Gerd von Egidy @ 2015-03-26 15:38 ` Dracut GitHub Import Bot 0 siblings, 0 replies; 14+ messages in thread From: Dracut GitHub Import Bot @ 2015-03-26 15:38 UTC (permalink / raw) To: initramfs-u79uwXL29TY76Z2rM5mHXA Patchset imported to github. Pull request: <https://github.com/haraldh/dracut/compare/master...dracut-mailing-devs:13711492.8HAMuGhYIN@thunder> ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] crypt: don't use systemd for crypto handling
@ 2015-03-04 7:49 Jan Synacek
[not found] ` <1425455385-28495-1-git-send-email-jsynacek-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Jan Synacek @ 2015-03-04 7:49 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
Cc: harald-H+wXaHxf7aLQT0dZR+AlfA, jsynacek-H+wXaHxf7aLQT0dZR+AlfA
There already is the code necessary to handle an encrypted root
device. The "rd.luks.key" option is not handled the same way in systemd
as it is in dracut, so some setups (like having the keyfile on a
separate device) don't work.
---
modules.d/90crypt/crypt-run-generator.sh | 31 ----------------------
modules.d/90crypt/module-setup.sh | 9 -------
modules.d/90crypt/parse-crypt.sh | 44 +++++++++-----------------------
3 files changed, 12 insertions(+), 72 deletions(-)
delete mode 100755 modules.d/90crypt/crypt-run-generator.sh
diff --git a/modules.d/90crypt/crypt-run-generator.sh b/modules.d/90crypt/crypt-run-generator.sh
deleted file mode 100755
index 3c5d7b1..0000000
--- a/modules.d/90crypt/crypt-run-generator.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-. /lib/dracut-lib.sh
-type crypttab_contains >/dev/null 2>&1 || . /lib/dracut-crypt-lib.sh
-
-dev=$1
-luks=$2
-
-crypttab_contains "$luks" && exit 0
-
-allowdiscards="-"
-
-# parse for allow-discards
-if strstr "$(cryptsetup --help)" "allow-discards"; then
- if discarduuids=$(getargs "rd.luks.allow-discards"); then
- discarduuids=$(str_replace "$discarduuids" 'luks-' '')
- if strstr " $discarduuids " " ${luks##luks-}"; then
- allowdiscards="allow-discards"
- fi
- elif getargbool 0 rd.luks.allow-discards; then
- allowdiscards="allow-discards"
- fi
-fi
-
-echo "$luks $dev - timeout=0,$allowdiscards" >> /etc/crypttab
-
-if command -v systemctl >/dev/null; then
- systemctl daemon-reload
- systemctl start cryptsetup.target
-fi
-exit 0
diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh
index ea1e340..5b3001f 100755
--- a/modules.d/90crypt/module-setup.sh
+++ b/modules.d/90crypt/module-setup.sh
@@ -85,14 +85,5 @@ install() {
inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
- inst_multiple -o \
- $systemdutildir/system-generators/systemd-cryptsetup-generator \
- $systemdutildir/systemd-cryptsetup \
- $systemdsystemunitdir/systemd-ask-password-console.path \
- $systemdsystemunitdir/systemd-ask-password-console.service \
- $systemdsystemunitdir/cryptsetup.target \
- $systemdsystemunitdir/sysinit.target.wants/cryptsetup.target \
- systemd-ask-password systemd-tty-ask-password-agent
- inst_script "$moddir"/crypt-run-generator.sh /sbin/crypt-run-generator
dracut_need_initqueue
}
diff --git a/modules.d/90crypt/parse-crypt.sh b/modules.d/90crypt/parse-crypt.sh
index 94ad1f6..f2bc181 100755
--- a/modules.d/90crypt/parse-crypt.sh
+++ b/modules.d/90crypt/parse-crypt.sh
@@ -19,25 +19,13 @@ else
luksid=${luksid##luks-}
- if [ -z "$DRACUT_SYSTEMD" ]; then
- {
- printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", '
- printf -- 'ENV{ID_FS_UUID}=="*%s*", ' $luksid
- printf -- 'RUN+="%s --settled --unique --onetime ' $(command -v initqueue)
- printf -- '--name cryptroot-ask-%%k %s ' $(command -v cryptroot-ask)
- printf -- '$env{DEVNAME} luks-$env{ID_FS_UUID} %s"\n' $tout
- } >> /etc/udev/rules.d/70-luks.rules.new
- else
- if ! crypttab_contains "$luksid"; then
- {
- printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", '
- printf -- 'ENV{ID_FS_UUID}=="*%s*", ' $luksid
- printf -- 'RUN+="%s --settled --unique --onetime ' $(command -v initqueue)
- printf -- '--name systemd-cryptsetup-%%k %s start ' $(command -v systemctl)
- printf -- 'systemd-cryptsetup@luks$$(dev_unit_name -$env{ID_FS_UUID}).service"\n'
- } >> /etc/udev/rules.d/70-luks.rules.new
- fi
- fi
+ {
+ printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", '
+ printf -- 'ENV{ID_FS_UUID}=="*%s*", ' $luksid
+ printf -- 'RUN+="%s --settled --unique --onetime ' $(command -v initqueue)
+ printf -- '--name cryptroot-ask-%%k %s ' $(command -v cryptroot-ask)
+ printf -- '$env{DEVNAME} luks-$env{ID_FS_UUID} %s"\n' $tout
+ } >> /etc/udev/rules.d/70-luks.rules.new
uuid=$luksid
while [ "$uuid" != "${uuid#*-}" ]; do uuid=${uuid%%-*}${uuid#*-}; done
@@ -50,19 +38,11 @@ else
} >> $hookdir/emergency/90-crypt.sh
done
elif getargbool 0 rd.auto; then
- if [ -z "$DRACUT_SYSTEMD" ]; then
- {
- printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' $(command -v initqueue)
- printf -- '--unique --settled --onetime --name cryptroot-ask-%%k '
- printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID} %s"\n' $(command -v cryptroot-ask) $tout
- } >> /etc/udev/rules.d/70-luks.rules.new
- else
- {
- printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' $(command -v initqueue)
- printf -- '--unique --settled --onetime --name crypt-run-generator-%%k '
- printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID}"\n' $(command -v crypt-run-generator)
- } >> /etc/udev/rules.d/70-luks.rules.new
- fi
+ {
+ printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' $(command -v initqueue)
+ printf -- '--unique --settled --onetime --name cryptroot-ask-%%k '
+ printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID} %s"\n' $(command -v cryptroot-ask) $tout
+ } >> /etc/udev/rules.d/70-luks.rules.new
fi
echo 'LABEL="luks_end"' >> /etc/udev/rules.d/70-luks.rules.new
--
2.1.0
^ permalink raw reply related [flat|nested] 14+ messages in thread[parent not found: <1425455385-28495-1-git-send-email-jsynacek-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* [Dracut GitHub] Patchset imported to github [not found] ` <1425455385-28495-1-git-send-email-jsynacek-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2015-03-26 15:38 ` Dracut GitHub Import Bot [not found] ` <20150326153844.5437.48101.githubbot-/GRfruIG/bJJrt6ceOoM5Ad3sJO0fIaJ@public.gmane.org> 0 siblings, 1 reply; 14+ messages in thread From: Dracut GitHub Import Bot @ 2015-03-26 15:38 UTC (permalink / raw) To: initramfs-u79uwXL29TY76Z2rM5mHXA Patchset imported to github. Pull request: <https://github.com/haraldh/dracut/compare/master...dracut-mailing-devs:1425455385-28495-1-git-send-email-jsynacek@redhat.com> ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <20150326153844.5437.48101.githubbot-/GRfruIG/bJJrt6ceOoM5Ad3sJO0fIaJ@public.gmane.org>]
* Re: [Dracut GitHub] Patchset imported to github [not found] ` <20150326153844.5437.48101.githubbot-/GRfruIG/bJJrt6ceOoM5Ad3sJO0fIaJ@public.gmane.org> @ 2015-03-26 16:42 ` Harald Hoyer 0 siblings, 0 replies; 14+ messages in thread From: Harald Hoyer @ 2015-03-26 16:42 UTC (permalink / raw) To: Dracut GitHub Import Bot, initramfs-u79uwXL29TY76Z2rM5mHXA On 26.03.2015 16:38, Dracut GitHub Import Bot wrote: > Patchset imported to github. > Pull request: > <https://github.com/haraldh/dracut/compare/master...dracut-mailing-devs:1425455385-28495-1-git-send-email-jsynacek-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > N�����r��y���b�X��ǧv�^�){.n�+����+kjg�{ay�\x1dʇڙ�,j\a��f���h���z�\x1e�w���\f���j:+v���w�j�m����\a����zZ+�����ݢj"��!tml= > Ok, I will change my bot to not send with Content-Transfer-Encoding: base64 otherwise the majordomo signature is scrambled :) ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] base/dracut-lib.sh: remove bashism
@ 2015-02-24 19:28 Alexander Tsoy
[not found] ` <E1YQLG5-00009v-BS-C3g8GgeTu50ox3rIn2DAYQ@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Alexander Tsoy @ 2015-02-24 19:28 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
---
modules.d/99base/dracut-lib.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
index 079c9a2..fd627dc 100755
--- a/modules.d/99base/dracut-lib.sh
+++ b/modules.d/99base/dracut-lib.sh
@@ -886,7 +886,9 @@ dev_unit_name()
dev="${dev##/}"
dev="$(str_replace "$dev" '\' '\x5c')"
dev="$(str_replace "$dev" '-' '\x2d')"
- dev=${dev/#\./\\x2e}
+ if [ "${dev##.}" != "$dev" ]; then
+ dev="\x2e${dev##.}"
+ fi
dev="$(str_replace "$dev" '/' '-')"
printf -- "%s" "$dev"
--
2.0.5
^ permalink raw reply related [flat|nested] 14+ messages in thread[parent not found: <E1YQLG5-00009v-BS-C3g8GgeTu50ox3rIn2DAYQ@public.gmane.org>]
* [Dracut GitHub] Patchset imported to github [not found] ` <E1YQLG5-00009v-BS-C3g8GgeTu50ox3rIn2DAYQ@public.gmane.org> @ 2015-03-26 15:38 ` Dracut GitHub Import Bot 0 siblings, 0 replies; 14+ messages in thread From: Dracut GitHub Import Bot @ 2015-03-26 15:38 UTC (permalink / raw) To: initramfs-u79uwXL29TY76Z2rM5mHXA Patchset imported to github. Pull request: <https://github.com/haraldh/dracut/compare/master...dracut-mailing-devs:E1YQLG5-00009v-BS@puleglot.ru> ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] Take into account lib64 dirs when detecting version, modules and params
@ 2015-01-11 14:12 Amadeusz Żołnowski
[not found] ` <1420985530-5006-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Amadeusz Żołnowski @ 2015-01-11 14:12 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Amadeusz Żołnowski
---
lsinitrd.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lsinitrd.sh b/lsinitrd.sh
index 4f12c2c..dc1f88f 100755
--- a/lsinitrd.sh
+++ b/lsinitrd.sh
@@ -124,7 +124,7 @@ extract_files()
list_modules()
{
echo "dracut modules:"
- $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/modules.txt' 'usr/lib/dracut/modules.txt' 2>/dev/null
+ $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib64/dracut/modules.txt' 'lib/dracut/modules.txt' 'usr/lib/dracut/modules.txt' 2>/dev/null
((ret+=$?))
}
@@ -217,7 +217,7 @@ ret=0
if (( ${#filenames[@]} > 0 )); then
extract_files
else
- version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/dracut-*' 'usr/lib/dracut/dracut-*' 2>/dev/null)
+ version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib64/dracut/dracut-*' 'lib/dracut/dracut-*' 'usr/lib/dracut/dracut-*' 2>/dev/null)
((ret+=$?))
echo "Version: $version"
echo
@@ -226,7 +226,7 @@ else
echo "========================================================================"
else
echo -n "Arguments: "
- $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/build-parameter.txt' 'usr/lib/dracut/build-parameter.txt' 2>/dev/null
+ $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib64/dracut/build-parameter.txt' 'lib/dracut/build-parameter.txt' 'usr/lib/dracut/build-parameter.txt' 2>/dev/null
echo
list_modules
list_files
--
2.2.1
^ permalink raw reply related [flat|nested] 14+ messages in thread[parent not found: <1420985530-5006-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>]
* [Dracut GitHub] Patchset imported to github [not found] ` <1420985530-5006-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org> @ 2015-03-26 15:38 ` Dracut GitHub Import Bot 0 siblings, 0 replies; 14+ messages in thread From: Dracut GitHub Import Bot @ 2015-03-26 15:38 UTC (permalink / raw) To: initramfs-u79uwXL29TY76Z2rM5mHXA Patchset imported to github. Pull request: <https://github.com/haraldh/dracut/compare/master...dracut-mailing-devs:1420985530-5006-1-git-send-email-aidecoe@aidecoe.name> ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2015-03-26 16:42 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-26 4:41 [PATCH 0/4] dracut: fix various issues with newly degraded md arrays NeilBrown
[not found] ` <20150326043938.10121.34223.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2015-03-26 4:41 ` [PATCH 1/4] mdraid/mdraid_start.sh: tell mainloop if we make progress NeilBrown
2015-03-26 4:41 ` [PATCH 2/4] systemd/dracut-iniqueue - continue waiting if any timeout script makes progress NeilBrown
2015-03-26 4:41 ` [PATCH 3/4] dracut-systemd/rootfs-generator.sh: always create generated files NeilBrown
2015-03-26 4:41 ` [PATCH 4/4] crypt/parse-crypt.sh: hide encrypted devices from systemd timeout warnings NeilBrown
[not found] ` <20150326044148.10121.15286.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2015-03-26 11:51 ` Harald Hoyer
2015-03-26 15:38 ` [Dracut GitHub] Patchset imported to github Dracut GitHub Import Bot
-- strict thread matches above, loose matches on Subject: below --
2015-03-24 13:13 [PATCH] Take into account lib64 dirs when detecting version, modules and params Amadeusz Żołnowski
[not found] ` <1427202794-18834-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
2015-03-26 15:38 ` [Dracut GitHub] Patchset imported to github Dracut GitHub Import Bot
2015-03-23 16:12 [PATCH 4/4] 95fcoe-uefi: Test for EFI firmware Thomas Renninger
[not found] ` <1427127138-12932-5-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2015-03-26 15:38 ` [Dracut GitHub] Patchset imported to github Dracut GitHub Import Bot
2015-03-05 11:07 [PATCH] Add support for ethernet point-to-point connections configured via DHCP Gerd von Egidy
2015-03-26 15:38 ` [Dracut GitHub] Patchset imported to github Dracut GitHub Import Bot
2015-03-04 7:49 [PATCH] crypt: don't use systemd for crypto handling Jan Synacek
[not found] ` <1425455385-28495-1-git-send-email-jsynacek-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-03-26 15:38 ` [Dracut GitHub] Patchset imported to github Dracut GitHub Import Bot
[not found] ` <20150326153844.5437.48101.githubbot-/GRfruIG/bJJrt6ceOoM5Ad3sJO0fIaJ@public.gmane.org>
2015-03-26 16:42 ` Harald Hoyer
2015-02-24 19:28 [PATCH] base/dracut-lib.sh: remove bashism Alexander Tsoy
[not found] ` <E1YQLG5-00009v-BS-C3g8GgeTu50ox3rIn2DAYQ@public.gmane.org>
2015-03-26 15:38 ` [Dracut GitHub] Patchset imported to github Dracut GitHub Import Bot
2015-01-11 14:12 [PATCH] Take into account lib64 dirs when detecting version, modules and params Amadeusz Żołnowski
[not found] ` <1420985530-5006-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
2015-03-26 15:38 ` [Dracut GitHub] Patchset imported to github Dracut GitHub Import Bot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox