mirror of
https://github.com/bashclub/proxmox-zfs-postinstall.git
synced 2024-12-25 17:50:13 +01:00
Fix apt repo
This commit is contained in:
parent
eb4bc95c9a
commit
9f5c44029b
28
postinstall
28
postinstall
@ -275,27 +275,35 @@ set_pve_repo(){
|
||||
enterprise=$(grep pve-enterprise /etc/apt/sources.list.d/pve-enterprise.list)
|
||||
test=$(grep pvetest /etc/apt/sources.list)
|
||||
if [[ $repo_selection == "pve-enterprise" ]]; then
|
||||
pvesh set nodes/px1/apt/repositories --handle enterprise
|
||||
if [[ $nosub != "" ]]; then
|
||||
echo "deb https://enterprise.proxmox.com/debian/pve $VERSION_CODENAME pve-enterprise" > /etc/apt/sources.list.d/pve-enterprise.list
|
||||
if [[ $nosub != "" ]] && [[ $nosub != *"#"* ]]; then
|
||||
sed -i "s|$nosub|# $nosub|g" /etc/apt/sources.list
|
||||
fi
|
||||
if [[ $test != "" ]]; then
|
||||
if [[ $test != "" ]] && [[ $test != *"#"* ]]; then
|
||||
sed -i "s|$test|# $test|g" /etc/apt/sources.list
|
||||
fi
|
||||
elif [[ $repo_selection == "pve-no-subscription" ]]; then
|
||||
pvesh set nodes/px1/apt/repositories --handle no-subscription
|
||||
if [[ $enterprise != "" ]]; then
|
||||
sed -i "s|$enterprise|# $enterprise|g" /etc/apt/sources.list.d/pve-enterprise.list
|
||||
if [[ $nosub == "" ]]; then
|
||||
echo -e "\ndeb http://download.proxmox.com/debian/pve $VERSION_CODENAME pve-no-subscription\n" >> /etc/apt/sources.list
|
||||
elif [[ $nosub == *"#"* ]]; then
|
||||
sed -i "s|$nosub|$(echo $nosub | cut -d' ' -f2-)|" /etc/apt/sources.list
|
||||
fi
|
||||
if [[ $test != "" ]]; then
|
||||
if [[ $enterprise != "" ]] && [[ $enterprise != *"#"* ]]; then
|
||||
sed -i "s|$enterprise|# $enterprise|g" /etc/apt/sources.list.d/pve-enterprise.list
|
||||
fi
|
||||
if [[ $test != "" ]] && [[ $test != *"#"* ]]; then
|
||||
sed -i "s|$test|# $test|g" /etc/apt/sources.list
|
||||
fi
|
||||
elif [[ $repo_selection == "pvetest" ]]; then
|
||||
pvesh set nodes/px1/apt/repositories --handle test
|
||||
if [[ $nosub != "" ]]; then
|
||||
if [[ $test == "" ]]; then
|
||||
echo -e "\ndeb http://download.proxmox.com/debian/pve $VERSION_CODENAME pvetest\n" >> /etc/apt/sources.list
|
||||
elif [[ $test == *"#"* ]]; then
|
||||
sed -i "s|$test|$(echo $test | cut -d' ' -f2-)|" /etc/apt/sources.list
|
||||
fi
|
||||
if [[ $nosub != "" ]] && [[ $nosub != *"#"* ]]; then
|
||||
sed -i "s|$nosub|# $nosub|g" /etc/apt/sources.list
|
||||
fi
|
||||
if [[ $enterprise != "" ]]; then
|
||||
if [[ $enterprise != "" ]] && [[ $enterprise != *"#"* ]]; then
|
||||
sed -i "s|$enterprise|# $enterprise|g" /etc/apt/sources.list.d/pve-enterprise.list
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user