mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
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")
|
||||
dinfo "zfsexpandknowledge: pool $1 cannot be listed: $poolconfigoutput"
|
||||
else
|
||||
cat "$poolconfigtemp" | awk -F '\t' '/\t\/dev/ { print $2 }' | \
|
||||
while read pooldev ; do
|
||||
if [ -n "$pooldev" -a -e "$pooldev" ] ; then
|
||||
if [ -h "$pooldev" ] ; then
|
||||
@ -32,7 +33,7 @@ get_pool_devices() {
|
||||
dinfo "zfsexpandknowledge: pool $1 has device $pooldev (which resolves to $resolved)"
|
||||
echo "$resolved"
|
||||
fi
|
||||
done < <(cat "$poolconfigtemp" | awk -F '\t' '/\t\/dev/ { print $2 }')
|
||||
done
|
||||
fi
|
||||
rm -f "$poolconfigtemp"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user