6 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
9 echo "error: expect a hostname in \$1 "
15 scp
-o StrictHostKeyChecking
=false
-o UserKnownHostsFile
=/dev
/null \
16 /p
/c
/machine_specific
/$host/filesystem
/etc
/ssh
/* root@
$host:/etc
/ssh
18 if [[ -e /var
/cache
/pacman
/pkg
]]; then
19 darkhttpd
/var
/cache
/pacman
/pkg
&
20 mirror
=http
://$HOSTNAME:8080
24 rsync
-rlpthvi --relative /a
/bin
/fai
/ root@
$host:/
25 rsync
/a
/bin
/fai
/ root@
$host:/a
/bin
/fai
/
26 sudo scp
-r /a
/bin
/devbyid
/q
/root
/luks
/q
/root
/shadow root@
$host:
27 # creating shadow file string:
28 # on debian, you can use mkpasswd -m sha-512 to generate a pass.
29 # arch doesn't have this program. instead, you can do passwd,
30 # and extract it from the shadow file.
31 ssh root@
$host bash
-x /a
/bin
/fai
/arch-init
$host $mirror
33 #ssh root@$host reboot now || [[ $? == 255 ]]
36 # ssh $host /a/bin/distro-begin
38 if [[ -e /var
/cache
/pacman
/pkg
]]; then
41 # todo: this doesn't work. figure out why.