Commit Graph

15 Commits (master)

Author SHA1 Message Date
Thomas Blume 5925266832 fix(zfcp_rules): correct udev zfcp rules parsing 2022-02-12 08:19:07 +00:00
Thomas Blume f905c3a72c fix(s390_rules): drop collect installation
/usr/lib/udev/collect has been removed from udev-v246, so remove it
from the initrd too
2021-11-22 18:09:55 +00:00
Harald Hoyer 7c77835cd6 fix(zfcp_rules): require bash 2021-03-30 17:55:15 +02:00
Harald Hoyer 032ecd95c9 fix(zfcp_rules): shellcheck for modules.d/95zfcp_rules 2021-03-29 11:31:31 +02:00
Harald Hoyer 75d758e8f1 style: shfmt -s reformat
reproducible with:

```
$ shfmt_version=3.0.1
$ wget "https://github.com/mvdan/sh/releases/download/v${shfmt_version}/shfmt_v${shfmt_version}_linux_amd64" -O shfmt
$ chmod u+x shfmt
$ ./shfmt -w -s .
```
2021-03-13 20:10:43 +01:00
Harald Hoyer 9a52c3fdb0 style: shfmt reformat
reproducible with:

```
$ shfmt_version=3.0.1
$ wget "https://github.com/mvdan/sh/releases/download/v${shfmt_version}/shfmt_v${shfmt_version}_linux_amd64" -O shfmt
$ chmod u+x shfmt
$ ./shfmt -w .
```
2021-03-13 20:10:43 +01:00
Böszörményi Zoltán a01204202b Allow running on a cross-compiled rootfs
For the shell scripts, new environment variables were introduced.

dracutsysrootdir is the root directory, file existence checks use it.

DRACUT_LDCONFIG can override ldconfig with a different one that works
on the sysroot with foreign binaries.

DRACUT_LDD can override ldd with a different one that works
with foreign binaries.

DRACUT_TESTBIN can override /bin/sh. A cross-compiled sysroot
may use symlinks that are valid only when running on the target
so a real file must be provided that exist in the sysroot.

DRACUT_INSTALL now supports debugging dracut-install in itself
when run by dracut but without debugging the dracut scripts.
E.g. DRACUT_INSTALL="valgrind dracut-install or
DRACUT_INSTALL="dracut-install --debug".

DRACUT_COMPRESS_BZIP2, DRACUT_COMPRESS_LBZIP2, DRACUT_COMPRESS_LZMA,
DRACUT_COMPRESS_XZ, DRACUT_COMPRESS_GZIP, DRACUT_COMPRESS_PIGZ,
DRACUT_COMPRESS_LZOP, DRACUT_COMPRESS_ZSTD, DRACUT_COMPRESS_LZ4,
DRACUT_COMPRESS_CAT: All of the compression utilities may be
overridden, to support the native binaries in non-standard places.

DRACUT_ARCH overrides "uname -m".

SYSTEMD_VERSION overrides "systemd --version".

The dracut-install utility was overhauled to support sysroot via
a new option -r and fixes for clang-analyze. It supports
cross-compiler-ldd from
https://gist.github.com/jerome-pouiller/c403786c1394f53f44a3b61214489e6f

DRACUT_INSTALL_PATH was introduced so dracut-install can work with
a different PATH. In a cross-compiled environment (e.g. Yocto), PATH
points to natively built binaries that are not in the host's /bin,
/usr/bin, etc. dracut-install still needs plain /bin and /usr/bin
that are relative to the cross-compiled sysroot.

The hashmap pool allocate_tile/deallocate_tile code was removed
because clang-analyze showed errors in it. hashmap_copy was removed
because it wasn't used and clang-analyze showed errors in it.

DRACUT_INSTALL_LOG_TARGET and DRACUT_INSTALL_LOG_LEVEL were
introduced so dracut-install can use different settings from
DRACUT_LOG_TARGET and DRACUT_LOG_LEVEL.

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
2019-10-25 11:58:58 +02:00
Hannes Reinecke c8aa1d949a 95zfcp_rules: simplified rd.zfcp commandline for NPIV
When NPIV is enabled and the allow_lun_scan parameter is set to 'Y'
the HBA will initiate a LUN scan automatically, so there is no need
to specify the WWPN and LUN number manually.

References: bsc#964456

Signed-off-by: Hannes Reinecke <hare@suse.com>
2017-06-23 21:27:48 +02:00
Hannes Reinecke 5f923256e3 95zfcp_rules: fix typo in module_setup
module_setup.sh has a typo preventing it from saving the correct
dracut commandline.

References: bnc#887582

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:27:44 +02:00
Hannes Reinecke 3a8ba44026 95zfcp_rules: Store all devices in commandline
'for_each_host_dev_and_slaves' would stop at the first found
device, so the cmdline() call would never list all required
devices. Use 'for_each_host_dev_and_slaves_all' instead and
filter out duplicates.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:27:38 +02:00
Hannes Reinecke 55c763b1ff Add new s390x-specific rule files
With the new s390x configuration tool the naming of the udev
rules files have changed. So add these to the existing ones
to be compatible with existing and new installations.

References: bnc#856585

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:26:27 +02:00
Hannes Reinecke 624f173cbd 95zfcp_rules: print out rd.zfcp commandline parameter
When called with '--hostonly-cmdline' the module should print
out the configuration.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:06:02 +02:00
Harald Hoyer 967cc19ab1 remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
Harald Hoyer 30e6e809ed 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.
2014-02-06 16:45:20 +01:00
Hannes Reinecke d6f0467edf Add zfcp scripts for SUSE
SuSE is storing the zfcp configuration in udev files, so we should
be including these.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2013-12-05 15:13:29 +01:00