Skip to content

Commit a59e593

Browse files
committed
Fail if -i arg is not .service
1 parent 8e71484 commit a59e593

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

admin/checkservices

+3-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ usage() {
252252
echo " -s/-S: display (or not) status of restarted service (default: $STATUS)" >&2
253253
echo " -u/-U: act (or not) on services in users slice (default: $USER_SLICE)" >&2
254254
echo " -z/-Z: serialize (or not) action (default: $SERIALIZE)" >&2
255-
echo " -i 'service_name'.service: list of services to ignore (space separated)" >&2
255+
echo " -i 'service_name'.service: ignore a specific service (can be used multiple times)" >&2
256256
exit 2
257257
}
258258

@@ -272,6 +272,8 @@ argparse() {
272272
Z) SERIALIZE=0;; z) SERIALIZE=1;;
273273
i) if [[ "$OPTARG" == *.service ]]; then
274274
IGNORED_SERVICES+=("$OPTARG")
275+
else
276+
usage
275277
fi
276278
;;
277279
*) usage;;

0 commit comments

Comments
 (0)