summaryrefslogtreecommitdiff
path: root/scripts/install-system
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-10-02 19:18:05 +0200
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-10-02 19:18:05 +0200
commit2e57bf9a4220a1c99cdb87136fad1b83d14cc454 (patch)
tree936ceb033be8fdcbb82f97a34bec3bad661db2d8 /scripts/install-system
parent73f0546e5f5c8d9bd367771ae0012797114ca340 (diff)
parent21031c67393d26a814298a8755d4bea43b0834de (diff)
downloadvyatta-cfg-system-2e57bf9a4220a1c99cdb87136fad1b83d14cc454.tar.gz
vyatta-cfg-system-2e57bf9a4220a1c99cdb87136fad1b83d14cc454.zip
Fix overlapping edits of standalone_pw_reset
Put in new code to set password, rather than reset it to default Although resetting passwd to default sounds good from a usuablity point of view, it is a potential security hole when system is rebooted. Instead, allow user to choose new passwd.
Diffstat (limited to 'scripts/install-system')
-rw-r--r--[-rwxr-xr-x]scripts/install-system53
1 files changed, 33 insertions, 20 deletions
diff --git a/scripts/install-system b/scripts/install-system
index 8f4592f9..d06695e0 100755..100644
--- a/scripts/install-system
+++ b/scripts/install-system
@@ -206,6 +206,24 @@ probe_drives () {
}
+warn_of_dire_consequences () {
+ # Give the user a requisite warning that we are about to nuke their drive
+ response=''
+ while [ -z $response ]
+ do
+ echo "This will destroy all data on /dev/$INSTALL_DRIVE."
+ echo -n "Continue? (Yes/No) [No]: "
+ response=$(get_response "No" "Yes No Y N")
+
+ if [ "$response" == "no" ] || [ "$response" == "n" ]; then
+ echo "Ok then. Exiting..."
+ exit 1
+ fi
+ done
+}
+
+
+
check_for_old_raid () {
# First, trigger construction of previously configured RAID groups
echo -n "Looking for pre-existing RAID groups..."
@@ -264,6 +282,9 @@ check_for_old_raid () {
fi
echo "Using RAID partition $INSTALL_DRIVE"
+
+ warn_of_dire_consequences
+
ROOT_PARTITION=$INSTALL_DRIVE
# make sure we aren't working on a mounted part
@@ -417,12 +438,16 @@ select_drive () {
display="$display $drive\t$size"MB"\n"
done
- # Display the drives and ask the user which one to install to
- echo -e "$display"
- echo
- echo -n "$1 [$INSTALL_DRIVE]:"
+ while true
+ do
+ # Display the drives and ask the user which one to install to
+ echo -e "$display"
+ echo
+ echo -n "$1 [$INSTALL_DRIVE]:"
+ response=$(get_response "$INSTALL_DRIVE" "$drives") && break
+ done
+ INSTALL_DRIVE="$response"
- INSTALL_DRIVE=$(get_response "$INSTALL_DRIVE" "$drives")
echo
# Assume no dma if the disk is smaller than 10G (such as a CF drive)
@@ -891,12 +916,12 @@ install_grub () {
fi
fi
- # if union install tell grub-setup
+ # if union install tell vyatta-grub-setup
if eval "$UNION"; then
version=$(egrep -i version /opt/vyatta/etc/version | awk '{ print $3 }')
grub_args="-u $version"
fi
- if /opt/vyatta/sbin/grub-setup $grub_args "$ROOT_PARTITION" "$grub_options" /mnt/rootfs >>$INSTALL_LOG
+ if /opt/vyatta/sbin/vyatta-grub-setup $grub_args "$ROOT_PARTITION" "$grub_options" /mnt/rootfs >>$INSTALL_LOG
then
echo "OK"
else
@@ -991,19 +1016,7 @@ setup_method_auto() {
fi
done
- # Give the user a requisite warning that we are about to nuke their drive
- response=''
- while [ -z $response ]
- do
- echo "This will destroy all data on /dev/$INSTALL_DRIVE."
- echo -n "Continue? (Yes/No) [No]: "
- response=$(get_response "No" "Yes No Y N")
-
- if [ "$response" == "no" ] || [ "$response" == "n" ]; then
- echo "Ok then. Exiting..."
- exit 1
- fi
- done
+ warn_of_dire_consequences
echo