Checking if /var/log is writable before trying to copy live.log to the newly mounted...
authorRene Mayrhofer <rene@mayrhofer.eu.org>
Tue, 24 Feb 2009 13:32:12 +0000 (14:32 +0100)
committerDaniel Baumann <daniel@debian.org>
Wed, 9 Mar 2011 16:48:04 +0000 (17:48 +0100)
When using the "exposedroot skipunion" options, then /var/log may not be writable at this time, resulting in an error message during bootup.

scripts/live

index df104ef..933eb00 100755 (executable)
@@ -1585,5 +1585,5 @@ mountroot ()
        exec 1>&6 6>&-
        exec 2>&7 7>&-
        kill ${tailpid}
-       cp live.log "${rootmnt}/var/log/"
+       [ -w "${rootmnt}/var/log/" ] && cp live.log "${rootmnt}/var/log/" 2>/dev/null
 }