diff options
author | Eray Aslan <eras@gentoo.org> | 2012-08-11 13:12:35 +0000 |
---|---|---|
committer | Eray Aslan <eras@gentoo.org> | 2012-08-11 13:12:35 +0000 |
commit | 074aba2e9d070ea4854f87e4370421f61494880d (patch) | |
tree | 7d69a45062142ea9aa4c374bfc41cbfa9102e393 /app-antivirus | |
parent | x86 stable, bug #418891 (diff) | |
download | historical-074aba2e9d070ea4854f87e4370421f61494880d.tar.gz historical-074aba2e9d070ea4854f87e4370421f61494880d.tar.bz2 historical-074aba2e9d070ea4854f87e4370421f61494880d.zip |
Use checkpath in init script
Package-Manager: portage-2.2.0_alpha120/cvs/Linux x86_64
Diffstat (limited to 'app-antivirus')
-rw-r--r-- | app-antivirus/clamav/ChangeLog | 5 | ||||
-rw-r--r-- | app-antivirus/clamav/Manifest | 30 | ||||
-rwxr-xr-x | app-antivirus/clamav/files/clamd.initd | 60 |
3 files changed, 49 insertions, 46 deletions
diff --git a/app-antivirus/clamav/ChangeLog b/app-antivirus/clamav/ChangeLog index 35ca708c0e17..a375e557bbe7 100644 --- a/app-antivirus/clamav/ChangeLog +++ b/app-antivirus/clamav/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for app-antivirus/clamav # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v 1.419 2012/08/07 18:09:58 eras Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v 1.420 2012/08/11 13:12:35 eras Exp $ + + 11 Aug 2012; Eray Aslan <eras@gentoo.org> files/clamd.initd: + Use checkpath in init script *clamav-0.97.5-r1 (07 Aug 2012) diff --git a/app-antivirus/clamav/Manifest b/app-antivirus/clamav/Manifest index ce5af7602cdd..248d51fed05b 100644 --- a/app-antivirus/clamav/Manifest +++ b/app-antivirus/clamav/Manifest @@ -6,7 +6,7 @@ AUX clamav-0.97.4-gcc47.patch 875 SHA256 62a54f42bcb068953f7af80d52b3e03b5506408 AUX clamav-milter.README.gentoo 1124 SHA256 5e7b142b68964bc3463b077e5698fa77cace45ea9612258b1e1849cee944dd11 SHA512 1c6160e48eddd28f83ec5f24757f788781cef55789d1934dfccc12c7c5e5635a226d26b0983cab7344c142f5a2f1db172640b1d0e6c840a6fa83abed9be1211a WHIRLPOOL f85b17448fd93205e2f38d024b96410cc8d143d077201e0a1b8f4cda95ae2447a70eded4cb90968a593ad2637229300fa04bfe5dba96d3d68c2d09c105ee3f16 AUX clamav.logrotate 355 SHA256 ab91f784d5098d2162be9277e3a006bdb392d9d89975838ad4ac7dfd8b418170 SHA512 39e8027db4cb2cf1b45dac6777dbd922640b41f47deb34199d910560d56431051432b68ab387101542d8f98069253c85bb2ab39c274eb99c2db26c5967abf512 WHIRLPOOL 0d201d6909d309e22526ed0d40da588602d0b34367b9e7d54b42d6626c7b7bac1150c1671740cead5d900baa8a6a098feaeb1127251d9a45eb35203016197193 AUX clamd.conf 234 SHA256 17bf4fe3596dc5b145e4163d85181e2edcaa214df3cf9072d852ba0e7a569891 SHA512 ec069cf7aaf10b42a701938b57e1fde1ee15afd1d4af928edfa7e5d505ba8b3edaaceac449da0f4ac6beea09a3fb73453526ba0cd3a04e13259c1a2720f42f78 WHIRLPOOL 667ad1567bb398a20785096f2c2c7c72be4853ee3b0674c4fcc20eb2c9123815c273f40938961e348252e3376c4402a3f952b2a72d3bb3f0907aadb7ab77b8ed -AUX clamd.initd 3112 SHA256 ed03992f1d93c350b71beff0a050515233a2632810d444a56345fae45d679037 SHA512 bf2ecfedf2d070bf08a2f07e8fc3a91bfe1186f32c090cfc4b03fdab62c52c7ae17cfb26859b298f67802475039fec36d66ae0674edb40cfc6d6fd5b9ad2908b WHIRLPOOL 29ba9bcff8f5243b597d48b84bce75afc93a743cadf455048589cffa5b906ae0cbf753d018d1cf0ddb732ba4ffc78d7aa6186736fbc70994f5ce7ed5f3592d54 +AUX clamd.initd 2991 SHA256 c4bd4b52599f2ee1ff40dd9d3ce95e2028d20ac6e1195d89aab0f502fb983a2f SHA512 399ec886ebfb56653473854f2806dad3e801eed09afc4ad0ed0cf5ea6773945213ba25203f8ea312cfad2b1e684c8921ec4d096af6235306e4ee5a36192e92d5 WHIRLPOOL 250f30bdc9074a17782e4e9e62dc1917b4bd156dec25ed85b2b3818b0638b5395f2d942f3d5d04794228eab45ffa2defe2f61a6a176891b5161892647a119609 AUX clamd.rc 2847 SHA256 f245a57ac69f3f3c51381f958a23f0fd9941744ec6a262767d0d4f2414af10e9 SHA512 02df5ae2127bc4f19052e9d8f59bfbf0aa53ce6756141711802ae8e071342aa88fed62f6296aaccb98cf8cc72452e50e3309ed274ce3c9393de28d4aee35efe6 WHIRLPOOL 8544304c383c39cd701a54e05b28d665530eaff4481f017a47131890be64dd60853b199928166a3410d9c66e50302155cea3482b555346cf5820d4a6442ff92d DIST clamav-0.97.3.tar.gz 45793398 SHA256 3a8cece5b7e6b15410f6b8f96ff5591b2c5a72f290ee8a28fefda44cb5ae7aba SHA512 7dc22da6a318782bf7a1a1e1ce8efe7256419f28352109146c9139c4a119b61021e23a773a26e7916244dfc186b9839422dc7e5ea88343dcd5ae70002ee8a7e1 WHIRLPOOL db0d6e6f620c3325d2870cb679c99c0d944c0bd24f939d694e10ca82c047467fff5daa6a6413389d8e0f3e5ca76aa9656f1f9e02fbdeb009cb368fb7eaada112 DIST clamav-0.97.4.tar.gz 48386114 SHA256 958dd09c9da9ceb50c9e556b3ced9cbdf40e836d2bdc98286ce96e84fd4a5a53 SHA512 010b9a2a41755bf2ff7acd279f2ac29bb9709f23ec4cd94ffa62818b7babc7098e98df2819a2c6e8433a51b2b601b95e4e88ecd8f80e0f22575101cb23b2fc06 WHIRLPOOL 5c34e9ae3d89b1e6f560271dc539bbabeebbb3dcf1e0267fe06173d9861c10e53cd1b309f67af3d6a1336e09247363ec3c82506d7ae5b5772fef8ccf36359cf8 @@ -15,22 +15,22 @@ EBUILD clamav-0.97.3.ebuild 3631 SHA256 50f6f775d254bc9c85689ad22b7cdf262ea87c0d EBUILD clamav-0.97.4.ebuild 3681 SHA256 0c710c93eec32d44d28ea7940892d157e2224f5e42310a4bc272275933471019 SHA512 69da0f89296400bdc5cbff82a3cf33a931c6449bca6de655f806af544e4c2ccba2bb9f355eed29fc14cbe22910033082a0ff21117d60c0b05d717703f728b4fb WHIRLPOOL 9e8afe4dcf5741d9862c388732f29a464b40fe74e73410685bad62985b6873d61c8fd78c0313268486c8f4f52ec770b2b7507ea2714822ddd192de18802546a8 EBUILD clamav-0.97.5-r1.ebuild 3606 SHA256 8db4ead09bc059f0a74cd826974706c279c934463f7652f32e27a34d5bfd8bf4 SHA512 972d911c9bc5d150b7fe536f96d8f2b1a8a757519ac28903b7768714d381355a6a065b90627e87b2e6745130f0abeee5bd6f3c25d1abda7b163bc4aad89d8729 WHIRLPOOL 5077b41a75c4a2150622a1e453814bad6ac25237725f5ad92a3c95924e8c2b5041e471bfecd4ac2adf97cbdaa1cf477ecd0abe94f69632abdc407aaa4e6d8a0b EBUILD clamav-0.97.5.ebuild 3605 SHA256 27e8697709c41729013e43b15f608846e9582ca0c1495a3c22941a2c894167c7 SHA512 4abdab560d4d0e6cf54e86abb6f56111aac7e44b732f046b6c84957b80dd957f39e4f6b77d3fff3e54f2d0f92016189dc2eb6939ff13e17cfcbdd014e4bf0b46 WHIRLPOOL 11ae359f943b7ca183cd2461b2f2d55b82d038dffe0a954527b1b78133583537e30c060e28d249862d9797c28a6045e776c4306428666ac281192e995eadaa3b -MISC ChangeLog 61826 SHA256 7721e0fda6a8e3cdebb2eeb8ef398a9012fb0e76090015d65eee03f3eefc1d01 SHA512 3de84afdc68fa6b217cf0774bfe9e5beefac6a2886d85e34d8af96cb46eb6e22d8f67d9f2907b2ab7a29efcd6079d567ffc60bd11a6f37c7c38c78c9b9d7c03a WHIRLPOOL e4034ce3784ace46cafe7276b834daf703f7373324aed0fed29350ecd32e604f7454b0de24fdc566880d76d5fe65a9b6061d14be2ca3f398b5895c16d3583d88 +MISC ChangeLog 61921 SHA256 f87034dcd1ece20e5e4b28ed5ca4173f2ce8f405c22576d37dfd483d22f321f1 SHA512 f021885e12960b883f57e7da3c007a692152745b0d1244e243fe377907e39ca2a5ecef0cd0ae53ea340354a5b6e604e2c6516dfee8c3785fe757c62552e36a8b WHIRLPOOL 9fd7c1bba0d2b651c1fd7aa70cec41e58e19fcc77c16af486d248ab9b8257d3a502e2778db00338c5f8da195bad47cb187b140f65499fc7b7127590a58f25196 MISC metadata.xml 320 SHA256 e2a8c4c8bedbffe50a126c1c7395a4d92652c2d95347b9496d54aea1f230a22d SHA512 c5bb20c993b91112d9c9e0b7bb6c116ac7f711c769084eaaacc28bc7eeb54db09c9794c6ef057747d80a08cf1502f0f688cdefc741423a38da55b2deaebd6476 WHIRLPOOL 741ff80258dee2c145d08f72f10982bd5c1fcba44ed84054cd1a33787864a7d8821b432c3246ad5a04ce11edde7d045f3eb6e056200e3bd2e8505eeea3d7277d -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iQIcBAEBCAAGBQJQIVoEAAoJEHfx8XVYajsfjo8P/iSe/tELYMtqFc8XKyGEdM88 -5DPrbm8/1f6TW8+QotltDJ5mB4vGJNP5KcLGZYRmcjipyi6txhAPwvz3uZkXMvJ2 -DT0RWVS8HYBtVQxfMiMNCuEKCSSHXH62okxh7mHvtRGWbqLTELu1ILLgR0LwcRij -1DR00DcuBvUy0TIBmZfJJwhiHyyn0cyhIQtGHYAunFRGtWI6GdAW4T83CnAI6veE -tAhCjzhuYCigtQZITfEth1dGGuY1iUwSN0vJ2alcobgqDrcJtlDC/LZ3q0Y+7BU/ -dAY1jORXUg/+zIbWFAYoX/AKMrHYvmSngPsPe05yXsap2KTNB7JJkmCHyH8f9GlW -ToBs5V3k086erKemQUAIN0c+/6dXkZDiJz9rWznlW8NfKuJDY77bOWVYLa+03pOe -BBhvTCMLVNjCWRf58ICYcEC1QBCibptChyZEMXXiamB7/pi4FBqM6NwmD2SIJUHa -jO6Yf+xFrasWZOTkLJ0zYsskhmAAeR22KGng6QukX0cfSKHqHu8a4hEwpxjfaOOY -Zmcd9fEVjP9lh/OGjlWW5ZtRWttqlxIEGjdJG6P9Dt+OAt5Dq7cQkFqEQ+nc51CY -mHsizU0zQzDnXOYJPAdQrZ0sUzxWjQ40eOqY+a+sIYChqXj+MsmKUxG8FQHoUhUE -WfRWKnDOcOF5/+MQRZ0S -=/BrW +iQIcBAEBCAAGBQJQJlpRAAoJEHfx8XVYajsfQe0QAIHe/x0MaRuYshFwKyQSaFr8 +iqyqpZ5jAdZEHqz8qFuZzLCg/JgUknCbHttB/8IlZNy7DRRb6eDjaM79aZ0/TayD +kppFdv4NBp4fL6UKR0wG5CgZd3Sbn1b5YnAdHVHs10Ze08dVt+VRoAGvJzX6dFfS +gyZwAXCeXIKc2bUo/7tqLqvUMJAnn5g78v7K2LTQpxWLl2U/JvylTH+oPEuJ48ta +ZUBvcGdViqNyNxtAbiVH3gCV2C+XWfr7YqdRXq0r9YM4dFewIOTeEI04OkTww261 +yIBwx4v/VjA8rE11FMj/zwL7mR48nvc5kxv6dDUTHa5sjSp8vZRZmH3hGiprfyFg +QOHGPYXdkhYLsvtrsmwq1ldXy3fQWteZfrhquMXyGP/d0fZlx8l+777SkJyVhJ8U +i7TZw75u4OyRV63ZvxYYelkyz9QV6CTG1yD9yXCYu6knUejpyoBl4ohUeXj/9F2d +bbjWcpsOi/SP9esr2BFZy10Qgd9gaYOn82sZKSjfnDFfXhaXrCUiOvAv4AznGs6C +7bosvJPPfhg6OpHBfRMZrAjnjL7iDVUc+dz/bojTOOsp8s8rhsYXzPXhszLhoohq +qZsAqpWIJhxuCGlQi0DOS7C9COnkJPA5Xc8cZ/m7fgwflo/yTDGQZWUBNAsygjl2 +GexST9KCmAcALBoLIya6 +=QR7N -----END PGP SIGNATURE----- diff --git a/app-antivirus/clamav/files/clamd.initd b/app-antivirus/clamav/files/clamd.initd index 0e60680d206a..40ccd00bd6be 100755 --- a/app-antivirus/clamav/files/clamd.initd +++ b/app-antivirus/clamav/files/clamd.initd @@ -1,7 +1,11 @@ #!/sbin/runscript # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/files/clamd.initd,v 1.1 2012/08/07 18:09:58 eras Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/files/clamd.initd,v 1.2 2012/08/11 13:12:35 eras Exp $ + +daemon_clamd="/usr/sbin/clamd" +daemon_freshclam="/usr/bin/freshclam" +daemon_milter="/usr/sbin/clamav-milter" extra_commands="logfix" @@ -11,35 +15,35 @@ depend() { } get_config() { - clamconf | \ - sed 's/["=]//g' | \ + clamconf | sed 's/["=]//g' | \ awk "{ - if(\$0==\"Config file: $1.conf\")S=1 - if(S==1&&\$0==\"\")exit - if(S==1&&\$1~\"^$2\$\"){ - print \$2!=\"disabled\"?\$2:\"$3\"; + if(\$0==\"Config file: $1.conf\") S=1 + if(S==1&&\$0==\"\") { + print \"$3\" + exit + } + if(S==1&&\$1~\"^$2\$\") { + print \$2!=\"disabled\"?\$2:\"$3\" exit - } + } }" } start() { local clamd_socket=$(get_config clamd LocalSocket /tmp/clamd) - local clamd_socket_dir=`dirname ${clamd_socket}` logfix if [ "${START_CLAMD}" = "yes" ]; then - if [ ! -e "${clamd_socket_dir}" ]; then - mkdir ${clamd_socket_dir} - chown $(get_config clamd User clamav) ${clamd_socket_dir} - fi + checkpath --quiet \ + --owner $(get_config clamd User clamav):root \ + --directory `dirname ${clamd_socket}` if [ -S "${clamd_socket}" ]; then rm -f ${clamd_socket} fi ebegin "Starting clamd" start-stop-daemon --start --quiet \ --nicelevel ${CLAMD_NICELEVEL:-0} \ - --exec /usr/sbin/clamd + --exec ${daemon_clamd} eend $? "Failed to start clamd" fi @@ -47,7 +51,7 @@ start() { ebegin "Starting freshclam" start-stop-daemon --start --quiet \ --nicelevel ${FRESHCLAM_NICELEVEL:-0} \ - --exec /usr/bin/freshclam -- -d + --exec ${daemon_freshclam} -- -d retcode=$? if [ ${retcode} = 1 ]; then eend 0 @@ -65,7 +69,7 @@ start() { ebegin "Starting clamav-milter" start-stop-daemon --start --quiet \ --nicelevel ${MILTER_NICELEVEL:-0} \ - --exec /usr/sbin/clamav-milter -- -c ${MILTER_CONF_FILE} + --exec ${daemon_milter} -- -c ${MILTER_CONF_FILE} eend $? "Failed to start clamav-milter" fi } @@ -93,13 +97,11 @@ logfix() { # fix clamd log permissions # (might be clobbered by logrotate or something) local logfile=$(get_config clamd LogFile) - local clamav_user=$(get_config clamd User) - if [ -n "${logfile}" ] && [ -n "${clamav_user}" ]; then - if [ ! -f "${logfile}" ]; then - touch ${logfile} - fi - chown ${clamav_user} ${logfile} - chmod 640 ${logfile} + if [ -n "${logfile}" ]; then + checkpath --quiet \ + --owner $(get_config clamd User clamav):root \ + --mode 640 \ + --file ${logfile} fi fi @@ -107,13 +109,11 @@ logfix() { # fix freshclam log permissions # (might be clobbered by logrotate or something) local logfile=$(get_config freshclam UpdateLogFile) - local freshclam_user=$(get_config freshclam DatabaseOwner clamav) - if [ -n "${logfile}" -a -n "${clamav_user}" ]; then - if [ ! -f "${logfile}" ]; then - touch ${logfile} - fi - chown ${freshclam_user} ${logfile} - chmod 640 ${logfile} + if [ -n "${logfile}" ]; then + checkpath --quiet \ + --owner $(get_config freshclam DatabaseOwner clamav):root \ + --mode 640 \ + --file ${logfile} fi fi } |