Commit a2fe1d38 authored by Dennis Baurichter's avatar Dennis Baurichter
Browse files

bootstrap: Add --domain option and use cs.upb.de for IRB VMs

parent e001fd5e
......@@ -63,7 +63,7 @@ When applying the playbook to the localhost add:
2. In the live system:
- `curl -O 'https://git.cs.uni-paderborn.de/rbfsmi/rbfsmi-ansible/-/raw/master/bootstrap.sh'`
- `chmod +x bootstrap.sh`
- `./bootstrap.sh [--vm|--no-dhcp] --hostname $CAFFEINE_BASED_HOSTNAME` (see `--help` for details)
- `./bootstrap.sh [--irb-vm] --hostname $CAFFEINE_BASED_HOSTNAME` (see `--help` for details)
3. (Host installs, reboots, and does an initial ansible-pull)
4. Wait until ansible-pull.service has finished running. (takes ~3 min)
5.
......
......@@ -11,6 +11,7 @@ packages="base base-devel linux btrfs-progs git ansible"
devices=('/dev/sda')
# partition prefixes: /dev/sda, /dev/loop1p, /dev/mmcblk1p etc.
devices_pp=()
domain=uni-paderborn.de
nodhcp=false
wipe=false
bios=false
......@@ -27,8 +28,15 @@ while [[ $# -gt 0 ]]; do
case "$1" in
-h|--help)
echo "Usage: $0 --hostname HOSTNAME [OPTIONS...] [--raid={wipe-all|keep-vms} DEVICES...]"
echo "Most common options:"
echo " --hostname HOSTNAME"
echo " Specifies the new hostname. Mandatory."
echo " --irb-vm"
echo " Alias for --domain cs.uni-paderborn.de."
echo "Further options:"
echo " --domain DOMAINNAME"
echo " Use the alternative domain name instead of $domain."
echo " The hosts FQDN will be HOSTNAME.DOMAINNAME."
echo " --no-dhcp"
echo " Don't rely on DHCP for inital ansible-pull after reboot."
echo " This will detect the current IPv4 address, gateway, and ip"
......@@ -42,9 +50,6 @@ while [[ $# -gt 0 ]]; do
echo " Without this option the user will be asked interactively for confirmation."
echo " --kernel-param PARAMETER"
echo " Add PARAMETER to EFI kernel command line."
echo " --vm"
echo " Use /dev/vda instead of /dev/sda as the installation disk."
echo " Also implies --no-dhcp."
echo " --bios"
echo " Installing system in bios mode."
echo " Also implies --use-grub."
......@@ -87,6 +92,13 @@ while [[ $# -gt 0 ]]; do
readonly hostname="$2"
shift
;;
--irb-vm)
domain=cs.uni-paderborn.de
;;
--domain)
domain="$2"
shift
;;
--kernel-param)
kparam+=("$2")
shift
......@@ -94,10 +106,6 @@ while [[ $# -gt 0 ]]; do
--no-dhcp)
nodhcp=true
;;
--vm)
devices=('/dev/vda')
nodhcp=true
;;
--bios)
bios=true
bootloader='grub'
......@@ -342,7 +350,7 @@ fi
pacstrap /mnt $packages
echo '=> setting hostname'
echo "${hostname}.uni-paderborn.de" > /mnt/etc/hostname
echo "${hostname}.${domain}" > /mnt/etc/hostname
echo '=> configuring datetime'
ln -sf /usr/share/zoneinfo/Europe/Berlin /mnt/etc/localtime
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment