public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/blueness:master commit in: net-misc/tor/files/, net-misc/tor/
Date: Tue, 30 Aug 2011 13:47:45 +0000 (UTC)	[thread overview]
Message-ID: <00d7b8e4b4d7c7a786bb6c9a22eaaeb1b4ac75b4.blueness@gentoo> (raw)

commit:     00d7b8e4b4d7c7a786bb6c9a22eaaeb1b4ac75b4
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 30 13:47:35 2011 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Aug 30 13:47:35 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/blueness.git;a=commit;h=00d7b8e4

net-misc/tor: fix logic of find in checkvarrun

(Portage version: 2.1.10.11/git/Linux x86_64, signed Manifest commit with key 0xD0455535)

---
 net-misc/tor/ChangeLog          |    3 +++
 net-misc/tor/Manifest           |   14 ++++++++++++--
 net-misc/tor/files/tor.initd-r5 |   16 ++++++++++------
 3 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/net-misc/tor/ChangeLog b/net-misc/tor/ChangeLog
index 31c4316..c14346b 100644
--- a/net-misc/tor/ChangeLog
+++ b/net-misc/tor/ChangeLog
@@ -3,6 +3,9 @@
 # $Header: /var/cvsroot/gentoo-x86/net-misc/tor/ChangeLog,v 1.269 2011/08/28 11:15:42 blueness Exp $
 
   30 Aug 2011; Anthony G. Basile <blueness@gentoo.org> files/tor.initd-r5:
+  Fix logic of find in checkvarrun
+
+  30 Aug 2011; Anthony G. Basile <blueness@gentoo.org> files/tor.initd-r5:
   Make tor.initd-r5 checkvarrun fool proof
 
   30 Aug 2011; Anthony G. Basile <blueness@gentoo.org> files/torrc-r1,

diff --git a/net-misc/tor/Manifest b/net-misc/tor/Manifest
index bd92412..1ce83c3 100644
--- a/net-misc/tor/Manifest
+++ b/net-misc/tor/Manifest
@@ -1,12 +1,22 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
 AUX tor-0.2.2.24_alpha-respect-CFLAGS.patch 1001 RMD160 f623fd1f40cd2175c0c5b6bea3441fc87f7e8d0a SHA1 c8634481cd8273f98945f17f297f2506331d3b8d SHA256 2107434c7e7243d24043cf87eeccf60643e0cf94e8a883ebd725c23e13e667e8
 AUX tor-0.2.3.2_alpha-fix-asneeded.patch 654 RMD160 faf9cc37942dfa7f52dbe849c1819b24c0ab7940 SHA1 4400ed72fa60d04a96c82f0aba7c6eb41e23f5c5 SHA256 4500436719cb96a17bfd4eb67b2ebf2b1db222904bf1b14b75cc17b8f1b41345
 AUX tor.confd 44 RMD160 d19946be72538d0826667730e9e9a1736b0385ff SHA1 f9a40fadd018794e537282344f01c609e4dbeac7 SHA256 41d780f291847e19f632428bbf27c3f289414afd237546d2974da1b75384c25c
-AUX tor.initd-r5 2251 RMD160 cd0d92439d2b00b0cf24225279ee0bd3ee1be97b SHA1 8e45b1e043135236be3fa549edfcd68a9328c30b SHA256 caaed0d9ad061cb0e131c244e2b96e7c76cd4be356f2acea2fa773d6fca76010
+AUX tor.initd-r5 2299 RMD160 b0d0daf179dda2de496453fa406fcab8831180b4 SHA1 9d53d783a1fb9fa8d368b18fec8c560c7a5e764f SHA256 260ba8f87690b58f2cf08eace8c65ac2e149d4fe87e91f98134585e6a36b45ea
 AUX torrc-r1 140 RMD160 4949b9c875ee65d876381015eb7f00a2c611494c SHA1 52e5bc3cfb19f8c912697e5489cc1b7527f8059e SHA256 6766943a69e4784d02f173b5d74b8eb9345f878ef4eb36edab34bbf649ef2738
 AUX torrc.sample.patch 1281 RMD160 dfc56376c636acbf965ae80237873489659d46a2 SHA1 01ebc6c28b4d1753266bf34ef72de92937865c4f SHA256 b60b3f454eb0d475c6746ee18b70f1681f8653a4b2e032889135f8939dd13e14
 DIST tor-0.2.2.32.tar.gz 2701371 RMD160 649c21f7ec89e34774c79db6544b612f0895bb61 SHA1 4baddc836931b3e915974c261e405e111636b716 SHA256 8744328c10b54950e08ee404a75a0e76865be0615cad6f7ffc8c75af7151ef4d
 DIST tor-0.2.3.2-alpha.tar.gz 2755750 RMD160 d34ac6b45360af873202a6884ce12ccf0420adee SHA1 020eb00aaaafa1e7102ae8fd95d3d6a719a61289 SHA256 8f423af73c8d8477752858cfcc0c15860f487a0f9a390e791eaea22f4b467edd
 EBUILD tor-0.2.2.32-r1.ebuild 2381 RMD160 0bffd0fbcf2798bbd28d7d0f418ef1b7bfa1bcbe SHA1 67d33f2f8d37a4516b7935f925b697703fb6e735 SHA256 b7a4c3abeafa81c5645d1cbdd69d2200ea6d0d62d0b03ae852789ce296da2c3e
 EBUILD tor-0.2.3.2_alpha-r3.ebuild 2638 RMD160 5283a8a27e751d3275c3a229c92087a58995a5a4 SHA1 71c8257888002c40913d7d34970a7784a78c4b19 SHA256 f752c1911199bf7379b0d3811f1c8e695443086bbe745d8f9c20019136fc37da
-MISC ChangeLog 40807 RMD160 ed5e6e91c774062b802da5e05fc4d23311a3d2a5 SHA1 f48cf35caebed892cdc03348c0e9240df3bea4c3 SHA256 ad8138accb19334434992f1dcad9a4bd51b627580370adeb59e683d3728c8cd3
+MISC ChangeLog 40918 RMD160 0a9d2ee9607f942b3ec973e468e88808c035f697 SHA1 ed70761da0e379bcc013d94db459638e5b30034c SHA256 dde05ef6d26ed673c47c6a76558424c6df5b67e9655a8047697c36b05cc3655c
 MISC metadata.xml 712 RMD160 d8585c57fead7661b72e383528b6450a2ace05eb SHA1 d97b0d9479c817d5a2207fbfc0fa5b567943c8a5 SHA256 53402fd0dc16696d9504c66ffeb85f3d8583c8621151d2faced9b1ffedbb2dbc
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.17 (GNU/Linux)
+
+iEYEAREIAAYFAk5c6fcACgkQl5yvQNBFVTVhuACeP/UhrvYPetzy/dM7//oTZB06
+yDYAnA9IY+i+P6KrLBbkHQgblspIowFy
+=PcdQ
+-----END PGP SIGNATURE-----

diff --git a/net-misc/tor/files/tor.initd-r5 b/net-misc/tor/files/tor.initd-r5
index d27a411..11027e2 100644
--- a/net-misc/tor/files/tor.initd-r5
+++ b/net-misc/tor/files/tor.initd-r5
@@ -15,16 +15,20 @@ depend() {
 checkvarrun()
 {
 	# Check if /var/run/tor exists, create it if it doesn't 
-	[ ! -d /var/run/tor ] && mkdir -p /var/run/tor
+	[ ! -d /var/run/tor ] && mkdir -p ${PIDDIR}
 	[ ! -d /var/run/tor ] && return 1
 
-	# The directory definitly exists now, but does it belong to tor?
-	find ${PIDDIR} -maxdepth 0 -a -user tor -a -group tor >/dev/null && chown tor:tor ${PIDDIR}
-	find ${PIDDIR} -maxdepth 0 -a -user tor -a -group tor >/dev/null && return 1
+	# The directory definitly exists now, but does it belong to tor:tor?
+	local dir=$(find ${PIDDIR} -maxdepth 0 -a -user tor -a -group tor)
+	[ -z "$dir" ] && chown tor:tor ${PIDDIR}
+	dir=$(find ${PIDDIR} -maxdepth 0 -a -user tor -a -group tor)
+	[ -z "$dir" ] && return 1
 
 	# And does it have the right perms?
-	find ${PIDDIR} -maxdepth 0 -perm 0755 >/dev/null && chmod 0755 /var/run/tor
-	find ${PIDDIR} -maxdepth 0 -perm 0755 >/dev/null && return 1
+	dir=$(find ${PIDDIR} -maxdepth 0 -perm 0755)
+	[ -z "$dir" ] && chmod 0755 ${PIDDIR}
+	dir=$(find ${PIDDIR} -maxdepth 0 -perm 0755)
+	[ -z "$dir" ] && return 1
 
 	# If any of the above failed, we would not be here
 	return 0



             reply	other threads:[~2011-08-30 13:47 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-30 13:47 Anthony G. Basile [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-11-26 15:19 [gentoo-commits] dev/blueness:master commit in: net-misc/tor/files/, net-misc/tor/ Anthony G. Basile
2011-11-25 13:01 Anthony G. Basile
2011-08-31 11:46 Anthony G. Basile
2011-08-30 11:30 Anthony G. Basile
2011-08-30  4:06 Anthony G. Basile
2011-08-30  4:01 Anthony G. Basile
2011-08-30  3:35 Anthony G. Basile
2011-07-23 11:29 Anthony G. Basile
2011-07-22 17:30 Anthony G. Basile
2011-06-07 21:16 Anthony G. Basile
2011-06-07 21:00 Anthony G. Basile
2011-06-06 17:27 Anthony G. Basile
2011-06-06 16:54 Anthony G. Basile
2011-05-30 20:49 Anthony G. Basile
2011-05-30 20:48 Anthony G. Basile
2011-05-10 11:37 Anthony G. Basile
2011-05-07 19:29 Anthony G. Basile
2011-04-11  0:48 Anthony G. Basile
2011-04-09 17:39 Anthony G. Basile
2011-04-05 11:57 Anthony G. Basile
2011-03-27  4:39 Anthony G. Basile
2011-03-27  4:01 Anthony G. Basile
2011-03-25  0:14 Anthony G. Basile
2011-02-10  0:02 Anthony G. Basile
2011-02-09 23:55 Anthony G. Basile
2011-02-09 23:29 Anthony G. Basile

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00d7b8e4b4d7c7a786bb6c9a22eaaeb1b4ac75b4.blueness@gentoo \
    --to=blueness@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox