Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP3:Update
opa-fm
opa-fm-Fallback-to-custom-vendor-if-os_vendor-f...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File opa-fm-Fallback-to-custom-vendor-if-os_vendor-fails.patch of Package opa-fm
commit 27eef417f53ce83fa313f1e7f668a56d2dd764e1 Author: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com> Date: Mon Aug 28 14:07:34 2017 +0200 opa-fm Fallback to custom vendor if os_vendor fails Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com> diff --git MakeTools/funcs-ext.sh MakeTools/funcs-ext.sh index 9aa4cd25e410..2f9689586caf 100755 --- MakeTools/funcs-ext.sh +++ MakeTools/funcs-ext.sh @@ -734,31 +734,36 @@ function os_vendor() # Apple Mac rval=apple else - filelist=($('ls' /etc/*-release | egrep -v lsb | egrep -v os)) - rval="" - if [ ${#filelist[@]} -eq 0 ] && [ -f /etc/lsb-release ]; then - rval=$(cat /etc/lsb-release | egrep DISTRIB_ID | cut -d'=' -f2 | tr '[:upper:]' '[:lower:]') - fi - for file in $filelist - do - if [ -f $file ] - then - rval=$(basename $file -release) - if [ $rval = 'SuSE' ] - then - if [ -f /etc/UnitedLinux-release ] - then - rval=UnitedLinux + if [ $? == 1 ] + then + rval="custom" + else + filelist=($('ls' /etc/*-release | egrep -v lsb | egrep -v os)) + rval="" + if [ ${#filelist[@]} -eq 0 ] && [ -f /etc/lsb-release ]; then + rval=$(cat /etc/lsb-release | egrep DISTRIB_ID | cut -d'=' -f2 | tr '[:upper:]' '[:lower:]') fi - elif [ $rval = 'centos' ] - then - rval=redhat - elif [ $rval != 'os' ] - then - break + for file in $filelist + do + if [ -f $file ] + then + rval=$(basename $file -release) + if [ $rval = 'SuSE' ] + then + if [ -f /etc/UnitedLinux-release ] + then + rval=UnitedLinux + fi + elif [ $rval = 'centos' ] + then + rval=redhat + elif [ $rval != 'os' ] + then + break + fi + fi + done fi - fi - done fi echo $rval }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor