Skip to content
Browse files

Merge branch 'master' of github.com:rear/rear

  • Loading branch information...
2 parents b7a522b + 24f1900 commit aab0296ed10145fbb8c875bf4d42502745dd9031 @dagwieers dagwieers committed May 10, 2012
View
2 usr/share/rear/contrib/mkvendorrpm
@@ -75,7 +75,7 @@ echo "Creating archive '$distarchive'"
# use tar to copy the current rear while excluding development and obsolete files
cd $rear_root
tar --exclude=hpasmcliOutput.txt --exclude=\*~ --exclude=\*.rpmsave\* --exclude=.gitignore \
- --exclude=\*.rpmnew\* --exclude=.\*.swp --exclude .svn -c \
+ --exclude=\*.rpmnew\* --exclude=.\*.swp --exclude-vcs -c \
. | tar -C $BUILD_DIR/$prod_ver -x
cd -
View
1 usr/share/rear/finalize/Arch/i386/20_install_grub.sh
View
20 usr/share/rear/finalize/Debian/i386/20_install_grub.sh
@@ -1,20 +0,0 @@
-#
-# Debian >3 uses grub by default. There is no information stored in the system about the boot
-# loader installation, so we can only guess and try to install grub.
-#
-# The same is true for Ubuntu ...
-#
-
-LogPrint "Installing boot loader (I hope you used grub and it works ...)"
-mount -t proc none /mnt/local/proc
-if chroot /mnt/local /bin/bash --login -c "grub-install '(hd0)'" >&2 ; then
- NOBOOTLOADER=
-else
- LogPrint "WARNING !!!
- grub installation failed, please check '$LOGFILE' to see the error
- message and decide yourself, wether the system will boot or not.
-
- You also might consider to improve this script so that this won't happen again:
- $SHARE_DIR/finalize/Debian/i386/20_install_grub.sh"
-fi
-umount /mnt/local/proc
View
16 usr/share/rear/finalize/Gentoo/i386/20_install_grub.sh
@@ -1,16 +0,0 @@
-#
-# Gentoo uses grub by default. There is no information stored in the system about the boot
-# loader installation, so we can only guess and try to install grub.
-LogPrint "Installing boot loader (I hope you used grub and it works ...)"
-mount -t proc none /mnt/local/proc
-if chroot /mnt/local /bin/bash --login -c "grub-install '(hd0)'" >&2 ; then
- NOBOOTLOADER=
-else
- LogPrint "WARNING !!!
- grub installation failed, please check '$LOGFILE' to see the error
- message and decide yourself, wether the system will boot or not.
-
- You also might consider to improve this script so that this won't happen again:
- $SHARE_DIR/finalize/Gentoo/i386/20_install_grub.sh"
-fi
-umount /mnt/local/proc
View
5 ...r/finalize/Fedora/i386/20_install_grub.sh → ...ar/finalize/Linux-i386/21_install_grub.sh
@@ -10,6 +10,11 @@
# guarantee a correct boot-order, or even a working boot-lader config (eg.
# GRUB stage2 might not be at the exact same location)
+# skip if another bootloader was installed
+if [[ -z "$NOBOOTLOADER" ]] ; then
+ return
+fi
+
# Only for GRUB Legacy - GRUB2 will be handled by its own script
[[ $(type -p grub) ]] || return
View
31 .../finalize/Fedora/i386/21_install_grub2.sh → ...r/finalize/Linux-i386/22_install_grub2.sh
@@ -10,6 +10,11 @@
# guarantee a correct boot-order, or even a working boot-lader config (eg.
# GRUB stage2 might not be at the exact same location)
+# skip if another bootloader was installed
+if [[ -z "$NOBOOTLOADER" ]] ; then
+ return
+fi
+
# Only for GRUB2 - GRUB Legacy will be handled by its own script
[[ $(type -p grub-probe) || $(type -p grub2-probe) ]] || return
@@ -22,10 +27,16 @@ if [[ -r "$LAYOUT_FILE" && -r "$LAYOUT_DEPS" ]]; then
# Check if we find GRUB where we expect it
[[ -d "/mnt/local/boot" ]]
StopIfError "Could not find directory /boot"
- [[ -d "/mnt/local/boot/grub2" ]]
- StopIfError "Could not find directory /boot/grub2"
- [[ -r "/mnt/local/boot/grub2/grub.cfg" ]]
- LogIfError "Unable to find /boot/grub2/grub.cfg."
+
+ # grub2 can be in /boot/grub or /boot/grub2
+ grub_name="grub2"
+ if [[ ! -d "/mnt/local/boot/$grub_name" ]] ; then
+ grub_name="grub"
+ [[ -d "/mnt/local/boot/$grub_name" ]]
+ StopIfError "Could not find directory /boot/$grub_name"
+ fi
+ [[ -r "/mnt/local/boot/$grub_name/grub.cfg" ]]
+ LogIfError "Unable to find /boot/$grub_name/grub.cfg."
# Find exclusive partitions belonging to /boot (subtract root partitions from deps)
bootparts=$( (find_partition fs:/boot; find_partition fs:/) | sort | uniq -u )
@@ -63,13 +74,13 @@ if [[ -r "$LAYOUT_FILE" && -r "$LAYOUT_DEPS" ]]; then
partnr=$((partnr - 1))
if [[ "$bootdisk" == "$disk" ]]; then
- #chroot /mnt/local grub2-mkconfig -o /boot/grub2/grub.cfg
- #chroot /mnt/local grub2-install "$bootdisk"
- grub2-install --root-directory=/mnt/local/ $bootdisk
+ #chroot /mnt/local $grub_name-mkconfig -o /boot/$grub_name/grub.cfg
+ #chroot /mnt/local $grub_name-install "$bootdisk"
+ $grub_name-install --root-directory=/mnt/local/ $bootdisk
else
- chroot /mnt/local grub2-mkconfig -o /boot/grub2/grub.cfg
- #chroot /mnt/local grub2-install "$bootdisk"
- grub2-install --root-directory=/mnt/local/ $bootdisk
+ chroot /mnt/local $grub_name-mkconfig -o /boot/$grub_name/grub.cfg
+ #chroot /mnt/local $grub_name-install "$bootdisk"
+ $grub_name-install --root-directory=/mnt/local/ $bootdisk
fi
if (( $? == 0 )); then
View
2 usr/share/rear/layout/save/GNU/Linux/20_partition_layout.sh
@@ -239,7 +239,7 @@ Log "Saving disk partitions."
# Disk sizes
# format: disk <disk> <sectors> <partition label type>
for disk in /sys/block/* ; do
- if [[ ${disk#/sys/block/} = @(hd*|sd*|cciss*|vd*) ]] ; then
+ if [[ ${disk#/sys/block/} = @(hd*|sd*|cciss*|vd*|xvd*) ]] ; then
devname=$(get_device_name $disk)
devsize=$(get_disk_size ${disk#/sys/block/})

0 comments on commit aab0296

Please sign in to comment.
Something went wrong with that request. Please try again.