chiark
/
gitweb
/
~cjwatson
/
bin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
72cdba5
)
better docs; ignore errors from xauth add
author
Colin Watson
<cjwatson@chiark.greenend.org.uk>
Tue, 20 Apr 2010 22:05:11 +0000
(22:05 +0000)
committer
Colin Watson
<cjwatson@chiark.greenend.org.uk>
Tue, 20 Apr 2010 22:05:11 +0000
(22:05 +0000)
chroot-setup
patch
|
blob
|
history
diff --git
a/chroot-setup
b/chroot-setup
index 5cd1c199ac72e90b0c8c26310cb0bbc220a724b9..2949cb1c3d29c24e36e4f1566d18196132da6689 100755
(executable)
--- a/
chroot-setup
+++ b/
chroot-setup
@@
-1,5
+1,13
@@
#! /bin/sh -e
#! /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 () {
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
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/"
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/"