From f89a66e0852458417f69c1a3b8356ad44f361cf0 Mon Sep 17 00:00:00 2001 From: ms Date: Thu, 19 Jul 2007 17:04:04 +0000 Subject: [PATCH] Asynchrones Syslogging aktiviert (Performancegruende) Cron.log deaktiviert. Pakfire hat eine eigene Logdatei bekommen. Grosse Dateien und Logs des Pakfire werden ausgelagert auf /var. qosd sollte nun besser gekillt werden. Hartnaeckiger Bursche. git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@711 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- config/etc/syslog.conf | 14 +++++++------- config/qos/makeqosscripts.pl | 3 ++- config/rootfiles/ver_full/pakfire | 3 +++ lfs/pakfire | 8 +++++++- src/pakfire/lib/functions.pl | 2 +- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/config/etc/syslog.conf b/config/etc/syslog.conf index bd49f61ed9..6db495233f 100644 --- a/config/etc/syslog.conf +++ b/config/etc/syslog.conf @@ -5,22 +5,22 @@ # Log anything (except mail) of level info or higher. # Don't log private authentication messages! # local0.* any dhcpcd log (even debug) in messages -daemon.*;local0.*;local2.*;*.info;mail.none;authpriv.* /var/log/messages +daemon.*;local0.*;local2.*;*.info;mail.none;authpriv.* -/var/log/messages # Log crons -cron.* -/var/log/cron.log +#cron.* -/var/log/cron.log # Everybody gets emergency messages -*.emerg * +*.emerg * # Save boot messages also to boot.log -local7.* /var/log/boot.log +local7.* /var/log/boot.log # Display logs on tty12 -*.* /dev/tty12 +*.* /dev/tty12 # Optionally log to a remote host -#*.* @hostname.domain +#*.* @hostname.domain # Postfix logs -mail.* /var/log/mail +mail.* -/var/log/mail diff --git a/config/qos/makeqosscripts.pl b/config/qos/makeqosscripts.pl index c3dac4044a..d9bb5518e5 100644 --- a/config/qos/makeqosscripts.pl +++ b/config/qos/makeqosscripts.pl @@ -636,7 +636,8 @@ print </dev/null) & # DELETE QDISCS tc qdisc del dev $qossettings{'RED_DEV'} root tc qdisc del dev $qossettings{'IMQ_DEV'} root diff --git a/config/rootfiles/ver_full/pakfire b/config/rootfiles/ver_full/pakfire index 09529db89b..5dddca4cf3 100644 --- a/config/rootfiles/ver_full/pakfire +++ b/config/rootfiles/ver_full/pakfire @@ -15,3 +15,6 @@ opt/pakfire/logs #opt/pakfire/meta opt/pakfire/pakfire opt/pakfire/tmp +var/cache/pakfire +var/log/pakfire +var/log/pakfire.log diff --git a/lfs/pakfire b/lfs/pakfire index 6ebd6e1b15..f09d18fdef 100644 --- a/lfs/pakfire +++ b/lfs/pakfire @@ -51,11 +51,17 @@ md5 : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) - -mkdir -p /opt/pakfire/{cache,db/{meta,lists,rootfiles,installed},etc,lib,logs,tmp} + -mkdir -p /opt/pakfire/{db/{meta,lists,rootfiles,installed},etc,lib,tmp} \ + /var/log/pakfire /var/cache/pakfire cp -fRv $(DIR_SRC)/src/pakfire/* $(DIR_APP) mv -vf $(DIR_APP)/pakfire.conf $(DIR_APP)/etc/ chown root.root $(DIR_APP) -R chmod 755 $(DIR_APP)/pakfire + -cd $(DIR_APP) && find $(DIR_APP) -name .svn -exec rm -rf {} \; ln -sf ../../opt/pakfire/pakfire /etc/fcron.daily/pakfire-update + + touch /var/log/pakfire.log + ln -sf ../../var/log/pakfire /opt/pakfire/logs + ln -sf ../../var/cache/pakfire /opt/pakfire/cache @$(POSTBUILD) diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index 14edfdcc9c..22bf66947b 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -66,7 +66,7 @@ sub message { sub logger { my $log = shift; - system("logger -t pakfire \"$log\"") if "$log"; + system("logger -f /var/log/pakfire.log -t pakfire \"$log\"") if "$log"; } sub usage { -- 2.39.2