summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-09-17 17:03:51 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-09-17 17:03:51 -0700
commit8181db045b6d1ad0e1fd2293b801256b04fee2d0 (patch)
tree487744bc1c29db0f6f7378eb29ff1575798a155b /scripts
parent133b72347631663ee595312579dd2991059280cb (diff)
parent68f0137faceea8a712fe8d269548acbcb5c34d1e (diff)
downloadvyatta-cfg-system-8181db045b6d1ad0e1fd2293b801256b04fee2d0.tar.gz
vyatta-cfg-system-8181db045b6d1ad0e1fd2293b801256b04fee2d0.zip
Merge branch 'islavista' of suva.vyatta.com:/git/vyatta-cfg-system into islavista
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/grub-setup2
-rwxr-xr-xscripts/install-system17
2 files changed, 14 insertions, 5 deletions
diff --git a/scripts/grub-setup b/scripts/grub-setup
index a3ecffdf..70da564e 100755
--- a/scripts/grub-setup
+++ b/scripts/grub-setup
@@ -146,7 +146,7 @@ vga_logo="vga=785"
done
fi
- if [ -f "$ROOTFSDIR/boot/vmlinuz" ] && [ ! eval $UNION ]; then
+ if [ -f "$ROOTFSDIR/boot/vmlinuz" ] && ! eval $UNION ; then
# Set first system boot option. Make KVM the default console in this one.
echo -e "menuentry \"Vyatta OFR (KVM console)\" {"
echo -e "\tlinux /boot/vmlinuz $GRUB_OPTIONS $vga_logo $vty_console"
diff --git a/scripts/install-system b/scripts/install-system
index b3964378..77384d56 100755
--- a/scripts/install-system
+++ b/scripts/install-system
@@ -403,7 +403,8 @@ check_for_new_raid () {
# in the verification loop, not the included get_response.
select_drive () {
# list the drives in /proc/partitions. Remove partitions and empty lines.
- drives=$(cat /proc/partitions | awk '{ if ($4!="name") { print $4 } }' | egrep -v "[0-9]$" | egrep -v "^$")
+ # the first grep pattern looks for devices named c0d0, hda, and sda.
+ drives=$(cat /proc/partitions | awk '{ if ($4!="name") { print $4 } }' | egrep "c[0-9]d[0-9]$|[hs]d[a-z]$" | egrep -v "^$")
# take the first drive as the default
INSTALL_DRIVE=$(echo $drives | /usr/bin/awk '{ print $1 }')
@@ -565,7 +566,8 @@ delete_partitions () {
ldrive=$1
# get the partitions on the drive
- partitions=$(cat /proc/partitions | grep $ldrive[0-9] | awk '{ print $4 }' | sed 's/[a-z]//g')
+ # in the first grep below we add the optional [p] in order to accomdate cciss drives
+ partitions=$(cat /proc/partitions | grep $ldrive[p]*[0-9] | awk '{ print $4 }' | sed 's/\(.*\)\([0-9]$\)/\2/g' | grep -v "^$")
# now for each part, blow it away
for part in $partitions
@@ -634,7 +636,14 @@ create_partitions() {
exit 1
fi
- ROOT_PARTITION=$ldrive"1"
+ # set the partition number on the device.
+ if [ -n "$( echo $ldrive | grep cciss )" ]; then
+ # if this is a cciss
+ ROOT_PARTITION=$ldrive"p1"
+ else
+ # else... the rest of the world
+ ROOT_PARTITION=$ldrive"1"
+ fi
# udev takes time to re-add the device file, so wait for it
while [ ! -b "/dev/$ROOT_PARTITION" ]
do
@@ -1216,7 +1225,7 @@ if [ -z "$INSTALL_METHOD" ]; then
while [ -z $INSTALL_METHOD ]
do
- echo -n "Partition (Auto/Parted/Skip) [Auto]: "
+ echo -n "Partition (Auto/Union/Parted/Skip) [Auto]: "
INSTALL_METHOD=$(get_response "Auto" "Auto Parted Skip Union A P S U")
done