From 1f7c076c1cc498518d6486cb9b6f4485ba03dcb0 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 29 Jun 2018 16:00:44 -0500 Subject: mts-ubpasswd to use uuid and device-id rather than MAC by default #4 --- src/ubpasswd.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/ubpasswd.sh b/src/ubpasswd.sh index c168581..0e5ba2e 100755 --- a/src/ubpasswd.sh +++ b/src/ubpasswd.sh @@ -71,6 +71,10 @@ while getopts ":cdfmnrs:u" opt; do echo "${MTS}/mac-eth must have a non-zero length value" usage fi + if ! [[ -f "${MTS}/mac-eth" ]] ; then + echo "${MTS}/mac-eth not found. Maybe mts-io driver is not loaded?" + exit 1 + fi ;; n) ((dryrun=1)) @@ -131,11 +135,6 @@ if ((upwd == 0)) ; then echo "${MTS}/device-id not found. Maybe mts-io driver is not loaded?" exit 1 fi - if ! [[ -f "${MTS}/mac-eth" ]] ; then - echo "${MTS}/mac-eth not found. Maybe mts-io driver is not loaded?" - exit 1 - fi - did=$(cat "${MTS}/device-id") if ((${#did} == 0)) ; then @@ -143,9 +142,7 @@ if ((upwd == 0)) ; then usage fi - - - if ((usemac == 0)) ; then + if ((usemac == 0)) ; then if ! [[ -f "${MTS}/uuid" ]] ; then echo "${MTS}/uuid not found. Maybe mts-io driver is not loaded?" exit 1 -- cgit v1.2.3