tuned/0002-logging-initialization-fix-module-inclusion.patch
2010-01-26 15:44:04 +00:00

55 lines
1.4 KiB
Diff

From 7dbf7151f37588f61f2c57fe4f374e3bd8c7d145 Mon Sep 17 00:00:00 2001
From: Jan Vcelak <jvcelak@redhat.com>
Date: Tue, 26 Jan 2010 16:19:51 +0100
Subject: [PATCH] logging: initialization fix, module inclusion into result rpm package
---
Makefile | 1 +
tuned | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 3ae3f76..ce98e08 100644
--- a/Makefile
+++ b/Makefile
@@ -72,6 +72,7 @@ install:
install -m 0644 tuned.py $(DESTDIR)/usr/share/$(NAME)/
install -m 0644 tuned_adm.py $(DESTDIR)/usr/share/$(NAME)/
install -m 0644 tuned_nettool.py $(DESTDIR)/usr/share/$(NAME)/
+ install -m 0644 tuned_logging.py $(DESTDIR)/usr/share/$(NAME)/
for file in $(FILES_tuningplugins); do \
install -m 0644 $$file $(DESTDIR)/usr/share/$(NAME)/tuningplugins; \
done
diff --git a/tuned b/tuned
index 1dda946..1fa2f57 100755
--- a/tuned
+++ b/tuned
@@ -22,8 +22,12 @@
#
import sys, os.path, getopt, atexit, signal
-import logging, tuned_logging
+TUNEDDIR = "/usr/share/tuned"
+if not TUNEDDIR in sys.path:
+ sys.path.append(TUNEDDIR)
+
+import logging, tuned_logging
log = logging.getLogger("tuned")
def usage():
@@ -83,10 +87,6 @@ if __name__ == "__main__":
elif opt in ['-D', "--debug"]:
debug = True
- TUNEDDIR = "/usr/share/tuned"
- if not TUNEDDIR in sys.path:
- sys.path.append(TUNEDDIR)
-
from tuned import tuned
tuned.init(TUNEDDIR, cfgfile, debug = debug)
--
1.6.6