Revision f59332af

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 25
    if [ -e ${target}/etc/debian_version ] ; then
29 26
        if [ -e ${target}/etc/lsb-release ] ; then
30 27
            ID=$(grep ^DISTRIB_ID= ${target}/etc/lsb-release | cut -d= -f2)
......
53 50
        log_error "target is not set in get_os_release"
54 51
        exit 1
55 52
    fi
56
    lsb="/usr/bin/lsb_release"
57
    if [ -e ${target}/$lsb ] ; then
58
        OS_RELEASE="$(chroot ${target} ${lsb} -r -s | tr "[:upper:]" "[:lower:]")"
59
    elif [ -e ${target}/etc/debian_version ] ; then
53
    if [ -e ${target}/etc/debian_version ] ; then
60 54
        OS_RELEASE="$(cat ${target}/etc/debian_version)"
61 55
    elif [ -e ${target}/etc/fedora-release ] ; then
62 56
        OS_RELEASE="$(cat ${target}/etc/fedora-release | awk '{print $3}')"
......
104 98

  
105 99
linux_mkfs_disk0() {
106 100
    local mkfs="mkfs.${FILESYSTEM}"
107
    # Format /
101
   # Format /
108 102
    $mkfs -Fq -L / $root_dev > /dev/null
109 103
    # Format /boot
110 104
    if [ -n "${boot_dev}" ] ; then
......
207 201
        exit 1
208 202
    fi
209 203

  
210
    get_os $target
204
    get_os_type $target
211 205

  
212
    if [ "${OPERATING_SYSTEM}" = "fedora" ]; then
206
    if [ "${OS_TYPE}" = "redhat" ]; then
213 207
        # we have to force a filesystem relabeling for SELinux after messing
214
        # around with the filesystem in fedora
208
        # around with the filesystem in redhat derived OSs
215 209
        echo "Enforce an automatic relabeling in the initial boot process..."
216 210
        touch $target/.autorelabel
217 211
    fi

Also available in: Unified diff