]> git.ipfire.org Git - thirdparty/dracut.git/log
thirdparty/dracut.git
9 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)

9 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

9 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

9 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.

9 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

9 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)

9 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)

9 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

9 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)

9 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

9 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

9 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

9 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

9 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

9 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]

9 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)

9 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)

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

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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)

9 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

9 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

9 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

9 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

9 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

9 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)

9 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

9 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

9 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

9 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

9 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

9 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

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

9 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

9 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

9 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

9 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()

9 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)

9 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)

9 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>
9 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>
9 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>
9 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>
9 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>
9 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

9 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)

9 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

9 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)

9 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)

9 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

9 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

9 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)

9 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)

9 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)

9 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)

9 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

9 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

9 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

9 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

9 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.

9 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.

9 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

9 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.

9 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.

9 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)

9 years ago90qemu: fixed systemd-detect-virt output parsing
Harald Hoyer [Fri, 31 Jul 2015 07:05:51 +0000 (09:05 +0200)] 
90qemu: fixed systemd-detect-virt output parsing

redirecting systemd-detect-virt to /dev/null doesn't help with parsing
the output :-/

Also, add "Red Hat" as a vendor.

(cherry picked from commit 4135eea634b20c7f7285d134bd6dfe6b799fe226)

9 years agodracut.sh: fixed typo in microcode generation
Harald Hoyer [Fri, 25 Sep 2015 18:10:20 +0000 (14:10 -0400)] 
dracut.sh: fixed typo in microcode generation

9 years agodracut-functions.sh: avoid tokenizing ldconfig output with 'read'
Lubomir Rintel [Tue, 23 Dec 2014 21:03:10 +0000 (22:03 +0100)] 
dracut-functions.sh: avoid tokenizing ldconfig output with 'read'

The space does not separate the elements reliably, spaces can be
embedded in parenthesized expressions too:

  libgmpxx.so.4 (libc6, hwcap: 0x0000000004000000) => /lib/sse2/libgmpxx.so.4
  libgmp.so.10 (libc6, hwcap: 0x0000000004000000) => /lib/sse2/libgmp.so.10

This results in dracut creating '0x0000000004000000' and '=>'
directories in the initramfs image.

(cherry picked from commit c59779cf9337bc0fc48c7a4d8437f7253f6822c3)

9 years agobase/dracut-lib.sh:info() be more quiet
Harald Hoyer [Fri, 25 Sep 2015 15:07:07 +0000 (11:07 -0400)] 
base/dracut-lib.sh:info() be more quiet

9 years agonetwork:wait_for_ifup() handle "NO-CARRIER" output
Harald Hoyer [Fri, 25 Sep 2015 14:14:33 +0000 (10:14 -0400)] 
network:wait_for_ifup() handle "NO-CARRIER" output

if "NO-CARRIER" is one of the flags, we surely have no link yet.

9 years agodracut.sh: no microcode, if get_ucode_file returns empty file
Harald Hoyer [Thu, 17 Sep 2015 18:03:54 +0000 (20:03 +0200)] 
dracut.sh: no microcode, if get_ucode_file returns empty file

check, if get_ucode_file() returned an empty string.

9 years agoiscsi/parse-iscsiroot.sh: correct handling if netroot isn't set
Harald Hoyer [Thu, 17 Sep 2015 13:41:12 +0000 (15:41 +0200)] 
iscsi/parse-iscsiroot.sh: correct handling if netroot isn't set

corrects bfe65f913a4bc6bc5fdb7aa75234c229a2ceef8f

9 years agoscsi/parse-iscsiroot.sh: call modprobe with "-b"
Harald Hoyer [Thu, 17 Sep 2015 10:32:07 +0000 (12:32 +0200)] 
scsi/parse-iscsiroot.sh: call modprobe with "-b"

honor, if a module is blacklisted

9 years agodracut.sh: do not create microcode, if no firmware is available
Harald Hoyer [Tue, 15 Sep 2015 14:08:25 +0000 (16:08 +0200)] 
dracut.sh: do not create microcode, if no firmware is available

9 years agodracut.sh: add command line option for install_i18_all
Harald Hoyer [Tue, 15 Sep 2015 14:04:09 +0000 (16:04 +0200)] 
dracut.sh: add command line option for install_i18_all

--no-hostonly-i18n -> install_i18n_all=yes
--hostonly-i18n -> install_i18n_all=no

9 years agoi18n: check for $i18n_install_all == "yes" rather than being set
Harald Hoyer [Thu, 14 Aug 2014 10:56:53 +0000 (12:56 +0200)] 
i18n: check for $i18n_install_all == "yes" rather than being set

i18n_install_all="no" does not have the expected effect without this
patch

(cherry picked from commit ae488efa5e6103ffc1be8b8782f8a1c7a5aa90b4)

9 years agoiscsi/iscsiroot.sh: handle iscsi_firmware in online and timeout queue
Harald Hoyer [Thu, 10 Sep 2015 11:25:13 +0000 (13:25 +0200)] 
iscsi/iscsiroot.sh: handle iscsi_firmware in online and timeout queue

The return code of iscsi_firmware is broken, so set the marker
unconditionally.

9 years agonetwork/netroot.sh: better handling of $netroot and dhcp
Harald Hoyer [Thu, 10 Sep 2015 11:23:32 +0000 (13:23 +0200)] 
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)

9 years agoiscsi/iscsiroot.sh: use all_ifaces_setup()
Harald Hoyer [Thu, 10 Sep 2015 11:21:53 +0000 (13:21 +0200)] 
iscsi/iscsiroot.sh: use all_ifaces_setup()

we want the route and gateway setup

9 years agonetwork: add all_ifaces_setup()
Harald Hoyer [Thu, 10 Sep 2015 11:20:18 +0000 (13:20 +0200)] 
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.

9 years agonetwork/dhclient-script.sh: fix RENEW
Harald Hoyer [Tue, 8 Sep 2015 09:44:13 +0000 (11:44 +0200)] 
network/dhclient-script.sh: fix RENEW

Remove check, if interface is already up. It is for RENEW.

new_prefix is apparently new_subnet_mask

9 years agodracut.usage.asc: update man page
Harald Hoyer [Thu, 3 Sep 2015 14:25:23 +0000 (16:25 +0200)] 
dracut.usage.asc: update man page

- clarify grub2 config for debugging
- clarify hostonly mode

9 years agonetwork: move "ip=ibft" handling to network module
Harald Hoyer [Thu, 3 Sep 2015 10:41:44 +0000 (12:41 +0200)] 
network: move "ip=ibft" handling to network module

9 years agoiscsi/parse-iscsiroot.sh: only set initiator-name, if not empty
Harald Hoyer [Thu, 3 Sep 2015 10:41:06 +0000 (12:41 +0200)] 
iscsi/parse-iscsiroot.sh: only set initiator-name, if not empty

9 years agolivenet/livenetroot.sh: fixed error condition
Harald Hoyer [Wed, 2 Sep 2015 07:47:35 +0000 (09:47 +0200)] 
livenet/livenetroot.sh: fixed error condition

copy&paste error

9 years agoqemu: add spapr-vscsi kernel module
Harald Hoyer [Tue, 1 Sep 2015 18:27:13 +0000 (20:27 +0200)] 
qemu: add spapr-vscsi kernel module

9 years agonetwork/ifup: do DHCP for BOOTDEV
Harald Hoyer [Tue, 1 Sep 2015 17:05:37 +0000 (19:05 +0200)] 
network/ifup: do DHCP for BOOTDEV

9 years agonetwork/net-lib.sh: fix IPv6 route parsing
Harald Hoyer [Tue, 1 Sep 2015 15:25:34 +0000 (17:25 +0200)] 
network/net-lib.sh: fix IPv6 route parsing

9 years agonetwork/net-lib.sh: fix wait_for_if_up()
Harald Hoyer [Tue, 1 Sep 2015 15:22:56 +0000 (17:22 +0200)] 
network/net-lib.sh: fix wait_for_if_up()

wait for <*UP*> and not "state UP"

state can be UNKNOWN

9 years agonetwork/ifup: fix warning about not bringing interface up
Harald Hoyer [Tue, 1 Sep 2015 15:22:37 +0000 (17:22 +0200)] 
network/ifup: fix warning about not bringing interface up

9 years agocms/cmsifup.sh: do not use ifup -m
Harald Hoyer [Tue, 1 Sep 2015 15:21:53 +0000 (17:21 +0200)] 
cms/cmsifup.sh: do not use ifup -m

we don't want to bring the interface up several times

9 years agomultipath: add hostonly multipath.conf
Harald Hoyer [Tue, 25 Aug 2015 11:49:10 +0000 (13:49 +0200)] 
multipath: add hostonly multipath.conf

Resolves: rhbz#994702

9 years agonetwork/ifup.sh: only use dhcp on unknown interfaces for ip=dhcp
Harald Hoyer [Tue, 25 Aug 2015 09:37:16 +0000 (11:37 +0200)] 
network/ifup.sh: only use dhcp on unknown interfaces for ip=dhcp

9 years agonetwork: also mark interfaces up with their MAC
Harald Hoyer [Tue, 25 Aug 2015 09:30:00 +0000 (11:30 +0200)] 
network: also mark interfaces up with their MAC