First attempt
This commit is contained in:
parent
98d36c59ae
commit
99095f596d
27
zfs/install.sh
Normal file
27
zfs/install.sh
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Setup build environment
|
||||
if [ ! -d "/opt/build" ]
|
||||
then
|
||||
mkdir -p /opt/build
|
||||
fi
|
||||
chown -R sysadmin:admins /opt/build
|
||||
|
||||
# Build and install
|
||||
su sysadmin -c "git clone https://git.xoservice.nl/marcel/aur_zfs-utils.git /opt/build/zfs-utils"
|
||||
su sysadmin -c "git clone https://git.xoservice.nl/marcel/aur_openzfs.git /opt/build/openzfs"
|
||||
|
||||
BUILDVER=$(cat /opt/build/openzfs/PKGBUILD | grep _kernelver_full | cut -f 2 -d \")
|
||||
KERNVER=$(uname -r)
|
||||
|
||||
if [ ! "$BUILDVER-lts" == "$KERNVER" ]
|
||||
then
|
||||
echo "Kernel version not supported."
|
||||
echo "Version $KERNVER found."
|
||||
echo "Version $BUILDVER required."
|
||||
exit
|
||||
else
|
||||
su sysadmin -c "cd /opt/build/zfs-utils && makepkg --noconfirm -si"
|
||||
su sysadmin -c "cd /opt/build/openzfs && makepkg --noconfirm ---skipchecksums --skipgpgcheck -si"
|
||||
echo "zfs" > /etc/modules-load.d/zfs.conf
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user