X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Ffunctions.sh;h=8a4159170569fb2d4a0815a4f0e1a4450500b247;hb=c5795c3d1345f151cab2c21128afdffd40397204;hp=a3b80f88e6b1cb7d3f63bb9630792d2aa1a9b675;hpb=7beb8b3889e6e87f0febc1d2117b0c7380a22339;p=amavisd-cn.git diff --git a/src/functions.sh b/src/functions.sh old mode 100644 new mode 100755 index a3b80f8..8a41591 --- a/src/functions.sh +++ b/src/functions.sh @@ -100,40 +100,6 @@ noisy_backup() { cp_echo "CN: Current configuration saved in /var/backups/`basename $1`.bak" } -# if fqdn is name.dom3.dom2.dom1.hr, check if this host is MX for -# either dom3.dom2.dom1.hr, dom2.dom1.hr or dom1.hr and dump highest level -# domain on stdout -get_domain() { - local domains d - RET=$host - if ! echo $host | grep -q '\.'; then - return - fi - if [ ! -x /usr/bin/host ]; then - cp_echo "CN: no host command... \$mydomain value might be unoptimal." - return - fi - domains=$(hostname -f | awk -F. ' - { - for (i=2; i/dev/null 2>\&1:g' "$1" + fi + shift + done +}