From a97463f6c90434039bcd550ae2c103993c376561 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Sun, 18 Jan 2015 13:15:01 +0100 Subject: [PATCH] Support also different version of Hadoop (=Fedora). --- files/accounting/quota.awk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/files/accounting/quota.awk b/files/accounting/quota.awk index b3b0a44..8aa92da 100644 --- a/files/accounting/quota.awk +++ b/files/accounting/quota.awk @@ -19,8 +19,13 @@ BEGIN { print "INSERT INTO measure (name) VALUES ('quota');"; } -{ +/^[0-9]+[ ]+[0-9]+[ ]+\/.*/ { used=$1 user=$4 print "INSERT INTO quota (id_measure, user, used) VALUES (last_insert_id(), " dbstr(user) ", " dbi(used) ");" } +/^[0-9]+[ ]+\/.*/ { + used=$1 + user=$3 + print "INSERT INTO quota (id_measure, user, used) VALUES (last_insert_id(), " dbstr(user) ", " dbi(used) ");" +} -- 1.8.2.3