summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bays <rbays@moresby.vyatta.com>2008-09-16 17:34:54 -0700
committerRobert Bays <rbays@moresby.vyatta.com>2008-09-16 17:34:54 -0700
commit3315ecc30e870af4ae8f97e0f8fce47d76fec6fa (patch)
tree1feed020d4c88ef366487f74ffca372a86d9a2fb
parent17b8a213217d50510cb318be840719875a27fa01 (diff)
downloadvyatta-cfg-system-3315ecc30e870af4ae8f97e0f8fce47d76fec6fa.tar.gz
vyatta-cfg-system-3315ecc30e870af4ae8f97e0f8fce47d76fec6fa.zip
change to native install from a USB stick
-rwxr-xr-xscripts/install-system13
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/install-system b/scripts/install-system
index 6048be62..33f54534 100755
--- a/scripts/install-system
+++ b/scripts/install-system
@@ -651,6 +651,7 @@ create_partitions() {
# $1 is the partition to install on
install_root_filesystem () {
ldrive=$1
+ version=$(egrep -i version /opt/vyatta/etc/version | awk '{ print $3 }')
dpkg="/usr/bin/dpkg --force-all --root=$rootfsdir"
echo "Mounting /dev/$ldrive "
@@ -674,8 +675,15 @@ install_root_filesystem () {
progress_indicator start
# Mount the squashfs for copying
output=$(mkdir -p /mnt/squashfs)
- output=$(mount /live/image/live/filesystem.squashfs /mnt/squashfs -t squashfs -o loop)
- status=$?
+ if [ -f /live/image/live/filesystem.squashfs ]; then
+ output=$(mount /live/image/live/filesystem.squashfs /mnt/squashfs -t squashfs -o loop)
+ status=$?
+ elif [ -f /live/image/boot/$version/$version.squashfs ]; then
+ output=$(mount /live/image/boot/$version/$version.squashfs /mnt/squashfs -t squashfs -o loop)
+ status=$?
+ else
+ echo -e "Error: Unable to find a squash image. \nExiting..."
+ fi
if [ "$status" != 0 ]; then
echo -e "Error trying to mount the squashfs.\nPlease see install log for more details.\nExiting..."
@@ -713,7 +721,6 @@ install_root_filesystem () {
progress_indicator stop
echo "OK"
else
- version=$(egrep -i version /opt/vyatta/etc/version | awk '{ print $3 }')
mkdir -p $rootfsdir/boot/$version
if [ -f /live/image/live/filesystem.squashfs ]; then
echo Copying squashfs image...