replace commands parsing ls output with shell glob

Signed-off-by: Maurice Zhou <jasper@apvc.uk>
This commit is contained in:
Maurice Zhou
2021-09-19 09:12:02 +08:00
committed by George Melikov
parent d1e8fad976
commit e34ace390b
6 changed files with 28 additions and 15 deletions

View File

@@ -101,7 +101,7 @@ System Configuration
#. Build ZFS modules::
ls -1 /lib/modules \
| while read kernel_version; do
for directory in /lib/modules/*; do
kernel_version=$(basename $directory)
dkms autoinstall -k $kernel_version
done
done

View File

@@ -49,10 +49,10 @@ Install GRUB
touch /etc/zfs/zpool.cache
chmod a-w /etc/zfs/zpool.cache
chattr +i /etc/zfs/zpool.cache
ls -1 /lib/modules \
| while read kernel_version; do
for directory in /lib/modules/*; do
kernel_version=$(basename $directory)
dracut --force --kver $kernel_version
done
done
#. Disable BLS::

View File

@@ -49,13 +49,16 @@ see below.
modprobe zfs
It might be necessary to rebuild module::
It might be necessary to rebuild ZFS module::
ls -1 /lib/modules \
| while read kernel_version; do
for directory in /lib/modules/*; do
kernel_version=$(basename $directory)
dkms autoinstall -k $kernel_version
done
If for some reason, ZFS kernel module is not successfully built,
you can also run the above command to debug the problem.
#. By default ZFS kernel modules are loaded upon detecting a pool.
To always load the modules at boot::

View File

@@ -97,7 +97,7 @@ System Configuration
#. Build ZFS modules::
ls -1 /lib/modules \
| while read kernel_version; do
for directory in /lib/modules/*; do
kernel_version=$(basename $directory)
dkms autoinstall -k $kernel_version
done
done

View File

@@ -49,10 +49,10 @@ Install GRUB
touch /etc/zfs/zpool.cache
chmod a-w /etc/zfs/zpool.cache
chattr +i /etc/zfs/zpool.cache
ls -1 /lib/modules \
| while read kernel_version; do
for directory in /lib/modules/*; do
kernel_version=$(basename $directory)
dracut --force --kver $kernel_version
done
done
#. Load ZFS modules and disable BLS::

View File

@@ -109,6 +109,16 @@ time you must create an ``/etc/modules-load.d/zfs.conf`` file::
After upgrading users must uninstall OpenZFS and then reinstall it
from the matching repository as described in this section.
It might be necessary to rebuild ZFS module::
for directory in /lib/modules/*; do
kernel_version=$(basename $directory)
dkms autoinstall -k $kernel_version
done
If for some reason, ZFS kernel module is not successfully built,
you can also run the above command to debug the problem.
Testing Repositories
--------------------