We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a17460 commit b949fefCopy full SHA for b949fef
1 file changed
tools/umount.sh
@@ -97,11 +97,6 @@ umount_work () {
97
}
98
99
100
-# Check root.
101
-if (( ! "${EUID}" == 0 )); then
102
- msg_error "This script must be run as root." "1"
103
-fi
104
-
105
# Parse options
106
OPTS=("d" "f" "h" "m:")
107
OPTL=("debug" "force" "help" "maxdepth:")
@@ -128,7 +123,7 @@ while true; do
128
123
shift 2
129
124
;;
130
125
-h | --help)
131
- _usage
126
+ _help
132
127
exit 0
133
134
--)
@@ -137,11 +132,17 @@ while true; do
137
138
*)
139
msg_error "Invalid argument '${1}'"
140
- _usage 1
135
136
+ exit 1
141
142
esac
143
done
144
+# Check root.
+if (( ! "${EUID}" == 0 )); then
+ msg_error "This script must be run as root." "1"
+fi
145
+
146
147
if [[ -z "${1+SET}" ]]; then
148
msg_error "Please specify the target directory." "1"
0 commit comments