diff options
author | Christos.K <freedomrfox@gmail.com> | 2017-08-07 02:11:31 +0300 |
---|---|---|
committer | Christos.K <freedomrfox@gmail.com> | 2017-08-07 02:11:31 +0300 |
commit | cca0b3862f2087d1609cdd634dc5073d63097e0a (patch) | |
tree | 8e2a3e9fb73c53e3262c3785b3efee11ff007235 | |
parent | Hdd update (diff) | |
download | GSE-cca0b3862f2087d1609cdd634dc5073d63097e0a.tar.gz GSE-cca0b3862f2087d1609cdd634dc5073d63097e0a.tar.bz2 GSE-cca0b3862f2087d1609cdd634dc5073d63097e0a.zip |
Included condition for first digit
-rwxr-xr-x | scripts/functions/drv_interface | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/functions/drv_interface b/scripts/functions/drv_interface index da1eb4b..b9e3ef5 100755 --- a/scripts/functions/drv_interface +++ b/scripts/functions/drv_interface @@ -180,10 +180,17 @@ _ask_dev_size() { read -rp "Are you sure? Y/N " _ANS1 case "${_ANS1}" in [yY]) - _dev_size "$1" "${_DSIZE}" - break;; + if [[ "${_DSIZE:0:1}" == [0-9] ]]; then + _dev_size "$1" "${_DSIZE}" + break + else + echo "Size must start with a number, followed by the magnitude of bytes it represents" + fi + ;; + [nN]) ;; + * ) clear echo "Wrong Answer" @@ -207,8 +214,10 @@ _ask_opts() { _dev_id "$1" "${_DID}" _ask_dev_size "$1" "size" "Number-G/M" break;; + [nN]) ;; + * ) clear echo "Wrong Answer" @@ -265,6 +274,9 @@ echo "SYSFS ${SYSFS} ${_SYSID} ${_SYSSIZE} ${_SYSFSTYPE}" >> "${CCONFDIR}/system echo "USERDATAFS ${USERDATAFS} ${_USERDATAID} ${_USERDATASIZE} ${_USERDATAFSTYPE}" >> "${CCONFDIR}/system/devname.info" echo "BACKUPFS ${BACKUPFS} ${_BACKUPID} ${_BACKUPSIZE} ${_BACKUPFSTYPE}" >> "${CCONFDIR}/system/devname.info" +echo "Please check the devname.info at ${CCONFDIR}/system and verify that the entries are those you wish to use" +echo "Keep in mind that controller will use these entries during the intiramfs phase and configure the drives based on those options" + unset DEVNAME unset BOOTFS unset SYSFS |