5 # ovo se moze otkomentirati, ako se ne zele poruke o duplim GECOS aliasima
8 PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
10 [ -x /usr/sbin/postalias ] || exit 0
11 [ -f /etc/postfix/main.cf ] || exit 0
12 gecos="/var/lib/postfix-cn/aliases_gecos"
13 grep -q "hash:$gecos" /etc/postfix/main.cf || exit 0
15 [ -d /var/lib/postfix-cn/ ] || exit 0
18 . /usr/share/carnet-tools/functions.sh
20 getent passwd | awk -F: '
21 $3 >= 100 && $1 != "nobody" && $5 \
26 print tolower(g[1]) ": " $1;
27 }' > $gecos.dpkg-tmp.$$
30 if ! cmp -s $gecos.dpkg-tmp.$$ $gecos > /dev/null; then
31 cp_mv $gecos.dpkg-tmp.$$ $gecos
32 postalias $PA_OPTIONS hash:$gecos
34 rm -f $gecos.dpkg-tmp.$$