public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Vikraman Choudhury" <vikraman.choudhury@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoostats:master commit in: overlay/app-portage/gentoostats/
Date: Sat, 20 Aug 2011 19:26:36 +0000 (UTC)	[thread overview]
Message-ID: <287df17a00eaf4349d7bb04ccc12b060f37255eb.vikraman@gentoo> (raw)

commit:     287df17a00eaf4349d7bb04ccc12b060f37255eb
Author:     Vikraman Choudhury <vikraman.choudhury <AT> gmail <DOT> com>
AuthorDate: Thu Aug 18 19:43:34 2011 +0000
Commit:     Vikraman Choudhury <vikraman.choudhury <AT> gmail <DOT> com>
CommitDate: Thu Aug 18 19:43:34 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoostats.git;a=commit;h=287df17a

fixes by antarus

---
 overlay/app-portage/gentoostats/Manifest           |    2 +-
 .../gentoostats/gentoostats-9999.ebuild            |   19 ++++++++++++++++---
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/overlay/app-portage/gentoostats/Manifest b/overlay/app-portage/gentoostats/Manifest
index 1fc6430..b9d8459 100644
--- a/overlay/app-portage/gentoostats/Manifest
+++ b/overlay/app-portage/gentoostats/Manifest
@@ -1 +1 @@
-EBUILD gentoostats-9999.ebuild 1319 RMD160 e6dabb21e90207c85c12a3140fb227602f7b6911 SHA1 8d9ee7a60453a09529e6f7f7d2866987fdf1494f SHA256 cae18e0b8b29eb3c374be5ff313593ffecc0f9e4bad07be174dd3fb9fdc3afb2
+EBUILD gentoostats-9999.ebuild 1745 RMD160 b166ed97e35be943cab17d9a232ab0322fa52d36 SHA1 e7727aa3c58d7713f20b0787e5c5544fbaaae880 SHA256 01c3bb3a9cfc6dbc25d20a4b1b4ec223cf6a428ba38a5a98f6d7779a3b1c1927

diff --git a/overlay/app-portage/gentoostats/gentoostats-9999.ebuild b/overlay/app-portage/gentoostats/gentoostats-9999.ebuild
index 30892e9..2a3c666 100644
--- a/overlay/app-portage/gentoostats/gentoostats-9999.ebuild
+++ b/overlay/app-portage/gentoostats/gentoostats-9999.ebuild
@@ -25,12 +25,12 @@ RDEPEND="${DEPEND}
 	dev-python/simplejson"
 
 src_compile() {
-	cd "client"
+	pushd "client"
 	distutils_src_compile
 }
 
 src_install() {
-	cd "client"
+	pushd "client"
 	distutils_src_install
 
 	dodir /etc/gentoostats || die
@@ -42,6 +42,19 @@ src_install() {
 	fperms 0640 /etc/gentoostats/payload.cfg || die
 }
 
+generate_uuid() {
+	if [[ -e /proc/sys/kernel/random/uuid ]]; then
+		cat /proc/sys/kernel/random/uuid
+	else
+		AUTH1=$(< /dev/urandom tr -dc a-zA-Z0-9 | head -c8)
+		AUTH2=$(< /dev/urandom tr -dc a-zA-Z0-9 | head -c4)
+		AUTH3=$(< /dev/urandom tr -dc a-zA-Z0-9 | head -c4)
+		AUTH4=$(< /dev/urandom tr -dc a-zA-Z0-9 | head -c4)
+		AUTH5=$(< /dev/urandom tr -dc a-zA-Z0-9 | head -c12)
+		echo "${AUTH1}-${AUTH2}-${AUTH3}-${AUTH4}-${AUTH5}"
+	fi
+}
+
 pkg_postinst() {
 	distutils_pkg_postinst
 
@@ -51,7 +64,7 @@ pkg_postinst() {
 		touch "${AUTHFILE}"
 		echo "[AUTH]" >> "${AUTHFILE}"
 		echo -n "UUID : " >> "${AUTHFILE}"
-		cat /proc/sys/kernel/random/uuid >> "${AUTHFILE}"
+		generate_uuid >> "${AUTHFILE}"
 		echo -n "PASSWD : " >> "${AUTHFILE}"
 		< /dev/urandom tr -dc a-zA-Z0-9 | head -c16 >> "${AUTHFILE}"
 	fi



             reply	other threads:[~2011-08-20 19:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-20 19:26 Vikraman Choudhury [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-01-02  6:34 [gentoo-commits] proj/gentoostats:master commit in: overlay/app-portage/gentoostats/ Göktürk Yüksek
2017-01-02  6:34 Göktürk Yüksek
2016-12-29  6:25 Göktürk Yüksek
2016-12-12  3:00 Göktürk Yüksek
2011-06-23 15:14 Vikraman Choudhury
2011-06-23 13:40 Vikraman Choudhury
2011-06-19 18:25 Vikraman Choudhury

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=287df17a00eaf4349d7bb04ccc12b060f37255eb.vikraman@gentoo \
    --to=vikraman.choudhury@gmail.com \
    --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