diff options
author | Renato Botelho <garga@FreeBSD.org> | 2015-01-29 12:02:42 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-01-29 12:02:42 -0200 |
commit | f5b23288160aebd53e5d983ab872b468c09934ed (patch) | |
tree | 1396478fb5a934e5251ed9306d780e1b91ac2705 /etc/inc/globals.inc | |
parent | 427831ac67b80b7900f7327253dfd96c50132a4e (diff) | |
download | pfsense-f5b23288160aebd53e5d983ab872b468c09934ed.zip pfsense-f5b23288160aebd53e5d983ab872b468c09934ed.tar.gz |
Set update_url and update_manifest automatically based on version being or not a RELEASE
Diffstat (limited to 'etc/inc/globals.inc')
-rw-r--r-- | etc/inc/globals.inc | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc index f3233f9..150f160 100644 --- a/etc/inc/globals.inc +++ b/etc/inc/globals.inc @@ -98,12 +98,19 @@ $tcpflags = array("syn", "ack", "fin", "rst", "psh", "urg", "ece", "cwr"); if(file_exists("/etc/platform")) { $arch = php_uname("m"); - /* Do not remove this, it is not needed for the snapshots URL but is needed later for the -RELEASE/stable URLs */ - //$arch = ($arch == "i386") ? "" : '/' . $arch; - - /* Full installs and NanoBSD use the same update directory and manifest in 2.x */ - $g['update_url']="https://snapshots.pfsense.org/FreeBSD_releng/10.1/{$arch}/pfSense_HEAD/.updaters/"; - $g['update_manifest']="https://updates.pfSense.org/manifest"; + $current_version = trim(file_get_contents("{$g['etc_path']}/version")); + + if (strstr($current_version, "-RELEASE")) { + /* This is only necessary for RELEASE */ + $arch = ($arch == "i386") ? "" : '/' . $arch; + /* Full installs and NanoBSD use the same update directory and manifest in 2.x */ + $g['update_url']="https://updates.pfsense.org/_updaters{$arch}"; + $g['update_manifest']="https://updates.pfsense.org/manifest"; + } else { + /* Full installs and NanoBSD use the same update directory and manifest in 2.x */ + $g['update_url']="https://snapshots.pfsense.org/FreeBSD_releng/10.1/{$arch}/pfSense_HEAD/.updaters/"; + $g['update_manifest']="https://updates.pfSense.org/manifest"; + } $g['platform'] = trim(file_get_contents("/etc/platform")); if($g['platform'] == "nanobsd") { |