14 lines
248 B
Bash
14 lines
248 B
Bash
#!/bin/sh
|
|
set -eu
|
|
|
|
file=etc/pam.d/system-auth
|
|
line='auth optional pam_cap.so'
|
|
|
|
if [ -f "$file" ]; then
|
|
if ! grep -F -x -q "$line" "$file"; then
|
|
printf '%s\n' "$line" >> "$file"
|
|
fi
|
|
else
|
|
printf '%s\n' "$line" > "$file"
|
|
fi
|