summaryrefslogtreecommitdiff
path: root/share/hydractl
diff options
context:
space:
mode:
Diffstat (limited to 'share/hydractl')
-rwxr-xr-xshare/hydractl/provision8
-rwxr-xr-xshare/hydractl/provision-raspi16
2 files changed, 19 insertions, 5 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision
index 79c88cc..087b703 100755
--- a/share/hydractl/provision
+++ b/share/hydractl/provision
@@ -109,10 +109,16 @@ function hydra_provision_config {
hydra_user_config vg $hostname "Install vg"
hydra_user_config grub y "Setup GRUB? (y/n)"
hydra_user_config mirror http://http.debian.net/debian/ "Debian mirror"
+
+ # Check arch
+ if [ "$arch" == "armel" ] || [ "$arch" == "armhf" ]; then
+ echo "You probably want to run provision-raspi instead of provision"
+ exit 1
+ fi
}
# Load configuration
-hydra_provision_load_config
+hydra_provision_config_load $1
# Parameters
WORK="/tmp/debootstrap"
diff --git a/share/hydractl/provision-raspi b/share/hydractl/provision-raspi
index 640616f..5b3ea15 100755
--- a/share/hydractl/provision-raspi
+++ b/share/hydractl/provision-raspi
@@ -29,23 +29,31 @@ function hydra_provision_config {
hydra_user_config arch armel "System arch"
hydra_user_config version jessie "Distro version"
hydra_user_config mirror http://http.debian.net/debian/ "Debian mirror"
+
+ # Check arch
+ if [ "$arch" != "armel" ] && [ "$arch" != "armhf" ]; then
+ echo "You probably want to run provision instead of provision-raspi"
+ exit 1
+ fi
}
# Load configuration
-hydra_provision_load_config
+hydra_provision_config_load $1
# Parameters
WORK="/media/mmc"
CHROOT="hydra_sudo_run chroot $WORK"
CMDLINE="dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
-RPI_URL="http://goo.gl/1BOfJ"
+RPI_URL="https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update"
# Get config parameters.
hydra_provision_config
# Partitioning
-# TODO automated
-hydra_sudo_run cfdisk $device # bootable VFAT (0B) and linux partitions
+hydra_sudo_run parted -s -- $device mklabel msdos
+hydra_sudo_run parted -s -- $device unit MB mkpart primary fat32 1 100
+hydra_sudo_run parted -s -- $device unit MB mkpart primary ext2 101 -1
+hydra_sudo_run parted -s -- $device set 1 boot on
hydra_sudo_run mkdir -p $WORK
# Create filesystems