Revision 528c0efc common_linux.sh

b/common_linux.sh
22 22
        log_error "target is not set in get_os"
23 23
        exit 1
24 24
    fi
25
    lsb="/usr/bin/lsb_release"
26
    if [ -e ${target}/$lsb ] ; then
27
        OPERATING_SYSTEM="$(chroot ${target} ${lsb} -i -s | tr "[:upper:]" "[:lower:]")"
28
    elif [ -e ${target}/etc/debian_version ] ; then
29
        OPERATING_SYSTEM="debian"
25
#    lsb="/usr/bin/lsb_release"
26
#    if [ -e ${target}/$lsb ] ; then
27
#        OPERATING_SYSTEM="$(chroot ${target} ${lsb} -i -s | tr "[:upper:]" "[:lower:]")"
28
    if [ -e ${target}/etc/debian_version ] ; then
29
        if [ -e ${target}/etc/lsb-release ] ; then
30
            ID=$(grep ^DISTRIB_ID= ${target}/etc/lsb-release | cut -d= -f2)
31
        fi
32
        if [ "a$ID" = "aUbuntu" ] ; then
33
            OPERATING_SYSTEM="ubuntu"
34
        else
35
            OPERATING_SYSTEM="debian"
36
        fi
30 37
    elif [ -e ${target}/etc/gentoo-release ] ; then
31 38
        OPERATING_SYSTEM="gentoo"
32 39
    elif [ -e ${target}/etc/fedora-release ] ; then

Also available in: Unified diff