diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2010-03-09 11:06:22 -0800 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2010-03-09 13:42:57 -0800 |
commit | 39fd8ba4cc08823f1581de019f2e1e1b209ae732 (patch) | |
tree | 924198f04cddb706987bb9963273dbd1f0ebd368 /scripts | |
parent | 311112ae904372d2dba0ee63c0ea75426700bd6f (diff) | |
download | vyatta-cfg-system-39fd8ba4cc08823f1581de019f2e1e1b209ae732.tar.gz vyatta-cfg-system-39fd8ba4cc08823f1581de019f2e1e1b209ae732.zip |
Bugfix 5424: Allow image with same version to be added to disk-based install
(cherry picked from commit 4ab3e62397765f48eca5823bca5fbe5335177c78)
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/install/install-functions | 12 | ||||
-rwxr-xr-x | scripts/install/install-image | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/scripts/install/install-functions b/scripts/install/install-functions index 3f85e75b..c9af8997 100755 --- a/scripts/install/install-functions +++ b/scripts/install/install-functions @@ -254,6 +254,18 @@ change_password() { set_encrypted_password "$user" "$epwd" "$config" } +# returns true if it's a disk-based boot +is_disk_based_boot() +{ + islive=`grep boot=live /proc/cmdline` + if [ -z "$islive" ]; then + # Return value 0 is "true" is shell + return 0 + else + return 1 + fi +} + # returns true if it's a live cd boot is_live_cd_boot () { diff --git a/scripts/install/install-image b/scripts/install/install-image index fd306aec..cb2d323a 100755 --- a/scripts/install/install-image +++ b/scripts/install/install-image @@ -207,6 +207,8 @@ fi # check versions if is_live_cd_boot; then CURVER=LIVECD +elif is_disk_based_boot; then + CURVER=DISK else CURVER=$(get_cur_version) fi |