more meaningful output
This commit is contained in:
parent
594b4a0ce3
commit
19daaa2b77
@ -18,26 +18,27 @@ fi
|
|||||||
|
|
||||||
#
|
#
|
||||||
get_speeds() {
|
get_speeds() {
|
||||||
echo -e "\n${SELF}: Running: ${RELENG_XORRISO} -outdev ${1} -list_speeds"
|
echo -e "\n${SELF}: Running: ${RELENG_XORRISO} -outdev ${1} -list_speeds"
|
||||||
${RELENG_XORRISO} -outdev ${1} -list_speeds
|
${RELENG_XORRISO} -outdev ${1} -list_speeds
|
||||||
}
|
}
|
||||||
|
|
||||||
get_devices() {
|
get_devices() {
|
||||||
|
echo -e "\n${SELF}: Running: $RELENG_XORRISO -devices 2>/dev/null | grep \"\-dev\""
|
||||||
DEVICES=`$RELENG_XORRISO -devices 2>/dev/null | grep "\-dev"`
|
DEVICES=`$RELENG_XORRISO -devices 2>/dev/null | grep "\-dev"`
|
||||||
NUM_DEV=`echo ${DEVICES} | wc -l`
|
NUM_DEV=`echo ${DEVICES} | wc -l`
|
||||||
|
|
||||||
case "${NUM_DEV}" in
|
case "${NUM_DEV}" in
|
||||||
0)
|
0)
|
||||||
echo -e "\n${SELF}: No drives found."
|
echo -e "${SELF}: No drives found."
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
1)
|
1)
|
||||||
echo -e "\n${SELF}: Single drive found:\n${DEVICES}"
|
echo -e "${SELF}: Single drive found:\n${DEVICES}"
|
||||||
OUTDEV=`${RELENG_XORRISO} -devices 2>/dev/null | perl -pe "s#^\d+\s+\-dev\s+\'## and s#\'.*##"`
|
OUTDEV=`${RELENG_XORRISO} -devices 2>/dev/null | perl -pe "s#^\d+\s+\-dev\s+\'## and s#\'.*##"`
|
||||||
get_speeds ${OUTDEV}
|
get_speeds ${OUTDEV}
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo -e "\n${SELF}: Multiple drives found. NOT FINISHED YET."
|
echo -e "${SELF}: Multiple drives found. NOT FINISHED YET."
|
||||||
exit 2
|
exit 2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user