From 5544da4605e8fa26901f53afeec11851b941aa69 Mon Sep 17 00:00:00 2001 From: Tim Miller Date: Fri, 15 Feb 2013 10:01:58 -0800 Subject: [PATCH] first-boot.d scripts log to a file: Log first-boot.d script output to a file, to ease troubleshooting, since the first-boot scripts are removed from the system after running, even in case of failure. Change-Id: I07d5c782dd918a804e054bf08efce89ed9442e0c --- lib/img-functions | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/img-functions b/lib/img-functions index ae55abf3..8a0ad7bb 100644 --- a/lib/img-functions +++ b/lib/img-functions @@ -143,7 +143,10 @@ function prepare_first_boot () { set -e set -o xtrace -run-parts /etc/first-boot.d +touch /var/log/first-boot.d.log +chmod 0600 /var/log/first-boot.d.log + +run-parts /etc/first-boot.d >> /var/log/first-boot.d.log 2>&1 rm -fr /etc/first-boot.d mv /etc/rc.local.REAL /etc/rc.local exit 0