6 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
9 echo "error: expect a hostname in \$1 "
14 scp
-o StrictHostKeyChecking
=false
-o UserKnownHostsFile
=/dev
/null \
15 /p
/c
/machine_specific
/$host/filesystem
/etc
/ssh
/* root@
$host:/etc
/ssh
17 if [[ -e /var
/cache
/pacman
/pkg
]]; then
18 darkhttpd
/var
/cache
/pacman
/pkg
&
19 mirror
=http
://$HOSTNAME:8080
24 hooks
/partition.DEFAULT
28 sudo scp
-r /a
/bin
/fai
/arch-init
{,-chroot} \
30 ${fai_files[@]/#//a/bin/fai/fai/config/} \
32 /q
/root
/luks
/q
/root
/shadow root@
$host:
33 # creating shadow file string:
34 # on debian, you can use mkpasswd -m sha-512 to generate a pass.
35 # arch doesn't have this program. instead, you can do passwd,
36 # and extract it from the shadow file.
37 ssh root@
$host bash
-x .
/arch-init
$host $mirror
39 #ssh root@$host reboot now || [[ $? == 255 ]]
42 # ssh $host /a/bin/distro-begin
44 if [[ -e /var
/cache
/pacman
/pkg
]]; then
47 # todo: this doesn't work. figure out why.