summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-11-12 10:21:13 +0000
committerOlivier Blin <oblin@mandriva.com>2008-11-12 10:21:13 +0000
commit2ef6b6dfc8a89a1a790603c088cdacb864054a4f (patch)
tree1ce039e22210ee711dfb99c08430b948d5d2da9e
parent561dc940c295b95ec994cc1a4e354ebc401ad0f2 (diff)
downloaddrakx-backup-do-not-use-2ef6b6dfc8a89a1a790603c088cdacb864054a4f.tar
drakx-backup-do-not-use-2ef6b6dfc8a89a1a790603c088cdacb864054a4f.tar.gz
drakx-backup-do-not-use-2ef6b6dfc8a89a1a790603c088cdacb864054a4f.tar.bz2
drakx-backup-do-not-use-2ef6b6dfc8a89a1a790603c088cdacb864054a4f.tar.xz
drakx-backup-do-not-use-2ef6b6dfc8a89a1a790603c088cdacb864054a4f.zip
allow to rebuild initrd
-rwxr-xr-xrescue/restore-image.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh
index 8eb564284..bf7a04215 100755
--- a/rescue/restore-image.sh
+++ b/rescue/restore-image.sh
@@ -191,6 +191,13 @@ function expand_fs()
if [ -d "$grub_dir" ]; then
echo "(hd0) $disk" > "$grub_dir/device.map"
fi
+ if [ -n "$MKINITRD" ]; then
+ mount -t sysfs none "$mnt_dir/sys"
+ mount -t proc none "$mnt_dir/proc"
+ chroot $mnt_dir bootloader-config --action rebuild-initrds
+ umount "$mnt_dir/sys"
+ umount "$mnt_dir/proc"
+ fi
umount $mnt_dir
fi
}