server-scripts/entry.sh
2020-01-29 20:29:15 +01:00

28 lines
480 B
Bash
Executable file

#!/bin/bash
function first_stage(){
echo foo first_stage
apt install debootstrap
lsblk -fTpo NAME,FSTYPE,LABEL,UUID,FSAVAIL,MOUNTPOINT
select DEVICE in $(lsblk -frpno NAME); do
echo using $DEVICE
done
echo mkfs.ext4 ${DEVICE}p1
mkfs.ext4 ${DEVICE}p1
mount ${DEVICE}p1 $TARGET
echo mount ${DEVICE}p1 $TARGET
echo debootstrap sid $TARGET
debootstrap sid $TARGET
#choose_dialog
}
function second_stage(){
echo bar second_stage
passwd
echo -n > /etc/motd
}