File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ disable_autologin() {
104
104
fi
105
105
106
106
pattern=" ^autologin-user=[[:space:]]*${user} $"
107
- match_count=$( grep -E -c -- " $pattern " " ${file_name} " ) || true
107
+ match_count=$( grep --extended-regexp --count -- " $pattern " " ${file_name} " ) || true
108
108
109
109
sed -i -E " /$pattern /d" -- " ${file_name} "
110
110
@@ -195,7 +195,7 @@ validate_username() {
195
195
filter_out_sysmaint_maybe () {
196
196
# # This function expects to have data piped to in on standard input.
197
197
if [ " ${special_sysmaint_handling} " = ' yes' ]; then
198
- grep -v -- ' sysmaint'
198
+ grep --invert-match -- ' sysmaint'
199
199
else
200
200
cat
201
201
fi
426
426
427
427
# # Ensure that lightdm doesn't have a multi-seat configuration, we can't
428
428
# # safely manage those
429
- if grep -qri -- ' ^\[Seat:[^*]' /etc/lightdm; then
429
+ if grep --quiet --recrusive --ignore-case -- ' ^\[Seat:[^*]' /etc/lightdm; then
430
430
echo " ERROR: Multi-seat lightdm configuration detected, cannot proceed!" >&2
431
431
exit 1
432
432
fi
433
433
readarray -t autologin_users_lightdm < <(
434
- grep -ri -- ' ^autologin-user=' /etc/lightdm \
434
+ grep --quiet --ignore-case -- ' ^autologin-user=' /etc/lightdm \
435
435
| filter_out_sysmaint_maybe \
436
436
| awk -F' =' ' { print $NF }' || true
437
437
) || true
You can’t perform that action at this time.
0 commit comments