SpectreOS-old/hooks/cow_device
simono41 b7a7708146 fix
2018-03-05 08:28:54 +01:00

29 lines
458 B
Bash
Executable file

run_hook ()
{
# Format and run immediately cow_device
if [[ "${format}" == "y" ]]; then
sfdisk -l
read -p "Welches Laufwerk soll eine cow_device erhalten? /dev/sda : " formatdevice
[[ -z "${formatdevice}" ]] && formatdevice=/dev/sda
fdisk ${formatdevice} <<EOT
p
n
p
w
EOT
mkfs.btrfs -f -L cow_device ${formatdevice}3
launch_interactive_shell
fi
}
# vim: set ft=sh ts=4 sw=4 et: