diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-09-10 15:42:45 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-09-10 15:42:45 -0700 |
commit | ca9a098690f99357a259953d5fb21b8dac014694 (patch) | |
tree | f4ea42b84a757ab7c563fe95458e3ce31ac801bb /scripts | |
parent | 7b4a3a28819d980c3e9464820f0c81746f77c6e9 (diff) | |
download | vyatta-cfg-quagga-ca9a098690f99357a259953d5fb21b8dac014694.tar.gz vyatta-cfg-quagga-ca9a098690f99357a259953d5fb21b8dac014694.zip |
Move check for livecd install to before filesystem intialization
Check for install-system failure (because of attempt to install
from active system), to occur before filesystem is destroyed.
Bug 1587
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/install-system | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/install-system b/scripts/install-system index d816c159..53b654ed 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -1336,6 +1336,15 @@ if [ -z "$INSTALL_METHOD" ]; then echo fi +# Unless doing union install, must be from live cd +if [ "$INSTALL_METHOD" == "union" -o "$INSTALL_METHOD" == "u" ] && + [ ! -d /live/image -o -w /live/image ] +then + echo "install-system can only be run from livecd" + echo "(except if doing union install)" + exit 1 +fi + # TODO: Note installs assume an LBA BIOS. So no boot partition currently. # also note that we are not creating a swap partition right now. if [ "$INSTALL_METHOD" == "parted" ] || [ "$INSTALL_METHOD" == "p" ]; then @@ -1368,13 +1377,6 @@ elif [ "$INSTALL_METHOD" == "vyatta" ]; then sleep 5 fi -if [ ! -d /live/image -o -w /live/image ]; then - if [ -z $UNION ]; then - echo "install-system can only be run from livecd" - exit 1 - fi -fi - # Install the root filesystem install_root_filesystem "$ROOT_PARTITION" |