Skip to content

Instantly share code, notes, and snippets.

@gardar
Created March 10, 2021 11:54
Show Gist options
  • Save gardar/02ace6f01b2da16d8d628e8f1f51d8b4 to your computer and use it in GitHub Desktop.
Save gardar/02ace6f01b2da16d8d628e8f1f51d8b4 to your computer and use it in GitHub Desktop.
$productversion yum variable (version number i number format)

/etc/yum/vars/productversion

#!/bin/bash                         
. /etc/os-release                   
echo $REDHAT_SUPPORT_PRODUCT_VERSION

/etc/yum.repos.d/zfs.repo

[zfs]                                                                 
name=ZFS on Linux for EL7 - dkms                                      
baseurl=http://download.zfsonlinux.org/epel/$productversion/$basearch/
enabled=1                                                             
metadata_expire=7d                                                    
gpgcheck=1                                                            
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-zfsonlinux                 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment