Skip to contentSkip to conversation

Add installation support for CentOS

PATCH New Géza Gémes 2 participants 3 messages Mar 7, 2017 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add installation support for CentOS

Extend the existing Fedora case with CentOS in the install_package function

Géza Gémes (1):
Allow installation on CentOS

 lib/common-functions.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#1 lore raw

PATCH 1/1 Allow installation on CentOS

Add $DISTRO = "CentOS"
to the rpm installation targets
complementing Fedora

---
 lib/common-functions.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/common-functions.sh +2 -2
index 19434c2..d4476f3 100644
@@ -420,7 +420,7 @@ function install_package() {
     if [[ $DISTRO = "Debian" ]]
     then
         $SUDO dpkg -i "$1".deb
-    elif [[  $DISTRO = "Fedora" ]]
+    elif [[  $DISTRO = "Fedora" || $DISTRO = "CentOS" ]]
     then
         $SUDO rpm -i --force "$1"-`git show --oneline | head -1 | cut -d " " -f 1`-0.$RAISIN_ARCH.rpm
     else
@@ -432,7 +432,7 @@ function uninstall_package() {
     if [[ $DISTRO = "Debian" ]]
     then
         $SUDO dpkg -r "$1"
-    elif [[ $DISTRO = "Fedora" ]]
+    elif [[ $DISTRO = "Fedora" || $DISTRO = "CentOS" ]]
     then
         $SUDO rpm -e "$1"
     else
Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Reviewed-by on v1 1/1
#2 lore raw

Re: [PATCH] Allow installation on CentOS

Quoted 5 lines · Géza Gémes

Add $DISTRO = "CentOS"
to the rpm installation targets
complementing Fedora

Thanks for the patch!

Quoted 28 lines
 lib/common-functions.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/common-functions.sh +2 -2
index 19434c2..d4476f3 100644
@@ -420,7 +420,7 @@ function install_package() {
     if [[ $DISTRO = "Debian" ]]
     then
         $SUDO dpkg -i "$1".deb
-    elif [[  $DISTRO = "Fedora" ]]
+    elif [[  $DISTRO = "Fedora" || $DISTRO = "CentOS" ]]
     then
         $SUDO rpm -i --force "$1"-`git show --oneline | head -1 | cut -d " " -f 1`-0.$RAISIN_ARCH.rpm
     else
@@ -432,7 +432,7 @@ function uninstall_package() {
     if [[ $DISTRO = "Debian" ]]
     then
         $SUDO dpkg -r "$1"
-    elif [[ $DISTRO = "Fedora" ]]
+    elif [[ $DISTRO = "Fedora" || $DISTRO = "CentOS" ]]
     then
         $SUDO rpm -e "$1"
     else
Signature · 1 line
2.7.4

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel