Magellan Linux

Diff of /trunk/installer-simple/functions/hwdetection.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2492 by niro, Wed Jan 8 12:25:29 2014 UTC revision 2493 by niro, Wed Jan 8 12:27:04 2014 UTC
# Line 11  hwinfo() Line 11  hwinfo()
11   yes|y|true|1) use_sudo=sudo ;;   yes|y|true|1) use_sudo=sudo ;;
12   esac   esac
13    
14   ${use_sudo} /usr/sbin/hwinfo $@   LC_ALL=C ${use_sudo} /usr/sbin/hwinfo $@
15  }  }
16    
17  # get_hwinfo $hw_item  # get_hwinfo $hw_item
# Line 187  get_blkid_information() Line 187  get_blkid_information()
187   return 1   return 1
188   fi   fi
189    
190   ${use_sudo} blkid -o value -s "${variable}" "${method}" "${partition}"   LC_ALL=C ${use_sudo} blkid -o value -s "${variable}" "${method}" "${partition}"
191  }  }
192    
193  get_fstype()  get_fstype()
# Line 272  device_minimum_size() Line 272  device_minimum_size()
272   # convert to bytes   # convert to bytes
273   minimum_size=$(( ${minimum_size}*1024*1024 ))   minimum_size=$(( ${minimum_size}*1024*1024 ))
274    
275   size=$(${use_sudo} fdisk -l ${device} | grep "Disk.*${device}" | sed 's:.*,\ \(.*\)\ byte.*:\1:')   size=$(LC_ALL=C ${use_sudo} fdisk -l ${device} | grep "Disk.*${device}" | sed 's:.*,\ \(.*\)\ byte.*:\1:')
276   [[ ${size} -ge ${minimum_size} ]] || return 1   [[ ${size} -ge ${minimum_size} ]] || return 1
277    
278   return 0   return 0
# Line 291  chrooted() Line 291  chrooted()
291   is_mounted --location ${INSTALLROOT}/proc || mount -t proc proc ${INSTALLROOT}/proc   is_mounted --location ${INSTALLROOT}/proc || mount -t proc proc ${INSTALLROOT}/proc
292   is_mounted --location ${INSTALLROOT}/dev || mount -o bind /dev ${INSTALLROOT}/dev   is_mounted --location ${INSTALLROOT}/dev || mount -o bind /dev ${INSTALLROOT}/dev
293    
294   ${use_sudo} chroot ${INSTALLROOT} ${cmd}   LC_ALL=C ${use_sudo} chroot ${INSTALLROOT} ${cmd}
295    
296   is_mounted --location ${INSTALLROOT}/dev && umount ${INSTALLROOT}/dev   is_mounted --location ${INSTALLROOT}/dev && umount ${INSTALLROOT}/dev
297   is_mounted --location ${INSTALLROOT}/proc && umount ${INSTALLROOT}/proc   is_mounted --location ${INSTALLROOT}/proc && umount ${INSTALLROOT}/proc

Legend:
Removed from v.2492  
changed lines
  Added in v.2493