Changeset 5199 in /cluster/svnroot


Ignore:
Timestamp:
Jul 2, 2015 9:58:54 PM (5 years ago)
Author:
skylar
Message:

can use lsblk instead of bdev_size re #944

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bccd-ng/branches/skylar/bccd-3.4.0/bin/build_bootable_USB.sh

    r4789 r5199  
    113113
    114114echo '---> Checking dependencies'
    115 for dep in mkfs.vfat wget parted syslinux rsync du fdisk; do
     115for dep in mkfs.vfat parted syslinux rsync du fdisk; do
    116116        if [[ -z $(which ${dep}) ]]; then
    117117                echo "$0: ERROR: Missing dependency: ${dep}" >&2
     
    130130pushd ${BUILD_DIR}
    131131
    132 for FILE in Makefile bdev_size.c; do
    133     if ! wget -q ${SVN_URL}/bin/${FILE}; then
    134         echo "Fetching ${FILE} from ${SVN_URL} failed!" >&2
    135         exit 2
    136     fi
    137 done
    138 
    139 if ! make bdev_size; then
    140     echo "Making bdev_size failed!" >&2
    141     exit 2
    142 fi
    143 
    144 DRIVE_SIZE=$(./bdev_size -d ${DRIVE})
     132DRIVE_SIZE=$(/bin/lsblk -ndb /dev/sdb|/usr/bin/awk '{print $4}')
    145133if [[ -z ${DRIVE_SIZE} ]]; then
    146134    echo "Can't size for ${DRIVE}" >&2
Note: See TracChangeset for help on using the changeset viewer.