summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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