All of lore.kernel.org
 help / color / mirror / Atom feed
* [raisin][PATCHv2] Handle unsupported distros with a prettier message
@ 2015-11-11 16:26 Doug Goldstein
  2015-11-12 12:09 ` Stefano Stabellini
  0 siblings, 1 reply; 2+ messages in thread
From: Doug Goldstein @ 2015-11-11 16:26 UTC (permalink / raw)
  To: xen-devel, stefano.stabellini; +Cc: Doug Goldstein

Handle unknown distros by saying "unknown" instead of an empty string
and for Gentoo users actually mention it.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
 lib/common-functions.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/common-functions.sh b/lib/common-functions.sh
index 27f6434..a0b8431 100644
--- a/lib/common-functions.sh
+++ b/lib/common-functions.sh
@@ -150,8 +150,16 @@ function get_distro() {
                      sed -r 's/\"|\(|\)//g' | awk '{print $2}'`
         os_RELEASE=`awk '/VERSION_ID=/' /etc/os-release | sed 's/VERSION_ID=//' \
                     | sed 's/\"//g'`
+    elif [[ -f /etc/gentoo-release ]]
+    then
+        os_VENDOR="Gentoo"
     fi
 
+    if [[ -z $os_VENDOR ]]
+	then
+		os_VENDOR="unknown"
+	fi
+
     # Simply distro version string
     case "$os_VENDOR" in
         "Debian"* | "Ubuntu"* | "LinuxMint"* )
-- 
2.4.10

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [raisin][PATCHv2] Handle unsupported distros with a prettier message
  2015-11-11 16:26 [raisin][PATCHv2] Handle unsupported distros with a prettier message Doug Goldstein
@ 2015-11-12 12:09 ` Stefano Stabellini
  0 siblings, 0 replies; 2+ messages in thread
From: Stefano Stabellini @ 2015-11-12 12:09 UTC (permalink / raw)
  To: Doug Goldstein; +Cc: stefano.stabellini, xen-devel

On Wed, 11 Nov 2015, Doug Goldstein wrote:
> Handle unknown distros by saying "unknown" instead of an empty string
> and for Gentoo users actually mention it.
> 
> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>

Thanks for the patch.


>  lib/common-functions.sh | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/lib/common-functions.sh b/lib/common-functions.sh
> index 27f6434..a0b8431 100644
> --- a/lib/common-functions.sh
> +++ b/lib/common-functions.sh
> @@ -150,8 +150,16 @@ function get_distro() {
>                       sed -r 's/\"|\(|\)//g' | awk '{print $2}'`
>          os_RELEASE=`awk '/VERSION_ID=/' /etc/os-release | sed 's/VERSION_ID=//' \
>                      | sed 's/\"//g'`
> +    elif [[ -f /etc/gentoo-release ]]
> +    then
> +        os_VENDOR="Gentoo"
>      fi
>  
> +    if [[ -z $os_VENDOR ]]
> +	then
> +		os_VENDOR="unknown"
> +	fi

Spaces no tabs, please :-)

If you are going to resend, I would prefer to set os_VENDOR to "unknown"
at the beginning of the function and avoid the if.



>      # Simply distro version string
>      case "$os_VENDOR" in
>          "Debian"* | "Ubuntu"* | "LinuxMint"* )
> -- 
> 2.4.10
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-12 12:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-11 16:26 [raisin][PATCHv2] Handle unsupported distros with a prettier message Doug Goldstein
2015-11-12 12:09 ` Stefano Stabellini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.