Changeset View
Changeset View
Standalone View
Standalone View
tools/applygnupgdefaults
#!/bin/sh | #!/bin/sh | ||||
# Apply defaults from/etc/gnupg/gpg.conf to all users -*- sh -*- | # Apply defaults from /etc/gnupg/gpg.conf to all users -*- sh -*- | ||||
# | # | ||||
# Copyright 2007 Free Software Foundation, Inc. | # Copyright 2007 Free Software Foundation, Inc. | ||||
# | # | ||||
Context not available. | |||||
[ -n "$errorfile" -a -f "$errorfile" ] && rm "$errorfile" | [ -n "$errorfile" -a -f "$errorfile" ] && rm "$errorfile" | ||||
} | } | ||||
trap cleanup EXIT SIGINT SIGHUP SIGPIPE | trap cleanup EXIT SIGINT SIGHUP SIGPIPE | ||||
errorfile="/tmp/$PGM.$$.log" | errorfile=$(mktemp "${TMPDIR:-/tmp}/$PGM.XXXXXX") || exit $? | ||||
: >$errorfile | |||||
# Check whether we can use getent | # Check whether we can use getent | ||||
Context not available. | |||||
${cat_passwd} \ | ${cat_passwd} \ | ||||
| while IFS=: read -r user dmy_a uid dmy_c dmy_d home shell dmy_rest; do | | while IFS=: read -r user dmy_a uid dmy_c dmy_d home shell dmy_rest; do | ||||
# Process only entires with a valid login shell | # Process only entries with a valid login shell | ||||
grep </etc/shells "^$shell" 2>/dev/null >/dev/null || continue | grep </etc/shells "^$shell" 2>/dev/null >/dev/null || continue | ||||
# and with an existant gnupg home directory | # and with an existant gnupg home directory | ||||
[ -d "$home/.gnupg" ] || continue | [ -d "$home/.gnupg" ] || continue | ||||
Context not available. |