contrib/dracut: fix syntax error in module-setup.sh
The dracut/02zfsexpandknowledge/module-setup.sh.in has a syntax error which makes the script unusable by a POSIX compliant shell like Dash on Debian based systems. Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Aron Xu <happyaron.xu@gmail.com> Closes #5712
This commit is contained in:
parent
b81a3ddc32
commit
3d91261599
|
@ -22,6 +22,7 @@ get_pool_devices() {
|
||||||
poolconfigoutput=$(cat "$poolconfigtemp")
|
poolconfigoutput=$(cat "$poolconfigtemp")
|
||||||
dinfo "zfsexpandknowledge: pool $1 cannot be listed: $poolconfigoutput"
|
dinfo "zfsexpandknowledge: pool $1 cannot be listed: $poolconfigoutput"
|
||||||
else
|
else
|
||||||
|
cat "$poolconfigtemp" | awk -F '\t' '/\t\/dev/ { print $2 }' | \
|
||||||
while read pooldev ; do
|
while read pooldev ; do
|
||||||
if [ -n "$pooldev" -a -e "$pooldev" ] ; then
|
if [ -n "$pooldev" -a -e "$pooldev" ] ; then
|
||||||
if [ -h "$pooldev" ] ; then
|
if [ -h "$pooldev" ] ; then
|
||||||
|
@ -32,7 +33,7 @@ get_pool_devices() {
|
||||||
dinfo "zfsexpandknowledge: pool $1 has device $pooldev (which resolves to $resolved)"
|
dinfo "zfsexpandknowledge: pool $1 has device $pooldev (which resolves to $resolved)"
|
||||||
echo "$resolved"
|
echo "$resolved"
|
||||||
fi
|
fi
|
||||||
done < <(cat "$poolconfigtemp" | awk -F '\t' '/\t\/dev/ { print $2 }')
|
done
|
||||||
fi
|
fi
|
||||||
rm -f "$poolconfigtemp"
|
rm -f "$poolconfigtemp"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue