summaryrefslogtreecommitdiff
path: root/scripts/install
diff options
context:
space:
mode:
authorKim Hagen <kim.sidney@gmail.com>2019-06-12 12:37:24 +0200
committerUnicronNL <kim.sidney@gmail.com>2019-06-18 19:42:51 +0200
commit07d3ef977d65aa9ec20ffdbb8fd035178af95ff0 (patch)
treed524f8362cd6e28d794c39c22e9d95b70c29b2fb /scripts/install
parent6d53089a202eac77b9a6599718807ee77ae8b49c (diff)
downloadvyatta-cfg-system-07d3ef977d65aa9ec20ffdbb8fd035178af95ff0.tar.gz
vyatta-cfg-system-07d3ef977d65aa9ec20ffdbb8fd035178af95ff0.zip
Force create raid without answering the question if you want to create it.
Update initramfs to include raidconfig avoiding md127 being created on reboot.
Diffstat (limited to 'scripts/install')
-rwxr-xr-xscripts/install/install-get-partition6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition
index b3f2741e..9f6473e1 100755
--- a/scripts/install/install-get-partition
+++ b/scripts/install/install-get-partition
@@ -302,12 +302,16 @@ check_for_new_raid () {
echo "Creating RAID-1 group on partitions: /dev/${drive1}${data_dev} /dev/${drive2}${data_dev}"
raid_dev=md0
- mdadm --create /dev/$raid_dev --level=1 --raid-disks=2 --metadata=0.90 \
+ yes|mdadm --create /dev/$raid_dev --level=1 --raid-disks=2 --metadata=0.90 \
/dev/${drive1}${data_dev} /dev/${drive2}${data_dev}
if [ $? = 0 -a -e /dev/$raid_dev ]; then
echo "RAID-1 group created successfully:"
cat /proc/mdstat | grep --after-context 2 ^$raid_dev | sed -e 's/^/\t/'
+ if [ -e /usr/sbin/update-initramfs.orig.initramfs-tools ]
+ echo "Updating initramfs to include the raid config:"
+ /usr/sbin/update-initramfs.orig.initramfs-tools -u
+ fi
else
echo "Unable to create RAID-1 group!"
return