chiark / gitweb /
add signkey
[bin.git] / chroot-setup
index 5cd1c199ac72e90b0c8c26310cb0bbc220a724b9..2949cb1c3d29c24e36e4f1566d18196132da6689 100755 (executable)
@@ -1,5 +1,13 @@
 #! /bin/sh -e
-# Install keychain xauth x11-xserver-utils in the chroot first.
+
+# Chroot preparation:
+#   locale-gen en_GB.UTF-8
+#   apt-get --no-install-recommends install keychain xauth x11-xserver-utils
+#   adduser --disabled-password cjwatson
+#   addgroup --system admin
+#   adduser cjwatson admin
+#   visudo # add '%admin ALL=(ALL) ALL'
+
 if [ -e "$1/proc/cmdline" ]; then exit; fi
 
 ensure_dir_mine () {
@@ -31,7 +39,7 @@ if [ -d /home/cjwatson/.keychain ]; then
        ensure_dir_mine "$1/home/cjwatson/.keychain"
        sudo mount --bind /home/cjwatson/.keychain "$1/home/cjwatson/.keychain"
 fi
-xauth list | sudo chroot "$1" su cjwatson -c 'xargs -l1 xauth add'
+xauth list | sudo chroot "$1" su cjwatson -c 'xargs -l1 xauth add' || true
 rm -f "$1/home/cjwatson/.ICEauthority"
 iceauth list | sudo chroot "$1" su cjwatson -c 'xargs -l1 iceauth add'
 sudo cp -a /etc/resolv.conf "$1/etc/"