From f97e6c42c79f8d6a2059f5fc845ce9f9658fc952 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 11 Feb 2014 22:29:09 +0100 Subject: [PATCH] no point generating grub.conf at this time, there is no kernel installed yet Signed-off-by: Steven Armstrong --- .../__install_bootloader_grub/gencode-remote | 22 +--------------- .../type/__install_bootloader_grub/manifest | 25 ------------------- 2 files changed, 1 insertion(+), 46 deletions(-) delete mode 100755 cdist/conf/type/__install_bootloader_grub/manifest diff --git a/cdist/conf/type/__install_bootloader_grub/gencode-remote b/cdist/conf/type/__install_bootloader_grub/gencode-remote index 24a132ea..ccc38912 100755 --- a/cdist/conf/type/__install_bootloader_grub/gencode-remote +++ b/cdist/conf/type/__install_bootloader_grub/gencode-remote @@ -45,27 +45,7 @@ case "$target_os" in printf 'grub-mkconfig -o /boot/grub/grub.cfg\n' ;; centos) - cat << centos_DONE -( -printf '# Generated by cdist ${__type##*/}' -printf 'default=0' -printf 'timeout=3' -for kernel in \$(find /boot -mindepth 1 -maxdepth 2 -name "vmlinuz-*"); do - kernel_version="\${kernel#*-}" - initramfs="\$(echo "\$kernel" | sed 's|/boot/vmlinuz-|/boot/initramfs-|').img" - root_device="\$(awk '\$2 == "/" {print \$1}' /etc/fstab)" - cat << centos_entry_DONE -title \$(cat /etc/redhat-release) (\$kernel_version) - # root is assumed to be on the first partition - root (hd0,0) - kernel \$kernel ro root=\$root_device norhgb noquiet - initrd \$initramfs -centos_entry_DONE -done -) > /boot/grub/grub.conf -cd /boot/grub -ln -sf grub.conf menu.lst -centos_DONE + : ;; *) echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 diff --git a/cdist/conf/type/__install_bootloader_grub/manifest b/cdist/conf/type/__install_bootloader_grub/manifest deleted file mode 100755 index 4c7c4955..00000000 --- a/cdist/conf/type/__install_bootloader_grub/manifest +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -# set defaults -device="$(cat "$__object/parameter/device" 2>/dev/null \ - || echo "/$__object_id" | tee "$__object/parameter/device")" -chroot="$(cat "$__object/parameter/chroot" 2>/dev/null \ - || echo "/target" | tee "$__object/parameter/chroot")"