confz

git mirror of https://ccx.te2000.cz/bzr/confz
git clone https://ccx.te2000.cz/git/confz
Log | Files | Refs

commit f1e105418a8a3a7df285c4ed324f75db1b217bc8
parent ab73c10844eca0c3add1c1760e5092691dd2da89
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Tue, 21 Apr 2015 01:26:10 +0200

initial GRUB2 support
Diffstat:
Mzsh-functions/confz_fs_init | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/zsh-functions/confz_fs_init b/zsh-functions/confz_fs_init @@ -439,3 +439,17 @@ confz_mounted_volume_check() { do_command=( true ) } + + +# install GRUB2 +confz_grub2_check() { + checkvars device + defvar boot_directory /boot + [[ -e $vars[boot_directory]/.grub2${${vars[device]}//\//.} ]] + return $? +} + +confz_grub2_do() { + grub2-install --boot-directory=$vars[boot_directory] $vars[device] || return $? + touch $vars[boot_directory]/.grub2${${vars[device]}//\//.} || return $? +}