]> git.ipfire.org Git - thirdparty/dracut.git/log
thirdparty/dracut.git
7 years agofips: remove sha1-mb
Harald Hoyer [Tue, 9 Aug 2016 11:01:32 +0000 (13:01 +0200)] 
fips: remove sha1-mb

This module should be loaded automatically, if the HW supports it.

7 years agofips-module: add missing spaces
Lukas Nykryn [Thu, 28 Jul 2016 09:02:19 +0000 (11:02 +0200)] 
fips-module: add missing spaces

https://bugzilla.redhat.com/show_bug.cgi?id=1359677

7 years agoadd rd.emergency=[reboot|poweroff|halt]
Harald Hoyer [Fri, 22 Jul 2016 11:32:47 +0000 (13:32 +0200)] 
add rd.emergency=[reboot|poweroff|halt]

specifies what action to execute in case of a critical failure

(cherry picked from commit c45e856a659a37537c107f7ef3e680abf60a96a5)

https://bugzilla.redhat.com/show_bug.cgi?id=1359144

7 years agolvm: include /etc/lvm/lvm_<host_tag>.conf
Harald Hoyer [Fri, 22 Jul 2016 11:26:10 +0000 (13:26 +0200)] 
lvm: include /etc/lvm/lvm_<host_tag>.conf

https://bugzilla.redhat.com/show_bug.cgi?id=1328778

7 years agodracut.sh: extend host_fs_types with $filesystems
Harald Hoyer [Fri, 22 Jul 2016 06:39:38 +0000 (08:39 +0200)] 
dracut.sh: extend host_fs_types with $filesystems

Additional filesystems specified on the kernel command line or in the
configuration files, should trigger the inclusion of the corresponding
dracut modules, therefore host_fs_types is extended with these
filesystems.

7 years agonfs: install all nfs modules non-hostonly
Harald Hoyer [Fri, 22 Jul 2016 06:30:36 +0000 (08:30 +0200)] 
nfs: install all nfs modules non-hostonly

If nfs is used, we should include all nfs modules, in the case, where
$host_fs_types contains nfs.

7 years agofips: add "sha1-mb" to fips modules
Harald Hoyer [Thu, 21 Jul 2016 13:08:59 +0000 (15:08 +0200)] 
fips: add "sha1-mb" to fips modules

https://bugzilla.redhat.com/show_bug.cgi?id=1357080

7 years agofips: use /lib/modules/$(uname -r)/modules.fips
Harald Hoyer [Thu, 21 Jul 2016 13:07:52 +0000 (15:07 +0200)] 
fips: use /lib/modules/$(uname -r)/modules.fips

if /lib/modules/$(uname -r)/modules.fips exists, use that list instead
of the dracut module list.

7 years agoMerge pull request #141 from pratyushanand/for-RHEL-7
Harald Hoyer [Thu, 21 Jul 2016 09:12:01 +0000 (11:12 +0200)] 
Merge pull request #141 from pratyushanand/for-RHEL-7

RHEL7: Install module for active watchdog

7 years agodracut.spec: remove trailing space
Harald Hoyer [Wed, 6 Jul 2016 07:17:36 +0000 (09:17 +0200)] 
dracut.spec: remove trailing space

7 years agowatchdog: start traversing the device tree from the right directory 141/head
Harald Hoyer [Mon, 18 Apr 2016 13:50:42 +0000 (15:50 +0200)] 
watchdog: start traversing the device tree from the right directory

start with the device subtree, not with the parent of it

7 years agowatchdog: clean return of installkernel()
Harald Hoyer [Mon, 18 Apr 2016 13:49:06 +0000 (15:49 +0200)] 
watchdog: clean return of installkernel()

return 0, otherwise if _alldrivers is empty, the return code is fail

7 years agowatchdog/module-setup.sh: rewrite
Harald Hoyer [Fri, 15 Apr 2016 09:27:20 +0000 (11:27 +0200)] 
watchdog/module-setup.sh: rewrite

- use local variables with _
- use associative array for the kernel modules
- install emergency hook even in the systemd case
- follow device path until /sys is reached
- set kernel version for modprobe checking

7 years agowatchdog: ensure that module is loaded as early as possible
Pratyush Anand [Wed, 16 Mar 2016 03:46:24 +0000 (09:16 +0530)] 
watchdog: ensure that module is loaded as early as possible

It is expected that a watchdog module will disable an active watchdog when
its probe is called ie, when it is loaded. So an early load of the module
will help to disable it earlier.
This can be helpful in some corner cases where kdump and watchdog daemon
both are active.

Testing:
    -- When watchdog kernel modules were added
# dracut --no-hostonly initramfs-test.img -a watchdog
# lsinitrd initramfs-test.img -f etc/cmdline.d/00-watchdog.conf
  rd.driver.pre=iTCO_wdt,lpc_ich,

Signed-off-by: Pratyush Anand <panand@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Harald Hoyer <harald@redhat.com>
7 years agowatchdog: install module for active watchdog
Pratyush Anand [Wed, 16 Mar 2016 03:39:10 +0000 (09:09 +0530)] 
watchdog: install module for active watchdog

Recently following patches have been added in upstream Linux kernel, which
(1) fixes parent of watchdog_device so that
/sys/class/watchdog/watchdogn/device is populated. (2) adds some sysfs
device attributes so that different watchdog status can be read.

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6551881c86c791237a3bebf11eb3bd70b60ea782
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=906d7a5cfeda508e7361f021605579a00cd82815
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=33b711269ade3f6bc9d9d15e4343e6fa922d999b

With the above support, now we can find out whether a watchdog is active or
not. We can also find out the driver/module responsible for that watchdog
device.

Proposed patch uses above support and then adds module of active watchdog
in initramfs generated by dracut for hostonly mode. Kernel module for
inactive watchdog will be added as well for none hostonly mode.

When an user does not want to add kernel module, then one should exclude
complete dracut watchdog module with --omit.

Testing:
-- When watchdog is active watchdog modules were added
# cat /sys/class/watchdog/watchdog0/identity
iTCO_wdt
# cat /sys/class/watchdog/watchdog0/state
active
# dracut --hostonly initramfs-test.img -a watchdog
# lsinitrd initramfs-test.img | grep iTCO
-rw-r--r--   1 root     root         9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko
-rw-r--r--   1 root     root        19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko

-- When watchdog is inactive then watchdog modules were not added
# cat /sys/class/watchdog/watchdog0/state
inactive
# dracut --hostonly initramfs-test.img -a watchdog
# lsinitrd initramfs-test.img | grep iTCO

-- When watchdog is inactive, but no hostonly mode, watchdog modules were added
# cat /sys/class/watchdog/watchdog0/state
inactive
# dracut --no-hostonly initramfs-test.img -a watchdog
# lsinitrd initramfs-test.img | grep iTCO
-rw-r--r--   1 root     root         9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko
-rw-r--r--   1 root     root        19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko

Signed-off-by: Pratyush Anand <panand@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Harald Hoyer <harald@redhat.com>
7 years agowatchdog: Do not add hooks if systemd module is included
Pratyush Anand [Wed, 16 Mar 2016 03:39:09 +0000 (09:09 +0530)] 
watchdog: Do not add hooks if systemd module is included

When systemd is present, let it manage watchdog feed.

Signed-off-by: Pratyush Anand <panand@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Harald Hoyer <harald@redhat.com>
7 years agodracut.spec: remove dd
Harald Hoyer [Mon, 4 Jul 2016 14:30:31 +0000 (16:30 +0200)] 
dracut.spec: remove dd

dd is part of coreutils

7 years agoTEST-70-BONDBRIDGETEAMVLAN: add testcase for testsuite
Harald Hoyer [Mon, 4 Jul 2016 13:44:36 +0000 (15:44 +0200)] 
TEST-70-BONDBRIDGETEAMVLAN: add testcase for testsuite

multiple bonds
multiple bridges
multiple vlans

7 years agonetwork: support multiple vlan, team, bridge and bond
Harald Hoyer [Mon, 4 Jul 2016 09:31:49 +0000 (11:31 +0200)] 
network: support multiple vlan, team, bridge and bond

7 years agolsinitrd: Suppress "cat: write error: Broken pipe"
HATAYAMA Daisuke [Wed, 4 Nov 2015 02:31:10 +0000 (11:31 +0900)] 
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.

(cherry picked from commit 3ce142861d88c357864d3a3bef7ec453826d737d)

Conflicts:
lsinitrd.sh

7 years agoTEST-14-IMSM: add rd.device.timeout
Harald Hoyer [Fri, 1 Jul 2016 10:28:38 +0000 (12:28 +0200)] 
TEST-14-IMSM: add rd.device.timeout

7 years agoTEST-13-ENC-RAID-LVM: add rd.device.timeout=40
Harald Hoyer [Thu, 30 Jun 2016 14:36:29 +0000 (16:36 +0200)] 
TEST-13-ENC-RAID-LVM: add rd.device.timeout=40

7 years agosystemd: let booting work after exiting emergency
Harald Hoyer [Thu, 30 Jun 2016 14:34:06 +0000 (16:34 +0200)] 
systemd: let booting work after exiting emergency

If the user managed to mount /sysroot, let it work

7 years agosystemd/dracut-initqueue.sh: don't go into emergency
Harald Hoyer [Thu, 30 Jun 2016 14:33:18 +0000 (16:33 +0200)] 
systemd/dracut-initqueue.sh: don't go into emergency

let systemd go into emergency.target later on

7 years ago99base/init.sh: break the initqueue, if emergency shell was successful
Harald Hoyer [Thu, 30 Jun 2016 14:32:44 +0000 (16:32 +0200)] 
99base/init.sh: break the initqueue, if emergency shell was successful

7 years agotest/TEST-12-RAID-DEG: add rd.device.timeout
Harald Hoyer [Thu, 30 Jun 2016 13:27:04 +0000 (15:27 +0200)] 
test/TEST-12-RAID-DEG: add rd.device.timeout

7 years agotest/TEST-04-systemd: fixup test
Harald Hoyer [Thu, 30 Jun 2016 13:25:54 +0000 (15:25 +0200)] 
test/TEST-04-systemd: fixup test

- fix find -perm
- add failme test cases
- remove journal output

7 years agoadd rd.device.timeout=<seconds> parameter
Harald Hoyer [Thu, 30 Jun 2016 13:24:54 +0000 (15:24 +0200)] 
add rd.device.timeout=<seconds> parameter

7 years agovirtfs: use systemd generator
Harald Hoyer [Thu, 30 Jun 2016 13:22:47 +0000 (15:22 +0200)] 
virtfs: use systemd generator

use a systemd generator, instead of a dracut hook to mount

7 years agodracut-systemd/dracut-cmdline.sh: Don't error out if there is no root= argument.
Alexander Kurtz [Fri, 6 May 2016 15:25:37 +0000 (17:25 +0200)] 
dracut-systemd/dracut-cmdline.sh: Don't error out if there is no root= argument.

Thanks to systemd's gpt-auto-generator [0] (which implements the Discoverable
Partitions Specification [1]), it is no longer necessary to always specify the
root= argument.

However, dracut would still refuse to boot if there was no root= argument (or
if it was set to the special value "gpt-auto" [2]). This commit stops dracut
from aborting the boot process in these cases and simply lets systemd do its
magic.

[0] https://github.com/systemd/systemd/blob/v229/src/gpt-auto-generator
[1] https://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/
[2] https://github.com/systemd/systemd/blob/v229/src/gpt-auto-generator/gpt-auto-generator.c#L928

(cherry picked from commit 016613c774baf3d30c6425a65ead05d8b55d6279)

7 years agonetwork:wait_for_ipv6_auto() wait for all tentative addresses
Harald Hoyer [Thu, 30 Jun 2016 10:15:56 +0000 (12:15 +0200)] 
network:wait_for_ipv6_auto() wait for all tentative addresses

7 years agonetwork: flush only IPv4 addresses on configuration
Harald Hoyer [Thu, 30 Jun 2016 09:11:37 +0000 (11:11 +0200)] 
network: flush only IPv4 addresses on configuration

also flush on dhcp

7 years agonetwork: differ between ipv6 local and global tentative
Harald Hoyer [Thu, 30 Jun 2016 09:10:35 +0000 (11:10 +0200)] 
network: differ between ipv6 local and global tentative

For dhcpv6, only a non-tentative scope local address is needed.

7 years agonetwork/net-lib.sh: auto6 wait for route ra
Harald Hoyer [Thu, 30 Jun 2016 06:52:09 +0000 (08:52 +0200)] 
network/net-lib.sh: auto6 wait for route ra

Wait for a router advertised route

7 years ago40network: Update iBFT scanning code to handle IPv6
Hannes Reinecke [Thu, 12 May 2016 18:03:28 +0000 (20:03 +0200)] 
40network: Update iBFT scanning code to handle IPv6

IPv6 addresses should be specified in brackets so that the
ip= scanning code doesn't get confused.

References: bnc#887542

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.com>
(cherry picked from commit c98d1756f766e49f7b457e217b0e0156d577d8b8)

7 years agonetwork/net-lib.sh: delete duplicated DNS items from "/etc/resolv.conf"
Xunlei Pang [Tue, 26 Apr 2016 10:05:11 +0000 (18:05 +0800)] 
network/net-lib.sh: delete duplicated DNS items from "/etc/resolv.conf"

Users can pass the DNS information throught "nameserver=" cmdline,
there maybe duplicated inputs.

"/etc/resolv.conf" have some restrictions on the number of DNS items
effective, so make sure that this file contains no duplicated items.

We achieve this by simply making the file have no duplicated lines.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
(cherry picked from commit 4fa5c235a76c085f5958002826436ed9c40e5034)

7 years agonetwork: dhcp before parsing specified dns through cmdline
Harald Hoyer [Wed, 29 Jun 2016 15:26:17 +0000 (17:26 +0200)] 
network: dhcp before parsing specified dns through cmdline

I met a problem when passing kdump dns to dracut via "nameserver=x.x.x.x",
the dns I provided didn't appear in the "/etc/resolv.conf".

After some debugging, found that when setup dhcp DNS, in setup_interface()
and setup_interface6(), it has:
    echo "search $search $domain" > /tmp/net.$netif.resolv.conf

So if "$search $domain" isn't NULL(this is ture in my kdump environment),
the dns contents(that is, dns1, dns2, nameserver) in "ifup" before dhcp
will be discarded.

This patch addresses it by handling dhcp first. In fact this is also the
way the NetworkManager in 1st kernel works.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
cherry-pick of commit cf376023e6d0d4abd9816fa954bb917fc2557713

7 years agosystemd: ensure journal is volatile
Michael Chapman [Wed, 4 May 2016 00:49:56 +0000 (10:49 +1000)] 
systemd: ensure journal is volatile

If journald.conf already contains Storage=persistent, journald will
write to /var/log/journal/, which ends up at /run/initramfs/log/journal/
after switching root. We want to make sure early boot logs are written
to /run/log/journal/ so they can be flushed to /var/log/journal/ after
switching root.

(cherry picked from commit 5dea430e087ec7749080547a6a6fe5b152f665ef)

7 years agonetwork/net-lib.sh(wait_for_ipv6_dad): simplify ip call
Harald Hoyer [Wed, 29 Jun 2016 15:18:46 +0000 (17:18 +0200)] 
network/net-lib.sh(wait_for_ipv6_dad): simplify ip call

taken from initscripts

7 years agonetwork/net-lib.sh(parse_ifname_opts): support 21 byte MAC addrs
Harald Hoyer [Wed, 29 Jun 2016 14:37:40 +0000 (16:37 +0200)] 
network/net-lib.sh(parse_ifname_opts): support 21 byte MAC addrs

infiniband MAC addrs are 20 bytes long not 6

https://bugzilla.redhat.com/show_bug.cgi?id=1319270

7 years agotest: add TEST-60-MTUMAC
Harald Hoyer [Wed, 29 Jun 2016 13:51:42 +0000 (15:51 +0200)] 
test: add TEST-60-MTUMAC

test MTU and MACADDR setting

7 years agonetwork: set MTU and MACADDR for dhcp and auto6
Harald Hoyer [Wed, 29 Jun 2016 13:12:24 +0000 (15:12 +0200)] 
network: set MTU and MACADDR for dhcp and auto6

7 years agotest: don't call ldconfig with -- path separator
Harald Hoyer [Wed, 29 Jun 2016 13:11:39 +0000 (15:11 +0200)] 
test: don't call ldconfig with -- path separator

7 years agonetwork: support macaddr in brackets []
Harald Hoyer [Wed, 29 Jun 2016 10:27:37 +0000 (12:27 +0200)] 
network: support macaddr in brackets []

ip=ens3:dhcp:1000
ip=ens3:dhcp::54:52:00:ab:cd:ef
ip=ens3:dhcp::[54:52:00:ab:cd:ef]
ip=ens3:dhcp:1000:54:52:00:ab:cd:ef
ip=ens3:dhcp:1000:[54:52:00:ab:cd:ef]

ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000
ip=192.168.122.20::192.168.122.1:24:test:ens3:none::54:52:00:ab:cd:ef
ip=192.168.122.20::192.168.122.1:24:test:ens3:none::[54:52:00:ab:cd:ef]
ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000:54:52:00:ab:cd:ef
ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000:[54:52:00:ab:cd:ef]

ip=::::test:ens3:dhcp:1000
ip=::::test:ens3:dhcp::54:52:00:ab:cd:ef
ip=::::test:ens3:dhcp::[54:52:00:ab:cd:ef]
ip=::::test:ens3:dhcp:1000:54:52:00:ab:cd:ef
ip=::::test:ens3:dhcp:1000:[54:52:00:ab:cd:ef]

7 years agonetwork/net-lib.sh: correctly set mac address for ip=...:<mtu>:<mac>
Harald Hoyer [Wed, 13 Jan 2016 12:43:38 +0000 (13:43 +0100)] 
network/net-lib.sh: correctly set mac address for ip=...:<mtu>:<mac>

if ip=...:<mtu>:<mac> was specified, macadress was not set

(cherry picked from commit efbc47b8e43ad173d3319f3f6e87b0a60aad9f37)

7 years agofcoe-up: remove initlog logic
Harald Hoyer [Wed, 5 Mar 2014 12:20:35 +0000 (13:20 +0100)] 
fcoe-up: remove initlog logic

(cherry picked from commit f60b7d8655bd90637a52b11e9e16ed144d5040d3)

7 years ago95fcoe: update fcoe interface check
Hannes Reinecke [Thu, 11 Dec 2014 14:46:21 +0000 (15:46 +0100)] 
95fcoe: update fcoe interface check

7 years ago95fcoe: Store current configuration in dracut cmdline
Hannes Reinecke [Thu, 11 Dec 2014 14:46:22 +0000 (15:46 +0100)] 
95fcoe: Store current configuration in dracut cmdline

When running with --hostonly-cmdline we should be storing
the current configuration in /etc/cmdline.d so that dracut
will be configure the system automatically.

References: bnc#877288

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
(cherry picked from commit 8b257fcc86f9a470613c1a5719641144a688acf7)

7 years ago95fcoe: skip VLAN devices in fcoe-up
Hannes Reinecke [Thu, 11 Dec 2014 14:46:23 +0000 (15:46 +0100)] 
95fcoe: skip VLAN devices in fcoe-up

DCB & fipvlan can only be called on real devices, not VLAN
ones. So skip any VLAN devices which might been added to the
list of network interfaces.

References: bnc#878583

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
(cherry picked from commit 0a68a26cffad7fc75e454b06206c0bbf297361b7)

7 years ago95fcoe: start lldpad separately
Hannes Reinecke [Thu, 11 Dec 2014 14:46:24 +0000 (15:46 +0100)] 
95fcoe: start lldpad separately

lldpad is a system-wide process, which must be started only once.
So we should be separate it from fcoe-up, as it might be called
several times.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
(cherry picked from commit 22e837b6458d5d17d1cb6a9b09b7515746d4e098)

7 years agoDefer modprobe of HW modules, until udev is running
Harald Hoyer [Fri, 24 Apr 2015 09:54:07 +0000 (11:54 +0200)] 
Defer modprobe of HW modules, until udev is running

Also honor blacklisting

(cherry picked from commit 437dad70e9525a21da873652080bbd62a9d8b96a)

7 years agoReset IFS variable
Hannes Reinecke [Fri, 26 Jun 2015 14:55:52 +0000 (16:55 +0200)] 
Reset IFS variable

Setting and unsetting the IFS variable is tricky. To be on the
safe side we should always reset the IFS variable to its original
value after parsing.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
(cherry picked from commit b8efaa00171135db1e1f09a73a2e0d8098f03867)

7 years agoReplace echo -n with printf in code with a /bin/sh shebang
Mike Gilbert [Wed, 15 Jul 2015 02:22:14 +0000 (22:22 -0400)] 
Replace echo -n with printf in code with a /bin/sh shebang

POSIX does not mandate that echo support the -n parameter.
printf has more well-defined behavior.

(cherry picked from commit 5899f2f5163de4d68fbb35831e1f2230c22c71b3)

7 years agodracut: nbd: Only complain of missing binary in hostonly mode if
Thomas Renninger [Thu, 11 Dec 2014 14:46:33 +0000 (15:46 +0100)] 
dracut: nbd: Only complain of missing binary in hostonly mode if

 rootfs is on nbd

In not hostonly mode, require_binaries will still complain.
If in hostonly mode and the module is explicitly added via -a nbd, then
install() section will still complain later:
dracut-install: ERROR: installing 'nbd-client'

Signed-off-by: Thomas Renninger <trenn@suse.de>
(cherry picked from commit e683985d103f1b0f15a9ccd9678169f4fb7aeb5f)

7 years agoadd "--install-optional" and install_optional_items
Harald Hoyer [Tue, 22 Jul 2014 12:09:06 +0000 (14:09 +0200)] 
add "--install-optional" and install_optional_items

(cherry picked from commit 54b68829b60bc3f4c28cfca1ab0336584fe1e74c)

7 years agodracut: only use one tmpdir
Harald Hoyer [Wed, 29 Jun 2016 09:25:12 +0000 (11:25 +0200)] 
dracut: only use one tmpdir

also remove any partial written initramfs images

7 years agofcoe: check if needed for hostonly
Harald Hoyer [Wed, 29 Jun 2016 08:49:00 +0000 (10:49 +0200)] 
fcoe: check if needed for hostonly

7 years agoDisable early microcode for non-x86 architecures
Harald Hoyer [Wed, 29 Jun 2016 08:45:22 +0000 (10:45 +0200)] 
Disable early microcode for non-x86 architecures

7 years agotest/TEST-02-systemd: use marker disk for successfull boot marker
Harald Hoyer [Mon, 27 Jun 2016 08:28:09 +0000 (10:28 +0200)] 
test/TEST-02-systemd: use marker disk for successfull boot marker

7 years agosystemd: add -.slice and make reboot work
Harald Hoyer [Mon, 27 Jun 2016 08:27:05 +0000 (10:27 +0200)] 
systemd: add -.slice and make reboot work

-.slice and conflicting with emergency.target and shutdown.target
makes reboot work

7 years agonetwork/dhclient.conf: add missing commata
Harald Hoyer [Thu, 23 Jun 2016 12:24:40 +0000 (14:24 +0200)] 
network/dhclient.conf: add missing commata

options need to be seperated by ,

(cherry picked from commit 7e51abc81f53c08e464decd4103e8c4ec25fef87)

7 years agoTEST-50-MULTINIC: add multiple bond tests
Harald Hoyer [Wed, 22 Jun 2016 12:03:12 +0000 (14:03 +0200)] 
TEST-50-MULTINIC: add multiple bond tests

7 years agonetwork/parse-bond.sh: handle multiple bond interfaces
Harald Hoyer [Wed, 22 Jun 2016 11:21:56 +0000 (13:21 +0200)] 
network/parse-bond.sh: handle multiple bond interfaces

7 years agoifup: setup bridge, bonding and teaming only once
Harald Hoyer [Fri, 10 Jun 2016 12:34:13 +0000 (14:34 +0200)] 
ifup: setup bridge, bonding and teaming only once

if those assembled interfaces use dhcp "$iface.up" is created too late

7 years agonetwork/net-genrules.sh: generate rules for all interfaces
Harald Hoyer [Fri, 10 Jun 2016 12:32:48 +0000 (14:32 +0200)] 
network/net-genrules.sh: generate rules for all interfaces

previously, if "rd.neednet" and bond was specified, only the bond
interface was configured.

https://bugzilla.redhat.com/show_bug.cgi?id=1282680

7 years agobase/dracut-lib.sh: add trim()
Harald Hoyer [Fri, 10 Jun 2016 12:31:52 +0000 (14:31 +0200)] 
base/dracut-lib.sh: add trim()

trim() to remove leading and trailing whitespace

8 years agonetwork: add 73-idrac.rules udev rules
Harald Hoyer [Wed, 8 Jun 2016 14:19:12 +0000 (16:19 +0200)] 
network: add 73-idrac.rules udev rules

idrac USB devices want a special network name

8 years agomore dash removal
Harald Hoyer [Tue, 1 Mar 2016 12:38:05 +0000 (13:38 +0100)] 
more dash removal

8 years agodracut.spec: add a tag with the current version
Harald Hoyer [Tue, 1 Mar 2016 11:33:28 +0000 (12:33 +0100)] 
dracut.spec: add a tag with the current version

8 years agotest/NBD: add checks for needed binaries
Harald Hoyer [Tue, 1 Mar 2016 11:32:23 +0000 (12:32 +0100)] 
test/NBD: add checks for needed binaries

8 years agotest: remove dash module, as it is not available in RHEL
Harald Hoyer [Tue, 1 Mar 2016 11:32:02 +0000 (12:32 +0100)] 
test: remove dash module, as it is not available in RHEL

8 years agodracut-functions.sh: add str_starts() and str_ends()
Harald Hoyer [Wed, 25 May 2016 12:49:34 +0000 (14:49 +0200)] 
dracut-functions.sh: add str_starts() and str_ends()

8 years agokernel-modules: increase SDHCI driver inclusion
Daniel Drake [Thu, 15 Jan 2015 17:27:47 +0000 (11:27 -0600)] 
kernel-modules: increase SDHCI driver inclusion

The sdhci-pci module is currently not being included in the initramfs,
even though other sdhci modules are. This breaks boot on systems that
rely on this driver to access the root filesystem.

Instead of looking for modules that use sdhci_pltfm_init, look for
sdhci_add_host. I checked 3.18 kernel sources, and this change
does not remove any of the previously-matched SDHCI drivers.
It should result in the addition of sdhci-pci, sdhci-s3c, sdhci-spear
and sdhci-acpi.

(cherry picked from commit 6dcc5e1158bf502b431491a381a16ca894f99ae2)

8 years agoshutdown: guard against read-only /run
Harald Hoyer [Mon, 30 Nov 2015 10:27:03 +0000 (11:27 +0100)] 
shutdown: guard against read-only /run

remount the switch rooted /run writeable again.

(cherry picked from commit 54e09dfb72b557ac8ccd48f5d37089287d272ec7)

8 years ago95iscsi: parse output from iscsiadm correctly
Hannes Reinecke [Thu, 25 Feb 2016 12:58:13 +0000 (20:58 +0800)] 
95iscsi: parse output from iscsiadm correctly

Due to some obsure reason the IFS parameter is not set correctly
when evaluating get_ibft_mod(). So change the parsing to not rely
on IFS altogether.

References: bnc#886199

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
8 years ago95iscsi: More empty cmdline fixes
Hannes Reinecke [Thu, 25 Feb 2016 12:58:12 +0000 (20:58 +0800)] 
95iscsi: More empty cmdline fixes

This fixes up some 95iscsi/module-setup.sh which might print out empty
commandline files.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
8 years ago95iscsi: Fixup bnx2i offload booting
Hannes Reinecke [Thu, 25 Feb 2016 12:58:11 +0000 (20:58 +0800)] 
95iscsi: Fixup bnx2i offload booting

bnx2i is using a separate iSCSI offload engine with a separate
MAC address. As a result, the iBFT information is displaying
a MAC address which does not relate to any MAC address from
the network interfaces.
In addition, the iSCSI offload engine works independently on
the NIC, so we do not need to enable the NIC for iSCSI offload
to work.
This patch modifies the automatic iBFT detection to not set
the 'ip=ibft' flag when bnx2i offload is detected.

References: bnc#855747

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
8 years ago95iscsi: Install libgcc_s library
Hannes Reinecke [Thu, 25 Feb 2016 12:58:10 +0000 (20:58 +0800)] 
95iscsi: Install libgcc_s library

iscsiuio is using pthread, which requires libgcc_s for
pthread_cancel to work.
Without this library iscsiuio will crash with SIGABRT.

References: bnc#881692

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
8 years ago95iscsi: Autodetect iSCSI firmware
Hannes Reinecke [Thu, 25 Feb 2016 12:58:09 +0000 (20:58 +0800)] 
95iscsi: Autodetect iSCSI firmware

Some iSCSI initiator present firmware information in
/sys/firmware/ibft or /sys/firmware/iscsi_bootX

Whenever we detect one of those directories we should assume
that the iSCSI devices should be activated.

Also incorporates SUSE patches:
0049:
95iscsi: Use 'ip=ibft' for ibft autoconfiguration

For iBFT autoconfiguration we should be setting 'ip=ibft'
instead of rd.neednet. This should instruct dracut to only
enable the iBFT interfaces and leave the rest alone.

References: bnc#879038

0054:
95iscsi: update commandline printing

dracut has a separate callout 'cmdline' which should be used
for printing out the generated commandline.

Signed-off-by: Pavel Wieczorkiewicz <pwieczorkiewicz@suse.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
8 years agourl-lib/url-lib.sh:nfs_fetch_url(): pass file directory to query if nfs is already...
Harald Hoyer [Mon, 14 Mar 2016 14:55:03 +0000 (15:55 +0100)] 
url-lib/url-lib.sh:nfs_fetch_url(): pass file directory to query if nfs is already mounted

Otherwise the returned mount path includes the file with the directory

https://bugzilla.redhat.com/show_bug.cgi?id=1302764

8 years agonetwork: if rd.neednet=0 we don't need a bootdev
Harald Hoyer [Tue, 26 Jan 2016 11:26:03 +0000 (12:26 +0100)] 
network: if rd.neednet=0 we don't need a bootdev

otherwise dracut would wait for the bootdev interface to appear and be
setup

(cherry picked from commit f4f8fb5c10cc8d0047123324197aff25f0a63e04)

8 years agonetwork/dhclient-script.sh: add classless-static-routes support
Harald Hoyer [Mon, 29 Feb 2016 13:52:16 +0000 (14:52 +0100)] 
network/dhclient-script.sh: add classless-static-routes support

https://bugzilla.redhat.com/show_bug.cgi?id=1260955

8 years agodocumentation: "--hostonly-i18n" "--no-hostonly-i18n" "i18n_install_all"
Harald Hoyer [Mon, 29 Feb 2016 12:12:02 +0000 (13:12 +0100)] 
documentation: "--hostonly-i18n" "--no-hostonly-i18n" "i18n_install_all"

(cherry picked from commit fe6455a6e8f4b070ffa8116ef26d423a25d56049)

8 years agodracut.sh: for microcode generation, skip gpg files
Harald Hoyer [Wed, 18 Nov 2015 09:58:54 +0000 (10:58 +0100)] 
dracut.sh: for microcode generation, skip gpg files

skip all ".asc" files for the AMD microcode generation

(cherry picked from commit c44d2252bb4b9e72f2b058f8c185698e88dc8374)

8 years agodracut: add "tar" and "dd" requirement
Harald Hoyer [Mon, 29 Feb 2016 10:55:25 +0000 (11:55 +0100)] 
dracut: add "tar" and "dd" requirement

https://bugzilla.redhat.com/show_bug.cgi?id=1285810

8 years agosystemd: add "wheel" and "adm" to passwd and group
Harald Hoyer [Mon, 29 Feb 2016 10:52:37 +0000 (11:52 +0100)] 
systemd: add "wheel" and "adm" to passwd and group

     # LANG=C journalctl -b -u systemd-tmpfiles-setup-dev.service | grep
     # ACL
     Dec 01 13:56:59 localhost.localdomain systemd-tmpfiles[112]: Failed
to parse ACL "d:group:adm:r-x,d:group:wheel:r-x": Invalid argument.
Ignoring
     Dec 01 13:56:59 localhost.localdomain systemd-tmpfiles[112]: Failed
to parse ACL "group:adm:r-x,group:wheel:r-x": Invalid argument. Ignoring
     Dec 01 13:56:59 localhost.localdomain systemd-tmpfiles[112]: Failed
to parse ACL "d:group:adm:r-x,d:group:wheel:r-x": Invalid argument.
Ignoring
     Dec 01 13:56:59 localhost.localdomain systemd-tmpfiles[112]: Failed
to parse ACL "group:adm:r-x,group:wheel:r-x": Invalid argument. Ignoring

     # grep ^[aA] /usr/lib/tmpfiles.d/systemd.conf
     a+ /run/log/journal/%m - - - - d:group:adm:r-x,d:group:wheel:r-x
     A+ /run/log/journal/%m - - - - group:adm:r-x,group:wheel:r-x
     a+ /var/log/journal/%m - - - - d:group:adm:r-x,d:group:wheel:r-x
     A+ /var/log/journal/%m - - - - group:adm:r-x,group:wheel:r-x

https://bugzilla.redhat.com/show_bug.cgi?id=1287537

8 years ago90lvm: Install dm-snapshot module
Thomas Renninger [Thu, 11 Dec 2014 14:46:13 +0000 (15:46 +0100)] 
90lvm: Install dm-snapshot module

bnc#888530

Signed-off-by: Thomas Renninger <trenn@suse.de>
(cherry picked from commit 5c84d51b3f258af9035a4031c6b482103adea4d9)

8 years agomultipath: fix majmin_to_mpath_dev()
Pekka Wallendahl [Mon, 18 Jan 2016 18:28:22 +0000 (20:28 +0200)] 
multipath: fix majmin_to_mpath_dev()

* Multipath device names only start with the mpath-prefix if the option
  use_userfriendly_names is set true in /etc/multipath.conf and if user
  has not set any aliases in the said file. Thus the for-loop should go
  through all files in /dev/mapper/, not just ones starting with 'mpath'

* Bash is perfectly capable to extend `/dev/mapper/*` notation without a
  need to pass it to an external ls

* Changed the function to use a local variable $_dev instead of the
  global $dev, which seemed to be the original intention as the local
  _dev was defined but not used

(cherry picked from commit 28058a2e373eb268d9b1cd5b65c2ad607961dad1)

8 years agodracut-functions.sh:fix check_vol_slaves() volume group name stripping
Harald Hoyer [Mon, 18 Jan 2016 15:59:42 +0000 (16:59 +0100)] 
dracut-functions.sh:fix check_vol_slaves() volume group name stripping

commit 466a59984a095f33993cffd5a3bea40826469b03 removed whitespace
stripping from lvm volume group names.

(cherry picked from commit 2fd8588da51a0e43684852dcdabe327aca684a9f)

8 years agonetwork: fix carrier detection
Harald Hoyer [Mon, 14 Dec 2015 12:10:05 +0000 (13:10 +0100)] 
network: fix carrier detection

rename iface_has_link() to iface_has_carrier() to clarify usage

Only assign static "wildcard interface" settings, if the interface has a
carrier.

If the interface name was specified with a name, do not do carrier
checking for static configurations.

(cherry picked from commit df95b1003c8e7564da73de92403013763eb028fe)

8 years agoiscsi/iscsiroot.sh: better put variables in quotes
Harald Hoyer [Thu, 12 Nov 2015 10:42:13 +0000 (11:42 +0100)] 
iscsi/iscsiroot.sh: better put variables in quotes

first rule for a bash programmer

8 years agoDon't call udevadm control --exit in systemd mode RHEL-7.2
Harald Hoyer [Tue, 17 Jul 2012 11:05:11 +0000 (13:05 +0200)] 
Don't call udevadm control --exit in systemd mode

This partly reverts commit a43f97c4e35d0d9c7e6e315e11c909e86936e1cc.

(cherry picked from commit 765d8408e9aafa45cd89a039f8b41f85191fd91f)

https://bugzilla.redhat.com/show_bug.cgi?id=1276983

8 years agoMerge pull request #98 from lnykryn/RHEL-7-vlan
Harald Hoyer [Wed, 11 Nov 2015 10:44:48 +0000 (11:44 +0100)] 
Merge pull request #98 from lnykryn/RHEL-7-vlan

write-ifcfg: fix creating configuration for VLAN

8 years agoMerge pull request #99 from lnykryn/RHEL-7-ibmvscsi
Harald Hoyer [Wed, 11 Nov 2015 10:44:23 +0000 (11:44 +0100)] 
Merge pull request #99 from lnykryn/RHEL-7-ibmvscsi

90qemu: also add ibmvscsi on qemu

8 years ago90qemu: also add ibmvscsi on qemu 99/head
Lukas Nykryn [Tue, 20 Oct 2015 13:30:12 +0000 (15:30 +0200)] 
90qemu: also add ibmvscsi on qemu

Without this module following scenario does not work:
1. Install the guest with virtio-scsi-pci as system disk and no other
data disk.
2. Change the system disk from virtio-scsi to spapr-vscsi.

8 years agowrite-ifcfg: fix creating configuration for VLAN 98/head
Fedora dracut team [Mon, 19 Oct 2015 16:27:11 +0000 (18:27 +0200)] 
write-ifcfg: fix creating configuration for VLAN

Currently the physdev is unset before it is somehow applied.
Also there is no DEVICE in the output.

8 years agonetwork/ifup.sh: skip empty nameserver values
Harald Hoyer [Fri, 9 Oct 2015 09:35:43 +0000 (11:35 +0200)] 
network/ifup.sh: skip empty nameserver values

8 years agoifcfg/write-ifcfg.sh: don't bind interface, if physical device is set
Harald Hoyer [Fri, 9 Oct 2015 09:31:28 +0000 (11:31 +0200)] 
ifcfg/write-ifcfg.sh: don't bind interface, if physical device is set

If a physical device is defined, we don't need to bind the interface to
the MAC address or something else.

8 years agobase/dracut-lib.sh:getargs() don't return 1 for empty values
Harald Hoyer [Fri, 9 Oct 2015 09:30:03 +0000 (11:30 +0200)] 
base/dracut-lib.sh:getargs() don't return 1 for empty values

getargs() is only used with real values and not booleans.

So, return the values only.

8 years agoifcfg/write-ifcfg.sh: unset vlan
Harald Hoyer [Tue, 21 Apr 2015 08:34:31 +0000 (10:34 +0200)] 
ifcfg/write-ifcfg.sh: unset vlan

clear the vlan flag, if a previous interface in the loop
was a vlan interface

(cherry picked from commit 23446ef1e0a6eda79049a655cb1645691b129645)