X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Fhv-utilities%2Fmedia-write;h=e66dba64e1f394ad560d243ead15596be3f2649b;hb=564ec1bbb321286571c30da20b81620c33b18e6f;hp=1f83ab97e5cec3331675bb27242ea257c2e8dddb;hpb=16c81190b3ca1da2e26645020dd3cb9f8625521c;p=hvlinux.git diff --git a/stage2/hv-utilities/media-write b/stage2/hv-utilities/media-write index 1f83ab9..e66dba6 100755 --- a/stage2/hv-utilities/media-write +++ b/stage2/hv-utilities/media-write @@ -14,15 +14,15 @@ GROWISOFS_OPTS="-dvd-compat" # Try to read ATIP infos for CD disks to estimate capacity... MEDIA_ATIP_INFOS=$(cdrecord dev=${MEDIA_DEV} -atip 2>&1) -if echo ${MEDIA_ATIP_INFOS} | grep "ATIP info from disk" 1> /dev/null 2>&1; then +if echo ${MEDIA_ATIP_INFOS} | grep -q "ATIP info from disk"; then MEDIA_SIZE=${CD_MEDIA_SIZE} MEDIA_TYPE="CD" echo "CD disk detected" -elif echo ${MEDIA_ATIP_INFOS} | grep "Found DVD media but" 1> /dev/null 2>&1; then +elif echo ${MEDIA_ATIP_INFOS} | grep -q "Found DVD media but"; then MEDIA_SIZE=${DVD_MEDIA_SIZE} MEDIA_TYPE="DVD" echo "DVD disk detected" -elif echo ${MEDIA_ATIP_INFOS} | grep "cdrecord: No disk / Wrong disk" 1> /dev/null 2>&1; then +elif echo ${MEDIA_ATIP_INFOS} | grep -q "cdrecord: No disk / Wrong disk"; then echo "No disk inserted, aborting" exit 1 else @@ -142,7 +142,7 @@ case "${MEDIA_TYPE}" in esac # Mounting the media to verify burned capacity -if ! grep ${MEDIA_DEV} /etc/mtab 1> /dev/null 2>&1; then +if ! grep -q ${MEDIA_DEV} /etc/mtab; then mount ${MEDIA_DEV} ${MEDIA_DIR} || exit 1 fi