support for centos7

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2015-10-27 15:54:50 +01:00
parent fd6258c90e
commit c6e4888c84
1 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# 2011-2014 Steven Armstrong (steven-cdist at armstrong.cc) # 2011-2015 Steven Armstrong (steven-cdist at armstrong.cc)
# #
# This file is part of cdist. # This file is part of cdist.
# #
@ -32,20 +32,22 @@ exec > $install_script
# Generate script to install bootloader on distro # Generate script to install bootloader on distro
printf '#!/bin/sh -l\n' printf '#!/bin/sh -l\n'
printf 'grub-install "%s"\n' "$device"
case "$target_os" in case "$target_os" in
ubuntu|debian) ubuntu|debian)
printf 'grub-install "%s"\n' "$device"
printf 'update-grub\n' printf 'update-grub\n'
;; ;;
archlinux) archlinux)
# bugfix/workarround: rebuild initramfs # bugfix/workarround: rebuild initramfs
# FIXME: doesn't belong here # FIXME: doesn't belong here
printf 'grub-install "%s"\n' "$device"
printf 'mkinitcpio -p linux\n' printf 'mkinitcpio -p linux\n'
printf 'grub-mkconfig -o /boot/grub/grub.cfg\n' printf 'grub-mkconfig -o /boot/grub/grub.cfg\n'
;; ;;
centos) centos)
: printf 'grub2-install "%s"\n' "$device"
printf 'grub2-mkconfig --output=/boot/grub2/grub.cfg\n'
;; ;;
*) *)
echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2