Commit Graph

3925 Commits

Author SHA1 Message Date
Chapman Flack
2c19a5fa78 Specify strstr tightly, add strglob/strglobin.
By convention, strstr should be a literal string match. Previously, it
would match as a glob pattern. Some code used that, so add new
functions strglob and strglobin to do what that code expects, and
specify them tightly too. strglob tests whether the glob pattern
matches the entire string (the name strglob is also used in the yorick
language, and that's what it does there), while strglobin tests whether
the glob pattern matches anywhere in the string.

Also tightens str_starts, str_ends, and str_replace to deal with
literal strings only. In a quick grep I did not find code that depended
on these functions matching globs.

Changes the call sites where strstr was used with glob patterns to use
strglobin or strglob as the intention seemed to be (or, in one case,
strstr with the * removed as it did not affect the result anyway).
2014-04-07 10:49:07 +02:00
Harald Hoyer
2e094b20a6 ifcfg: only bind to HWADDR, if addr_assign_type == 0
/sys/class/net/$netif/addr_assign_type is != 0 for random MAC address
interfaces
2014-04-04 12:52:39 +02:00
Harald Hoyer
fb0e5184a6 ifcfg: do not bind persistent interface names to HWADDR 2014-04-04 12:48:32 +02:00
Harald Hoyer
100d575ec9 fs-lib: always install fsck.$fs, if present 2014-04-04 11:34:10 +02:00
WANG Chao
b31250e7e6 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>
2014-04-03 09:51:43 +02:00
Chapman Flack
ddfea6b54c Break at switch_root only for bare rd.break
Previously, any rd.break=breakpoint would cause a break at the
given breakpoint and also at switch_root.
2014-04-03 08:56:52 +02:00
Harald Hoyer
12819a5799 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.
2014-04-03 08:54:27 +02:00
Harald Hoyer
d4dd3521bb 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-04-03 08:53:09 +02:00
WANG Chao
e920bfb1e8 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>
2014-04-02 09:58:52 +02:00
Harald Hoyer
3c530fc528 fcoe: workaround fcoe timing issues 2014-04-02 09:58:12 +02:00
Harald Hoyer
37502d2733 dm: add dm-cache modules
https://bugzilla.redhat.com/show_bug.cgi?id=1081435
2014-04-02 09:58:11 +02:00
Harald Hoyer
ebe7411691 network: DCHPv6: set valid_lft and preferred_lft
https://bugzilla.redhat.com/show_bug.cgi?id=1064365
2014-04-02 09:58:11 +02:00
Harald Hoyer
fd9f902477 lsinitrd.sh: prevent < <$() construct
Running dracut in a chroot environment, which has /dev not correctly
setup will result in errors like:

/usr/bin/lsinitrd: line 164: /dev/fd/62: No such file or directory
cpio: Malformed number �5�OK��
cpio: Malformed number 5�OK��
cpio: Malformed number �OK��

This is because bash wants /dev/fd/<num> for constructs like:
foo < <$(bar)
2014-04-01 08:21:49 +02:00
Harald Hoyer
2c7f7a337a network: handle "ip=dhcp6" for all interfaces
https://bugzilla.redhat.com/show_bug.cgi?id=1064365
2014-03-25 16:06:53 +01:00
Harald Hoyer
3aaf6ccc83 fcoe: wait for lldpad to be ready 2014-03-25 15:31:00 +01:00
Harald Hoyer
a9f4b9cdb0 systemd: add systemd-gpt-auto-generator 2014-03-20 13:42:08 +01:00
Harald Hoyer
0626cbe923 dracut-initramfs-restore: fix unpacking with early microcode 2014-03-20 13:18:13 +01:00
Harald Hoyer
96087189e6 NEWS: update for 037 2014-03-19 17:16:08 +01:00
Harald Hoyer
51160a47b1 systemd/dracut-shutdown.service: make failure non-fatal 2014-03-18 13:33:55 +01:00
Harald Hoyer
68dc90c6e9 shutdown: if kexec failed, do a simple reboot 2014-03-18 13:21:22 +01:00
Harald Hoyer
a9d30a4066 network:dhclient-script do PREINIT6 for DHCP6 2014-03-17 13:00:17 +01:00
Harald Hoyer
0cb42c27f9 lvm:lvm_scan.sh handle one LV at a time with lvchange 2014-03-11 12:16:14 +01:00
Harald Hoyer
2bdf760fe0 NEWS: update for dracut-037 2014-03-06 09:55:19 +01:00
Harald Hoyer
ce4167060c AUTHORS: update 2014-03-06 09:55:19 +01:00
Harald Hoyer
ee4b74fb9c Do not wait_for_dev if hostonly_cmdline not set 2014-03-06 09:55:19 +01:00
Harald Hoyer
f60b7d8655 fcoe-up: remove initlog logic 2014-03-05 13:21:25 +01:00
Harald Hoyer
99edb47e85 default conf: set hostonly_cmdline == "no" 2014-03-05 12:33:40 +01:00
Harald Hoyer
8ee1825364 dracut: don't let devices timeout
https://bugzilla.redhat.com/show_bug.cgi?id=949697
2014-03-05 12:32:10 +01:00
Harald Hoyer
83a3cba777 dracut-functions.sh: degrade info about missing binaries to info 2014-03-05 12:23:49 +01:00
Alexander Tsoy
cd501ff74b udev-rules: add 80-net-setup-link.rules and .link files
With systemd >= 209 these file are required for predictable network interface
names
2014-03-05 10:40:22 +01:00
WANG Chao
646e0506f6 Add -[-no]-hostonly-cmdline option handling for getopt
commit ab9457e introduce such new options but it missed to add these
options to getopt arguments.

Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-03-03 12:41:28 +01:00
Harald Hoyer
3a62030116 test/TEST-50-MULTINIC/client-init.sh: skip MAC marker files 2014-02-28 13:26:13 +01:00
Harald Hoyer
be1c0381e5 test/Makefile: add SKIP env to skip certain tests 2014-02-28 13:25:39 +01:00
Harald Hoyer
6fe0abbf12 test: add missing Makefile.testdir 2014-02-28 12:57:57 +01:00
Dave Young
5f6a495bf4 add default values in fstab_lines
It's useful for passing a full fstab line including like fs_passno so fsck
can take effect.

Previously it's assumed that there's no fs_freq and fs_passno in fstab lines
so original code just append "0 0" at the end of each fstab lines.

Improve this issue by assign default value in case they are not passed in.
Three field are handled here:
fs_mntops: default to "defaults"
fs_freq: default to "0"
fs_passno: default to "2"

Signed-off-by: Dave Young <dyoung@redhat.com>
2014-02-28 12:10:47 +01:00
Harald Hoyer
1f680ccc9b systemd: add systemd-sysctl service
https://bugzilla.redhat.com/show_bug.cgi?id=1070086
2014-02-28 12:10:45 +01:00
Harald Hoyer
43a85a7365 network: merge setup_net_$netif.ok and net.$netif.did-setup
one marker per interface is enough
2014-02-28 12:10:41 +01:00
Harald Hoyer
61b4afb424 network: IPv6 status, wait for tentative flag to be cleared
also do not arping the IPv6 address.
2014-02-27 12:13:18 +01:00
Harald Hoyer
2ac599dc75 network/dhclient-script.sh:DHCP IPv6 interface setup
configure IPv6 interface for DHCP6

https://bugzilla.redhat.com/show_bug.cgi?id=1064365
2014-02-26 15:02:51 +01:00
Harald Hoyer
7f70f81153 network/net-lib.sh:wait_for_ipv6_auto() also wait for the tentative flag
Wait until the tentative flag is cleared.

https://bugzilla.redhat.com/show_bug.cgi?id=1069263
2014-02-26 15:02:48 +01:00
Harald Hoyer
79b3c8bfa1 ifcfg/write-ifcfg.sh: do not bind s390 to MAC if SUBCHANNELS set
If SUBCHANNELS are set, do not specify HWADDR, because the SUBCHANNELS
are the identifier for the interface.

https://bugzilla.redhat.com/show_bug.cgi?id=1056438
2014-02-26 15:02:46 +01:00
Harald Hoyer
fa795f29e2 systemd/rootfs-generator.sh: generate units in /run/systemd/generator
Generate the units in /run/systemd/generator, so they are picked up by
systemd.

https://bugzilla.redhat.com/show_bug.cgi?id=1069133
https://bugzilla.redhat.com/show_bug.cgi?id=949697
2014-02-26 15:02:42 +01:00
Harald Hoyer
ab9457efd7 Add flag to toggle hostonly cmdline storing in the initramfs
--hostonly-cmdline:
    Store kernel command line arguments needed in the initramfs

--no-hostonly-cmdline:
    Do not store kernel command line arguments needed in the initramfs
2014-02-26 15:01:55 +01:00
Harald Hoyer
103c5e1ecb systemd: add 70-uaccess.rules 2014-02-26 14:56:28 +01:00
Amadeusz Żołnowski
4eec1a2276 Added missing quotes
See bug report at https://bugs.gentoo.org/show_bug.cgi?id=502064
2014-02-26 14:55:54 +01:00
Alexander Tsoy
8a2db478de Add legacy flag (-l) to lz4 and update magic number
Linux kernel does not support the new default lz4 format.

https://bugs.gentoo.org/show_bug.cgi?id=502102
2014-02-26 14:55:54 +01:00
sfalken@opensuse.org
6e53596cec Patch for Manpage
Patch corrects grub paths in the manpage for both GRUB legacy and GRUB2
2014-02-26 14:55:54 +01:00
Harald Hoyer
dc4c1ee39d dracut.sh: write directly to the output file
Because we already remove the output file before writing to it, we don't
have to play games and write to a temporary file first.
2014-02-19 15:22:39 +01:00
Harald Hoyer
d1c4e5c521 fcoe-uefi: try all FcoeBootDevice-* variables for a DevicePath
try to read the DevicePath from all FcoeBootDevice-* UEFI variables
until one has a MAC.
2014-02-19 15:20:34 +01:00
Harald Hoyer
a324c2111e iscsi: for iBFT read the initiator-name from the correct file
/sys/firmware/ibft/initiator-name should be
/sys/firmware/ibft/initiator/initiator-name

https://github.com/haraldh/dracut/issues/12
2014-02-19 11:49:34 +01:00