]> spindle.queued.net Git - xodist/blobdiff - functions.sh
initchroot: include newer xorg driver and reinstate font overriding
[xodist] / functions.sh
index ab7dbe58bfd5005234f41c7a7314d034e1a90250..b6714e57ec86b28f71ccc9ee155226c293baffe9 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/bash -e
 #
 # Copyright © 2008  Andres Salomon <dilinger@queued.net>
 #
@@ -114,3 +114,13 @@ chroot_internal_umounts()
     umount ${root_dir}/dev/pts
     umount ${root_dir}/var/cache/apt/cache
 }
+
+start_logging()
+{
+    logpipe="$1".pipe
+    trap "rm -f $logpipe" 0
+    mknod $logpipe p
+    tee "$1".log <$logpipe &
+    trap "kill $!; rm -f $logpipe" 0
+    exec >$logpipe 2>&1
+}