summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2018-06-29 16:00:44 -0500
committerJohn Klug <john.klug@multitech.com>2018-06-29 16:00:44 -0500
commit1f7c076c1cc498518d6486cb9b6f4485ba03dcb0 (patch)
treee8bca16bfe49687bbf37ae0aee99564f90834922
parent504c94d2c098e3851a5c21aada1557ced45b74a3 (diff)
downloadmts-id-eeprom-1f7c076c1cc498518d6486cb9b6f4485ba03dcb0.tar.gz
mts-id-eeprom-1f7c076c1cc498518d6486cb9b6f4485ba03dcb0.tar.bz2
mts-id-eeprom-1f7c076c1cc498518d6486cb9b6f4485ba03dcb0.zip
mts-ubpasswd to use uuid and device-id rather than MAC by default #40.3.9
-rwxr-xr-xsrc/ubpasswd.sh13
1 files changed, 5 insertions, 8 deletions
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