Update grml-debootstrap unittest.
[grml-unittests.git] / grml-debootstrap / deploy.sh
1 #!/bin/zsh
2
3 . /etc/grml/autoconfig.functions
4
5 STATUS=$(getbootparam status)
6 sfdisk /dev/sda <<EOF
7 0 88 0x0c
8 ;
9 EOF
10
11 # cat << EOT | setup-storage -X -f -
12 #disk_config sda
13 #primary /    0- - -
14 #primary swap 20 swap rw
15 #EOT
16
17 MIRROR=http://cdn.debian.net/debian
18 HOSTNAME=unittest
19 SUITE=stable
20 TARGET="/dev/sda1"
21 PASSWORD="grml"
22
23 # TODO: --bootoptions="netscript=$STATUS/DONE"
24
25 echo 'y' | grml-debootstrap -m $MIRROR \
26     -r $SUITE -t $TARGET --hostname $HOSTNAME \
27     --password $PASSWORD
28
29 # cat << EOT |grml-chroot $TARGET /bin/bash
30
31 cat >> $TARGET /etc/rc.local << EOT
32 echo $STATUS/DONE
33 EOT
34
35 shutdown -h now