fix(zfs): Install ZFS only when needed (#26)
In situations where this script runs on alternative Arch Linux live CD ISOs such as github.com/stevleibelt/arch-linux-live-cd-iso-with -zfs we may not have to insall ZFS kernel modules. Test if the 'zfs' module is loaded and skip installation if yes.
This commit is contained in:
parent
3ae8b53616
commit
1036ce9c5b
5
setup.sh
5
setup.sh
@ -451,7 +451,12 @@ function install_pkgs () {
|
|||||||
function install_zfs () {
|
function install_zfs () {
|
||||||
#1.6
|
#1.6
|
||||||
declare reset_colors='\033[0m'
|
declare reset_colors='\033[0m'
|
||||||
|
if modinfo 'zfs' &>/dev/null; then
|
||||||
|
>&3 printf -- '%s\n' \
|
||||||
|
'ZFS kernel module is loaded, no need to install ...'
|
||||||
|
else
|
||||||
curl -s 'https://raw.githubusercontent.com/eoli3n/archiso-zfs/master/init' | bash
|
curl -s 'https://raw.githubusercontent.com/eoli3n/archiso-zfs/master/init' | bash
|
||||||
|
fi
|
||||||
printf -- "${reset_colors}"
|
printf -- "${reset_colors}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user