Commit Graph

2378 Commits (033-502)

Author SHA1 Message Date
Harald Hoyer f059985b14 network:wait_for_ifup() handle "NO-CARRIER" output
if "NO-CARRIER" is one of the flags, we surely have no link yet.
2015-09-25 12:42:15 -04:00
Harald Hoyer 7fd112f20e iscsi/parse-iscsiroot.sh: correct handling if netroot isn't set
corrects bfe65f913a
2015-09-17 15:41:12 +02:00
Harald Hoyer bcc2132dab scsi/parse-iscsiroot.sh: call modprobe with "-b"
honor, if a module is blacklisted
2015-09-17 12:32:07 +02:00
Harald Hoyer 7c0b1d864d 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 ae488efa5e)
2015-09-14 15:16:18 +02:00
Harald Hoyer fd3eddf069 iscsi/iscsiroot.sh: handle iscsi_firmware in online and timeout queue
The return code of iscsi_firmware is broken, so set the marker
unconditionally.
2015-09-10 13:27:02 +02:00
Harald Hoyer 17cee31b11 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)
2015-09-10 13:23:32 +02:00
Harald Hoyer 7cddfbbadb iscsi/iscsiroot.sh: use all_ifaces_setup()
we want the route and gateway setup
2015-09-10 13:21:53 +02:00
Harald Hoyer 63e75dc4cd 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.
2015-09-10 13:20:18 +02:00
Harald Hoyer 52845b168d network/dhclient-script.sh: fix RENEW
Remove check, if interface is already up. It is for RENEW.

new_prefix is apparently new_subnet_mask
2015-09-08 11:44:13 +02:00
Harald Hoyer b334c83e4a network: move "ip=ibft" handling to network module 2015-09-03 12:41:44 +02:00
Harald Hoyer eb87dc91d0 iscsi/parse-iscsiroot.sh: only set initiator-name, if not empty 2015-09-03 12:41:06 +02:00
Harald Hoyer b813b1b306 livenet/livenetroot.sh: fixed error condition
copy&paste error
2015-09-02 09:47:35 +02:00
Harald Hoyer 2182945a9e qemu: add spapr-vscsi kernel module 2015-09-01 20:27:13 +02:00
Harald Hoyer 7316d68353 network/ifup: do DHCP for BOOTDEV 2015-09-01 19:05:37 +02:00
Harald Hoyer a4c47ce0dd network/net-lib.sh: fix IPv6 route parsing 2015-09-01 17:25:34 +02:00
Harald Hoyer d8572e0bf4 network/net-lib.sh: fix wait_for_if_up()
wait for <*UP*> and not "state UP"

state can be UNKNOWN
2015-09-01 17:23:33 +02:00
Harald Hoyer 70f3c07846 network/ifup: fix warning about not bringing interface up 2015-09-01 17:22:37 +02:00
Harald Hoyer 0852c38b7a cms/cmsifup.sh: do not use ifup -m
we don't want to bring the interface up several times
2015-09-01 17:21:53 +02:00
Harald Hoyer 3d1bd59eb0 multipath: add hostonly multipath.conf
Resolves: rhbz#994702
2015-08-25 13:49:10 +02:00
Harald Hoyer 7c24815034 network/ifup.sh: only use dhcp on unknown interfaces for ip=dhcp 2015-08-25 11:37:16 +02:00
Harald Hoyer 53537f4d23 network: also mark interfaces up with their MAC 2015-08-25 11:30:00 +02:00
Harald Hoyer b4006781e8 network/ifup.sh: save return value of ifup 2015-08-25 11:20:30 +02:00
Harald Hoyer a6befb52eb iscsi/parse-iscsiroot.sh: restart iscsid with try-restart 2015-08-25 11:16:46 +02:00
Harald Hoyer 7f59cbd318 iscsi/parse-iscsiroot.sh: handle firmware in online queue 2015-08-25 11:16:29 +02:00
Harald Hoyer 197e4c90b9 iscsi/parse-iscsiroot.sh: do not modify netroot 2015-08-25 11:15:59 +02:00
Harald Hoyer 3bd3bbec31 iscsi/iscsiroot.sh: handle firmware in online queue
otherwise it does not get called, if no netroot is set
2015-08-25 11:14:38 +02:00
Harald Hoyer d3f61fb5cd initqueue: add online queue 2015-08-25 11:13:23 +02:00
Harald Hoyer b70b81f1c4 crypt/module-setup.sh: fixed parsing crypttab with no ending newline 2015-08-19 16:19:31 +02:00
Harald Hoyer 32770ca79a network/ifup.sh:do_static(): error out, if IP is already assigned 2015-08-19 14:00:28 +02:00
Harald Hoyer 77f46adf5e network/ifup.sh:do_static(): error out, if interface could not be brought up 2015-08-19 13:59:40 +02:00
Harald Hoyer 80153acc0f dmraid: only scan once because of one device 2015-08-18 15:04:31 +02:00
Harald Hoyer d6bfa7052a network/dhclient: exit arping immediatly, if we get an answer 2015-08-18 12:41:12 +02:00
Harald Hoyer 942d60d8af network/net-lib.sh:ibft unset gateway or dns, if set to 0.0.0.0 2015-08-18 12:40:01 +02:00
Harald Hoyer 69c437dd1c fcoe: cleanup lldpad
Resolves: rhbz#1246217
2015-08-18 12:27:32 +02:00
Harald Hoyer 0c0abf97cc udev-rules: install 40-redhat.rules 2015-08-18 12:25:53 +02:00
Harald Hoyer 2eb3b00133 network/parse-ip-opts.sh: bind enx* interface to the MAC
do it automatically for the persistent naming scheme
2015-08-18 12:13:55 +02:00
Harald Hoyer 38180271c5 network/ifup.sh: arping for static IPv4 addresses 2015-08-18 12:07:41 +02:00
Harald Hoyer fb2d643a38 network/ifup.sh: let dhcp client run in the background
we need to renew the lease
2015-08-18 11:55:05 +02:00
Harald Hoyer 93a5a3d3ca systemd/dracut-cmdline.sh: print out cmdline in one line 2015-08-18 11:55:05 +02:00
Harald Hoyer ad565584a3 base/dracut-lib.sh:vinfo/vwarn handle lines without newline 2015-08-18 11:55:05 +02:00
Harald Hoyer bfe65f913a iscsi: handle timeout case better 2015-08-18 11:55:05 +02:00
Harald Hoyer f74b0a9f38 iscsi/module-setup.sh: iscsid need /var/lib/iscsi 2015-08-15 13:22:07 +02:00
Harald Hoyer 88329f6b4f iscsi/iscsiroot.sh: systemd-run does not understand --no-block
not yet on RHEL-7
2015-08-15 13:21:29 +02:00
Harald Hoyer 543a6d5cab iscsi/iscsiroot.sh: handle timeout with all interfaces up
restart iscsid, because it may disbehaved

(cherry picked from commit 6802cf2349)
2015-08-13 15:29:03 +02:00
Harald Hoyer d9b00731c8 iscsi/parse-iscsiroot.sh: use iBFT initiator name
(cherry picked from commit feb8dc685d)
2015-08-13 15:28:54 +02:00
Harald Hoyer e25c3dbb6f iscsi: integrate with systemd and improve robustness
parse-cmdline sets up an initial initiator-name to let iscsid start.

iscsid is started before doing any iscsistart business.

iscsistart is done with systemd-run asynchrone to do things in
paralllel. Also restarted for every new interface which shows up.

If rd.iscsi.waitnet (default) is set, iscsistart is done only
after all interfaces are up.

If not all interfaces are up and rd.iscsi.testroute (default) is set,
the route to a iscsi target IP is checked and skipped, if there is none.

If all things fail, we issue a "dummy" interface iscsiroot to retry
everything in the initqueue/timeout.

(cherry picked from commit d94050ddae)
2015-08-13 15:28:16 +02:00
Harald Hoyer d544733084 network/net-lib.sh: add is_ip()
add function to test if string is a valid IP

(cherry picked from commit 01b23b6900)
2015-08-13 15:25:24 +02:00
Harald Hoyer fc0ead21c9 systemd: add systemd-run and systemd-escape 2015-08-13 15:24:53 +02:00
Harald Hoyer 53ecce179b network/parse-ip-opts.sh: assume rd.neednet for multiple ip options
set rd.neednet on the kernel cmdline to disable this behaviour

(cherry picked from commit 4e9ba952bf)
2015-08-13 15:23:28 +02:00
Harald Hoyer 2bb564073b nfs/parse-nfsroot.sh: silence useless warning if netroot is not nfs
(cherry picked from commit 50e86bf02b)
2015-08-13 15:23:23 +02:00
Harald Hoyer c643f4e8ab dracut-systemd/dracut-initqueue.sh: be verbose about timeout
Issue a warning, if timeout scripts are executed

(cherry picked from commit 8ba684be1c)
2015-08-13 15:23:17 +02:00
Harald Hoyer 89948e58fd crypt: install drbg unconditionally in hostonly mode
older kernels had the drbg kernel module and didn't need it
2015-07-09 16:14:50 +02:00
Harald Hoyer 77ffc465b9 lvm: add cache tools for dm-cache usage
(cherry picked from commit 70598ac292)
2015-07-03 14:40:08 +02:00
Gerd von Egidy 28be8992c3 Add support for ethernet point-to-point connections configured via DHCP
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@intra2net.com>
(cherry picked from commit 99ccbc30df)
2015-07-03 14:37:37 +02:00
Harald Hoyer 968c66b609 network: setup gateway after setting up resolv.conf
If a daemon listens for route changes and wants to use the interface
afterwards, it should be able to resolve DNS

(cherry picked from commit 0b7bfacfea)
2015-07-03 14:36:12 +02:00
Harald Hoyer f11d7a81e2 multipath: install all multipath path selector kernel modules
By default, dracut only builds in dm-service-time into the initramfs as
that is the default multipath.conf path selector. If the user changes
the path selector to "round robin" on the fly and runs dracut, multipath
does not find any paths on boot and the user will be dropped into a
shell.

Apparently, in RHEL7 dracut defaults to "hostonly" mode, i.e. modules
not currently in use at the time dracut runs do not get built into
initramfs. This is definitely one case where this doesn't work. A change
to reconfigure multipath probably should not render the system
unbootable.

https://bugzilla.redhat.com/show_bug.cgi?id=1195392
2015-07-03 14:25:40 +02:00
Harald Hoyer 34b49be882 base/dracut-lib.sh: read /proc/cmdline with multiple lines
also parse cmdline files without an ending newline

(cherry picked from commit 9f0878540b)
2015-07-03 14:17:51 +02:00
Radek Vykydal ccebb4c045 Add rd.live.overlay.size option
(cherry picked from commit 18423f7951)
2015-07-03 14:16:48 +02:00
Harald Hoyer 2af6708641 dmsquash-live: do not abort, if user pressed ESC on checkisomd5
If the user pressed ESC while checkisomd5 runs the media check, it will
exit with "2". Previously that would mean, that the media check was not
successful.

(cherry picked from commit 370035d561)
2015-07-03 14:08:35 +02:00
Colin Guthrie 589b4e61e2 base: Don't wait for swap devices in host-only mode.
The only reason we add swap devices to host-only mode (added in
dd5875499e) is to allow us to process
resume= arguments passed on the kernel command line when the swap
partition lives on something slightly more complex than a normal
partion (e.g. in an LVM or RAID setup).

By adding the device to host_devs, the necessary LVM and RAID hooks
are added and thus the underlying storage will be initialised OK, and
the 95resume module handles the waiting for the device (via udev rules
creating the /dev/resume symlink).

So ultimately, we do not need to hard-code the waiting for the swap
devices into the initramfs at build time as the waiting part can be
dynamic.

This makes things more resiliant to swap partitions disappearing and
being reformatted etc.

Inspired by a patch by Martin Whitaker on Mageia bug:
https://bugs.mageia.org/show_bug.cgi?id=12305

(cherry picked from commit 3e3ed34f03)
2015-07-03 14:06:29 +02:00
Hannes Reinecke 7b3178d9ad 95fcoe-uefi: Test for EFI firmware
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@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
(cherry picked from commit 6755c20855)
2015-07-03 14:04:19 +02:00
Harald Hoyer e5f4bbd804 livenet: don't attempt to download the image for every interface
https://bugzilla.redhat.com/show_bug.cgi?id=1152485
2015-07-03 14:01:01 +02:00
Harald Hoyer 34203d03c0 fcoe/fcoe-edd.sh: cleanup the script
- check if modprobe was successful
- add a timeout for /sys/firmware/edd
- only remove the module, if it was loaded by the script
2015-07-03 13:53:44 +02:00
Chris Leech 4031a2fa64 fcoe: EDD parsing patch for i40e 2015-07-03 13:44:16 +02:00
Chris Leech d02f522089 fcoe: start with fcoemon instead of fipvlan 2015-07-03 13:40:34 +02:00
Harald Hoyer d8ad687e1a network: add options to tweak timeouts
rd.net.dhcp.retry=<cnt>
     If this option is set, dracut will try to connect via dhcp
     <cnt> times before failing. Default is 1.

 rd.net.timeout.dhcp=<arg>
     If this option is set, dhclient is called with "-timeout <arg>".

 rd.net.timeout.iflink=<seconds>
     Wait <seconds> until link shows up. Default is 60 seconds.

 rd.net.timeout.ifup=<seconds>
     Wait <seconds> until link has state "UP". Default is 20 seconds.

 rd.net.timeout.route=<seconds>
     Wait <seconds> until route shows up. Default is 20 seconds.

 rd.net.timeout.ipv6dad=<seconds>
     Wait <seconds> until IPv6 DAD is finished. Default is 50 seconds.

 rd.net.timeout.ipv6auto=<seconds>
     Wait <seconds> until IPv6 automatic addresses are assigned.
     Default is 40 seconds.

 rd.net.timeout.carrier=<seconds>
     Wait <seconds> until carrier is recognized. Default is 5 seconds.
2015-07-03 13:33:27 +02:00
Harald Hoyer b34bd60c3b kernel-modules: install all HID drivers
Instead of hardcoding a list of useful drivers, which has to be curated
all the time, just include all HID drivers.

(cherry picked from commit 180e9d7851)
2015-07-02 19:47:46 +02:00
Harald Hoyer afbff20e51 50drm: add hyperv_fb kernel module
https://bugzilla.redhat.com/show_bug.cgi?id=1192035
(cherry picked from commit 81b67232dc)
2015-07-02 19:47:46 +02:00
Fabian Deutsch 70b7ec9492 dmsquash: Add squashfs support to rd.live.fsimg
Previously rd.live.fsimg only supported filesystems residing in
(compressed) archives.
Now rd.live.fsimg can also be used when a squashfs image is used.
This is achieved by extracting the rootfs image from the squashfs and
then continue with the default routines for rd.live.fsimg.
In addition some code duplication got removed and some documentation
got added.

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
(cherry picked from commit b0472eac11)
2015-07-02 19:47:46 +02:00
Harald Hoyer 23e3c7f95f dmsquash-live: setup the images in /run/initramfs
We want to cleanup / after switch_root. Placing the loop files in /
works, but it is more sane to put them in /run/initramfs

(cherry picked from commit 1f8abe81a9)
2015-07-02 19:47:46 +02:00
Fabian Deutsch db1e692c13 dmsquash: Add rd.live.overlay.thin
This option changes the underlying mechanism for the overlay in the
dmsquash module.
Instead of a plain dm snapshot a dm thin snapshot is used. The advantage
of the thin snapshot is, that the TRIM command is recognized, which
means that at runtime, only the occupied blocks will be claimed from
memory, and freed blocks will really be freed in ram.

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
(cherry picked from commit d6e34d362a)
2015-07-02 19:47:46 +02:00
Major Hayden b9c6d2b2af Adding support for read/write filesystem images
A user can provide a filesystem image (rootfs.img) inside a compressed
tarball and that filesystem image will be mounted read/write.  This provides
some benefits over a device mapper snapshot overlay, especially when the
live system becomes full.  The boot command line simple needs
"rd.writable.fsimg" added to utilize this feature.

Additional documentation for this option as well as other live boot
options is included.

Signed-off-by: Major Hayden <major@mhtx.net>
(cherry picked from commit 504c0a8fec)
2015-07-02 19:47:46 +02:00
Harald Hoyer 4350c73199 nfs/nfs-lib.sh: add anaconda_nfsv6_to_var()
add "nfs:[[2001:0db8:85a3:08d3:1319:8a2e:0370:7344]]/path" style parsing

https://bugzilla.redhat.com/show_bug.cgi?id=1190098
(cherry picked from commit ba665de454)
2015-07-02 19:47:46 +02:00
Harald Hoyer fe15c6b6cb nfs/parse-nfsroot.sh: don't unset netroot, if not nfs
(cherry picked from commit afcc697cb8)
2015-07-02 19:47:46 +02:00
Harald Hoyer 00c118a93a network: don't use "ifup -m"
"ifup -m" was thought to be used by humans in the emergency shell.
Using it programatically shows some other flaw in the execution logic.

Also, "ifup -m" was configuring the interface multiple times on "add"
and "change" uevent, because the "$netif.did-setup" test was not
executed.

(cherry picked from commit 7cca5efdce)
2015-07-02 19:47:46 +02:00
Harald Hoyer 4ec362ce0b network/dhclient-script.sh: make IPv4 DHCP lease time optionally
If bootp is used, no lease time is provided in the packet from the bootp
server.

(cherry picked from commit 0f89ec314b)
2015-07-02 19:47:46 +02:00
Harald Hoyer efe5301ab9 network/dhclient-script.sh: add RENEW/REBIND
(cherry picked from commit cf627b20d0)
2015-07-02 15:16:06 +02:00
Harald Hoyer da3dacfa5e Factor out all the "type -V" commands
Add new functions require_binaries() and require_any_binary() to be used
in the check() section of module-setup.sh.

These functions print a warning line telling the user, which binary is
missing for the specific dracut module.

This unifies the way of checking for binaries and makes the life of an
initramfs creator easier, if he wants to find out why a specific dracut
module is not included in the initramfs.

(cherry picked from commit 30e6e809ed)
2015-07-02 15:16:06 +02:00
Harald Hoyer e2b5b450e7 dracut-lib.sh:info() output info to stderr
otherwise it might collide with stdout redirection

(cherry picked from commit 57fb6e67de)
2015-07-02 15:16:06 +02:00
Harald Hoyer bd98c4def1 crypt: add drbg kernel module 2015-07-02 15:16:06 +02:00
Harald Hoyer 1ad2884d82 dracut-pre-pivot: call udevadm settle one last time
Some Hardware needs initialization and killing modprobe or modprobe
scripts would harm the process.
2015-06-16 13:58:05 +02:00
Harald Hoyer e863891c15 network/net-lib.sh:iface_has_link() wait 5s for the carrier to appear
https://bugzilla.redhat.com/show_bug.cgi?id=1088808
2015-05-07 14:47:58 +02:00
Harald Hoyer 10e5b14705 network:dhcp:wait_for_ipv6_dad() in PREINIT6 2015-05-07 14:42:49 +02:00
Harald Hoyer a503d1dda9 rearrange fips module ordering due to zlib
[    1.220106] alg: pcomp: Failed to load transform for zlib: -2
[    1.221346] alg: pcomp: Failed to load transform for zlib: -2
2015-05-07 14:29:22 +02:00
Harald Hoyer 8f1febc874 fips: add some s390 kernel modules
(cherry picked from commit 822a7ae504)
2015-05-05 18:16:47 +02:00
Harald Hoyer 9eb6db5b9a do not symlink /var/log to /run/log
some programs e.g. systemd-journald expect a directory in /var/log as
the marker to do some actions. Here journald tries to flush
/run/log/journal to /var/log/journal, if the directory is seen.

/var/log is now a symlink to /run/initramfs/log.

(cherry picked from commit 99d4fd6bb7)
2015-04-02 16:11:31 +02:00
Harald Hoyer 3f7d943141 network: do not destroy the team interface on teamd shutdown
when doing switch-root teamd gets killed, which tears down the team
interface, if teamd is not started with "-N".

(cherry picked from commit 2a12e97475)
2015-02-19 12:33:33 +01:00
Harald Hoyer f2558ddcc1 fips: add drbg kernel module
(cherry picked from commit 7e9341434f)
2015-02-19 11:05:59 +01:00
Harald Hoyer b9372137fd network:ifup source team info if present 2015-01-21 13:39:28 +01:00
Harald Hoyer 4f992675ae network/net-lib.sh:parse_iscsi_root(): fix c&p bug
fix iscsi_target_name for eui.* and naa.* target names

(cherry picked from commit 7cddd7b838)
2015-01-15 10:37:56 +01:00
Harald Hoyer 4c88c2859e network: enhance team support
Install ifcfg-* files with team configuration in the initramfs.

Improve the slave configuration of the team interface, by looking up
ifcfg files in the initramfs.

Create a default loadbalance team config, if none present in the
initramfs.
2015-01-14 11:41:21 +01:00
Harald Hoyer 368f08cb7e network: add support for comma separated autoconf options
ip=eth0:auto6,dhcp

might work now
2015-01-14 11:41:21 +01:00
Harald Hoyer 7bbee6ac49 systemd: add 90-vconsole.rules
run systemd-vconsole-setup if fbcon device shows up

(cherry picked from commit 027565d023)
2015-01-13 15:10:35 +01:00
Minfei Huang 0b7fad2837 40network: Fix the syntax to correct the judgment sentence
In the judgment sentence, it will print the following warning message,
becasuse of lacking the blank on the left of ']'.

/lib/net-lib.sh: line 110: [: missing `]'

Signed-off-by: Minfei Huang <mhuang@redhat.com>
(cherry picked from commit c440d302f1)
2015-01-13 12:49:32 +01:00
Harald Hoyer b96ce4a6fd cms/cms-write-ifcfg.sh: turn SUBCHANNELS into lowercase
(cherry picked from commit 3ae03005b8)
2015-01-13 12:48:23 +01:00
Harald Hoyer 509a3b2c33 ssh-client: s/key/$key
GlobalKnownHostsFile was not installed, because key was not $key

Thanks Jan Stodola!

(cherry picked from commit 4ba44e899c)
2015-01-12 14:22:41 +01:00
Harald Hoyer 20700e3dea net-lib.sh:parse_iscsi_root() fix target parsing
For targets with colons in the iSCSI target name:
  "iqn.2000-09.com.foo:storage-system.e2000:00000001cm1p1"

the parser was confused with the optional iscsi_iface_name and
iscsi_netdev_name.

This patch reintroduces the old IQN, EUI and NAA parsing and enhances
the fallback parser by checking the LUN for a numerical value.

(cherry picked from commit 36e8ce4fb0)
2015-01-12 14:11:23 +01:00
Harald Hoyer 8964abbd40 fips: remove c&p "and"
(cherry picked from commit 4089949033)
2015-01-09 14:55:32 +01:00
Harald Hoyer eeb68f0a16 fips: add libfreeblpriv3.so and libfreeblpriv3.chk
(cherry picked from commit 3659d64df3)
2014-11-28 15:42:56 +01:00
Harald Hoyer c4c24171bf ifcfg/write-ifcfg: only write DEVICE for non-kernel names
Rename an interface to the kernel namespace is not allowed, so don't add
DEVICE="<iface>", if HWADDR is given.

(cherry picked from commit 3947f07d93)
2014-10-29 14:07:39 +01:00
Harald Hoyer 0630273048 network/net-lib.sh:is_persistent_ethernet_name() eth* is not
eth* is _not_ a persistent ethernet name... tsk, tsk, tsk

(cherry picked from commit 05065741f0)
2014-10-23 14:38:25 +02:00
Will Woods aa5313ca0e do 'ip route replace default' instead of 'add'
When you define the gateway for an interface, dracut sets it up with:

  ip route add default via $gw dev $netif

If a default route is already set (e.g. if you have multiple NICs), this
will fail with the message "RTNETLINK answers: File exists".

So, if your first NIC isn't usable as a default route

Using "ip route replace default" instead allows ifup/dhclient-script to
correctly change the default route to the new interface.
2014-09-12 10:22:13 +02:00
Harald Hoyer c5c57f3f19 qemu: install virtio_console kernel module
https://bugzilla.redhat.com/show_bug.cgi?id=1097999
(cherry picked from commit 5058ae2d29)
2014-09-12 10:04:30 +02:00
Harald Hoyer b44b3ed036 cms/cmssetup.sh: understand DASD="none"
Treat DASD="none" as unset.

https://bugzilla.redhat.com/show_bug.cgi?id=1096979
(cherry picked from commit 2f954621cc)
2014-09-12 10:00:23 +02:00
Harald Hoyer 49a23aa426 cms/cmssetup.sh: fixed indention
(cherry picked from commit d681635512)
2014-09-12 10:00:19 +02:00
Harald Hoyer efaa5b05df ifcfg/write-ifcfg.sh: bind bond and bridge interfaces to HW
either by s390 SUBCHANNELS or HWADDR, if the interface name is not
persistent.

Previously, this was bound unconditionally with HWADDR.

(cherry picked from commit 80043e21c1)
2014-09-12 09:53:20 +02:00
Alex Harpin 4fa660ba8f bridging: update the ifcfg files generated for bridge slaves
Update the ifcfg files generated for bridge slaves so they reference
the bridge they are part of.  Related to early patch submitted as a
fix for Bug #1123552.

Bug #1123552 https://bugzilla.redhat.com/show_bug.cgi?id=1123552

(cherry picked from commit 32125a976b)
2014-09-12 09:53:13 +02:00
Harald Hoyer 19bb8937ed fixed bridge setup
renamed "ethnames" in bridge.info to "bridgeslaves"

fixed ifcfg generation

(cherry picked from commit 2db6d71118)
2014-09-12 09:53:04 +02:00
Brian C. Lane 17c1f640fa Support spaces in mount_nfs (#1109933)
nfs paths may contain spaces, make sure they are preserved when passed
to nfs_to_var and mount.

Related: rhbz#1109933
(cherry picked from commit 7e692cfd43)
2014-09-10 11:09:07 +02:00
Harald Hoyer f86fa29cda network/net-lib.sh:parse_iscsi_root() do not enforce target name
https://bugzilla.redhat.com/show_bug.cgi?id=1078867

cherry-picked from 29763cb72d
2014-09-09 13:33:16 +02:00
Harald Hoyer 5648ff27e2 Do not reload systemd with wait_for_dev 2014-08-29 14:15:18 +02:00
Harald Hoyer 8715aa00a9 dracut-lib.sh:cancel_wait_for_dev() fixed double escape 2014-08-29 14:14:59 +02:00
Harald Hoyer 828fd83bc1 ssh-client: handle /etc/ssh/ssh_config
- disable ProxyCommand
- install the GlobalKnownHostsFile

https://bugzilla.redhat.com/show_bug.cgi?id=1086778
2014-08-29 14:14:10 +02:00
Harald Hoyer 2a1bdab6e8 udev-rules: add uaccess and seat rules
plymouth needs the seat rules, also without systemd
2014-07-29 14:39:38 +02:00
Harald Hoyer c504204de5 network: add rd.route parameter
(cherry picked from commit 7b46244bb9)
2014-07-29 12:06:48 +02:00
Harald Hoyer e502fd3099 base/dracut-lib:pidof() turn off debugging
(cherry picked from commit ad8638e04e)
2014-07-29 12:06:46 +02:00
Peter Robinson 1e9926c12d ARM: update modules for ARM host only options
(cherry picked from commit 611c895772)
2014-07-29 12:06:42 +02:00
Praveen_Paladugu@Dell.com 7b8f2e7a7b Installing an OS with VLAN enabled to an ISCSI LUN (from ibft)
When installing OS to a VLAN enabled iscsi LUN (extracted from iBFT), "/tmp/net.{xyz}.has_ibft_config" is not being set properly.

Then anaconda installer requires 'BOOTPROTO="ibft"' populated in ifcfg of the vlan interface (ex: ibft0.20), for it to properly populate the kernel parameters post installation. The setting 'BOOTPROTO="ibft"' is populated by write-ifcfg.sh script only if the corresponding interface has a file /tmp/net.{xyz}.has_inft_config

To get around this issue, in ibft_to_cmdline() function in net-lib.sh file, I made the following changes to populate the has_ibft_config file for the vlan interface(ex: ibft0.20):

(cherry picked from commit f4eb0d9804)
2014-07-29 12:06:32 +02:00
Harald Hoyer 0c81abbe79 lvm:module-setup.sh: check for existance of 69-dm-lvm-metad.rules
fixup for 12819a5799

(cherry picked from commit fecc1d69e5)
2014-07-29 12:06:09 +02:00
Harald Hoyer b201a3f405 ifcfg: depends on network
(cherry picked from commit f1a38e5294)
2014-07-29 12:05:42 +02:00
Harald Hoyer ef6665ec41 base/init.sh: use loop counter with unique varname
$i can be polluted too easily

(cherry picked from commit 6525182bfc)
2014-07-29 12:05:38 +02:00
Harald Hoyer 9c2daa5d3a Add "rd.cmdline=ask" kernel command line parameter
prompts the user for additional kernel command line parameters

(cherry picked from commit f232f6623d)

Conflicts:
	dracut.cmdline.7.asc
	modules.d/98systemd/dracut-cmdline.sh
	modules.d/99base/init.sh
2014-07-29 12:04:22 +02:00
Harald Hoyer f679f53b2a kernel-modules: add tegra arm modules
(cherry picked from commit 54483dd773)
2014-07-29 12:02:25 +02:00
Harald Hoyer 6a9d47ce27 print out, what kernel command line parameters are used
(cherry picked from commit fbc4620f05)

Conflicts:
	modules.d/98systemd/dracut-cmdline.sh
2014-07-29 12:02:06 +02:00
Harald Hoyer 49fe9bc014 usable_root(): only check for ld-*.so
current systemd allows booting with only /usr on the root partition

see, if we can find an elf loader

(cherry picked from commit 7e59d55042)
2014-07-29 12:01:33 +02:00
Daniel Schaal 8c1807bc97 98systemd: also install systemd-journald-dev-log.socket
The /dev/log socket was moved to /run on systemd 214, install the
newly added socket unit.

(cherry picked from commit 7eb0bc7bc4)
2014-07-29 12:01:04 +02:00
Cristian Rodríguez 7cab5fbf59 systemd: Optionally, include efivarsfs module
It is, however not an error if this module can't be found.

(cherry picked from commit f46c2fff71)
2014-07-29 12:00:58 +02:00
Harald Hoyer 6db59a1630 deprecate "ip=ibft" kernel command line parameter
rd.iscsi.ibft[=1] should be used instead.

Thing is, 'ip=ibft' is not really an ip setting, but rather a marker
that iBFT should be evaluated.

Also removed the trigger of the warning:
"Warning: Please supply bootdev argument for multiple ip= lines"

(cherry picked from commit 5580e4c176)
2014-07-29 12:00:51 +02:00
Harald Hoyer 98b104e887 iscsi: correctly install the settled iscsiroot dummy call
initqueue parses $1 as the executable command

(cherry picked from commit bb8c16d121)
2014-07-29 12:00:45 +02:00
Harald Hoyer b66bfd5b98 iscsi: correctly install the timeout iscsiroot dummy call
initqueue parses $1 as the executable command

(cherry picked from commit 486a8f33e2)
2014-07-29 12:00:42 +02:00
Vasiliy Tolstov 962bb11663 network/ifup.sh: Don't try to modprobe ipv6, if already available
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>

[Edited-by: Harald Hoyer]
Simplified logic.

(cherry picked from commit 28f3f537c4)
2014-07-29 12:00:37 +02:00
Alex Harpin 5f5c07eca2 bonding: use hwaddr of the slave rather than the master
When a bonded interface is brought up, any slaves included in the bond
have their hardware address set to that of the bond master.  Although
this allows an interface to be brought up on start up, when the
configuration file is imported into the booted system it prevents
the bonded interface being successfully restarted.

The fix involves obtaining the hardware address of the slaves before
they are added to the bond and then using this value in the
configuration file.

(cherry picked from commit 83c9ff7dbb)
2014-07-29 12:00:33 +02:00
Peter Robinson 9c45cb9c11 kernel-modules: Fix storage module selection for sdhci/mmc/ahci
Currently the block driver detection for generic initrd doesn't include
the SD/MMC drivers so we fail to boot generic images on any device using
those platforms as boot devices when using a generic initrd. Add logic
to detect those modules. This primarily fixes embedded ARM devices but
also likely intel tablets/dev boards and enterprise hypervisors that
have the ability to boot from SD.

Also the ahci_init_controller misses a number of drivers that use the
libahci_platform module for the init so this fixes some missing achi
moduless too.

Finally it cleans up the ARM storage module hacks that the above now
deals with in a more generic manner.

Signed-off-by: <pbrobinson@gmail.com>
(cherry picked from commit 827ec27a9c)
2014-07-29 12:00:29 +02:00
WANG Chao 2fed6038bb dracut-pre-pivot pulls in remote-fs.target
It turns out that commit f30b74e (dracut-initqueue service runs before
remote-fs-pre.target) is partial fix for remote fs mounts. Because no
one pulls in remote-fs.target, we can never start remote fs mounts.
Now pull in remote-fs.target in dracut-pre-pivot.

Signed-off-by: WANG Chao <chaowang@redhat.com>
(cherry picked from commit ce7f408dfd)
2014-07-29 12:00:25 +02:00
Hannes Reinecke e23057d537 98systemd: fixup rootfs-generator installation path
The rootfs-generator was installed in the wrong path
in the initrd, cause it never to be run.

References: bnc#878714

Signed-off-by: Hannes Reinecke <hare@suse.de>
(cherry picked from commit ed2005fa5b)
2014-07-29 12:00:06 +02:00
Harald Hoyer e92a7a2532 fcoe-uefi/parse-uefifcoe.sh: fixed parameter generation from UEFI
"fcoe=" was missing for the parameter specifying the interface

(cherry picked from commit 1427102692)
2014-07-29 11:59:56 +02:00
Harald Hoyer 1175816c30 nbd/nbdroot.sh: call nbd-client with "--systemd-mark"
otherwise nbd-client will get killed by systemd

(cherry picked from commit 056a3f2427)
2014-07-29 11:59:52 +02:00
Harald Hoyer 2a20064e44 ifcfg/write-ifcfg.sh: include net-lib.sh
otherwise is_persistent_ethernet_name() is missing

(cherry picked from commit 8fa1afb65c)
2014-07-29 11:59:49 +02:00
Harald Hoyer ec158d758b mdraid/module-setup.sh: fixed print-cmdline for empty UUID
fixes

/usr/lib/dracut/modules.d/90mdraid/module-setup.sh: line 60:
_activated["${UUID}"]: bad array subscript

Thanks to Jan ONDREJ for spotting this!

(cherry picked from commit 19bb14c346)
2014-07-29 11:59:46 +02:00
Harald Hoyer 705c84321d cms/cmssetup.sh: convert SUBCHANNELS to lowercase
In udev rules, the channels need to be expressed in lower case.

(cherry picked from commit 56d57a70ec)
2014-07-29 11:59:40 +02:00
Harald Hoyer d38488e8d5 ifcfg/write-ifcfg.sh: "IPV6INIT=yes" check also for non-dhcp
(cherry picked from commit 1230f3bcff)
2014-07-29 11:59:36 +02:00
Harald Hoyer e5f6899a55 dracut-lib.sh: fixed return value of pidof()
pidof always returned with 0, so any "while pidof" loop would not
terminate.

Thanks "Consus" for the hint!

(cherry picked from commit 4e58a1ffc7)
2014-07-29 11:59:29 +02:00
Harald Hoyer 0506080aee ifcfg: only bind to HWADDR, if addr_assign_type == 0
/sys/class/net/$netif/addr_assign_type is != 0 for random MAC address
interfaces

(cherry picked from commit 2e094b20a6)
2014-07-29 11:58:25 +02:00
Harald Hoyer b990775b6f ifcfg: do not bind persistent interface names to HWADDR
(cherry picked from commit fb0e5184a6)
2014-07-29 11:58:19 +02:00
WANG Chao 251d5b65e3 dracut-initqueue service runs before remote-fs-pre.target
With the following commit, dracut doesn't mount anything from /etc/fstab

commit e920bfb
Author: WANG Chao <chaowang@redhat.com>
Date:   Tue Apr 1 15:20:49 2014 +0800

    fstab: do not mount and fsck from fstab if using systemd

But systemd doesn't mount nfs at all, because no unit is pulling in
remote-fs.target.

dracut must pull in these remote fs mount and all these remote mounts
should start only after network is up (ie. after dracut-initqueue).

Signed-off-by: WANG Chao <chaowang@redhat.com>
(cherry picked from commit b31250e7e6)
2014-07-29 11:58:13 +02:00
Harald Hoyer 915618bc4f lvm:module-setup.sh: check for existance of 69-dm-lvm-metad.rules
Before modifying 69-dm-lvm-metad.rules, we should check for the
existance first. Otherwise this results in error messages on
distributions (debian), which do not ship these rules.

(cherry picked from commit 12819a5799)
2014-07-29 11:57:48 +02:00
WANG Chao f077a20056 fstab: do not mount and fsck from fstab if using systemd
If using systemd in initramfs, we could run into a race condition when
dracut and systemd both are trying to mount and run fsck for the same
filesystem, and mount or fsck could be a failure.

To fix such failure, we should use systemd to mount/fsck from /etc/fstab
only.

v2: check $DRACUT_SYSTEMD suggested by Alexander Tsoy

Signed-off-by: WANG Chao <chaowang@redhat.com>
(cherry picked from commit e920bfb1e8)
2014-07-29 11:54:47 +02:00
Harald Hoyer f1ea5376ed ifcfg/write-ifcfg.sh: turn on IPV6INIT, if any inet6 address is found
If "ip -6 addr" finds any inet6 address, assume IPV6INIT=yes for the
ifcfg file.
2014-07-29 11:52:07 +02:00
Harald Hoyer 4b07c26d33 fs-lib: always install fsck.$fs, if present 2014-07-29 11:52:07 +02:00
Harald Hoyer 4c2d48d5c4 fcoe: workaround fcoe timing issues 2014-07-29 11:52:07 +02:00