1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#! /bin/sh /usr/share/dpatch/dpatch-run
## 80-log-permissions.dpatch by martin f. krafft <madduck@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad upstream.trunk~/hibernate.sh upstream.trunk/hibernate.sh
--- upstream.trunk~/hibernate.sh 2006-08-07 23:56:03.000000000 +0100
+++ upstream.trunk/hibernate.sh 2006-08-08 11:45:52.198837598 +0100
@@ -826,7 +826,14 @@
ParseOptions "$@"
# Set a logfile if we need one.
-[ -n "$LOGFILE" ] && LOGPIPE="tee -a -i $LOGFILE"
+if [ -n "$LOGFILE" ]; then
+ if [ ! -f "$LOGFILE" ]; then
+ touch "$LOGFILE"
+ chmod 644 "$LOGFILE"
+ chown root:adm "$LOGFILE"
+ fi
+ LOGPIPE="tee -a -i $LOGFILE"
+fi
# Redirect everything to a given VT if we've been given one
if [ -n "$SWSUSPVT" ] && [ -c /dev/tty$SWSUSPVT ] ; then
diff -urNad upstream.trunk~/logrotate.d-hibernate-script upstream.trunk/logrotate.d-hibernate-script
--- upstream.trunk~/logrotate.d-hibernate-script 2006-08-07 23:56:03.000000000 +0100
+++ upstream.trunk/logrotate.d-hibernate-script 2006-08-08 11:46:11.439702283 +0100
@@ -3,4 +3,5 @@
rotate 5
size 100k
weekly
+ notifempty
}
|