File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ check() {
8
8
for tool in " @sbindir@/zgenhostid" " @sbindir@/zpool" " @sbindir@/zfs" " @mounthelperdir@/mount.zfs" ; do
9
9
test -x " $tool " || return 1
10
10
done
11
- # Verify grep exists
12
- which grep > /dev/null 2>&1 || return 1
13
11
14
12
return 0
15
13
}
@@ -43,14 +41,15 @@ install() {
43
41
dracut_install @sbindir@/zpool
44
42
# Workaround for https://github.com/openzfs/zfs/issues/4749 by
45
43
# ensuring libgcc_s.so(.1) is included
46
- if [[ -n " $( ldd @sbindir@/zpool | grep -F ' libgcc_s.so' ) " ]] ; then
44
+ if ldd @sbindir@/zpool | grep -qF ' libgcc_s.so' ; then
47
45
# Dracut will have already tracked and included it
48
46
: ;
49
- elif command -v gcc-config 2>&1 1> /dev/null; then
47
+ elif command -v gcc-config > /dev/null 2>&1 ; then
50
48
# On systems with gcc-config (Gentoo, Funtoo, etc.):
51
49
# Use the current profile to resolve the appropriate path
52
- dracut_install " /usr/lib/gcc/$( s=$( gcc-config -c) ; echo ${s% -* } /${s##* -} ) /libgcc_s.so.1"
53
- elif [[ -n " $( ls /usr/lib/libgcc_s.so* 2> /dev/null) " ]]; then
50
+ s=" $( gcc-config -c) "
51
+ dracut_install " /usr/lib/gcc/${s% -* } /${s##* -} /libgcc_s.so.1"
52
+ elif ls /usr/lib/libgcc_s.so* > /dev/null 2>&1 ; then
54
53
# Try a simple path first
55
54
dracut_install /usr/lib/libgcc_s.so*
56
55
else
You can’t perform that action at this time.
0 commit comments