File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -97,11 +97,6 @@ umount_work () {
9797}
9898
9999
100- # Check root.
101- if (( ! "${EUID} " == 0 )) ; then
102- msg_error " This script must be run as root." " 1"
103- fi
104-
105100# Parse options
106101OPTS=(" d" " f" " h" " m:" )
107102OPTL=(" debug" " force" " help" " maxdepth:" )
@@ -128,7 +123,7 @@ while true; do
128123 shift 2
129124 ;;
130125 -h | --help)
131- _usage
126+ _help
132127 exit 0
133128 ;;
134129 --)
@@ -137,11 +132,17 @@ while true; do
137132 ;;
138133 * )
139134 msg_error " Invalid argument '${1} '"
140- _usage 1
135+ _help
136+ exit 1
141137 ;;
142138 esac
143139done
144140
141+ # Check root.
142+ if (( ! "${EUID} " == 0 )) ; then
143+ msg_error " This script must be run as root." " 1"
144+ fi
145+
145146
146147if [[ -z " ${1+SET} " ]]; then
147148 msg_error " Please specify the target directory." " 1"
You can’t perform that action at this time.
0 commit comments