Skip to content

Commit

Permalink
Push up 1.3.1 RC 2
Browse files Browse the repository at this point in the history
1. Fixes self:: called in non-object contexts on progress calls back to the GUI.
2. Fixes self:: called in non-object contexts on inventory calls back to the GUI.
3. Fixes a bug in the Location plugin that would prevent ipxe from
working properly.

1. Put string wrappers on the domain and ip to ping for get interface
function.
  • Loading branch information
mastacontrola committed Jan 3, 2017
1 parent a5963b7 commit 2a2ccf1
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 23 deletions.
4 changes: 2 additions & 2 deletions lib/common/functions.sh
Expand Up @@ -297,8 +297,8 @@ addToAddress() {
return 1
}
getFirstGoodInterface() {
siteToCheckForInternet=www.google.com #Must be domain name.
ipToCheckForInternet=8.8.8.8 #Must be IP.
siteToCheckForInternet="www.google.com" #Must be domain name.
ipToCheckForInternet="8.8.8.8" #Must be IP.
[[ -e $workingdir/tempInterfaces.txt ]] && rm -f $workingdir/tempInterfaces.txt >/dev/null 2>&1
foundinterfaces=$(ip -4 addr | awk -F'(global )' '/global / {print $2}')
for interface in $foundinterfaces; do
Expand Down
2 changes: 1 addition & 1 deletion packages/web/lib/fog/system.class.php
Expand Up @@ -53,7 +53,7 @@ private static function _versionCompare()
public function __construct()
{
self::_versionCompare();
define('FOG_VERSION', '1.3.1-RC-1');
define('FOG_VERSION', '1.3.1-RC-2');
define('FOG_SCHEMA', 244);
define('FOG_BCACHE_VER', 111);
define('FOG_SVN_REVISION', 6052);
Expand Down
24 changes: 7 additions & 17 deletions packages/web/lib/plugins/location/hooks/changeitems.hook.php
Expand Up @@ -169,39 +169,29 @@ public function bootItemSettings($arguments)
),
'locationID'
);
foreach ((array)self::getClass('LocationManager')
->find(array('id' => $Locations)) as $Location
foreach ((array)self::getClass('LocationAssociationManager')
->find(array('locationID' => $Locations)) as $Location
) {
if (!$Location->isTFTP()) {
continue;
}
$StorageNode = $Location
->getLocation()
->getStorageNode();
if (!$StorageNode->isValid()) {
continue;
}
$ip = $StorageNode->get('ip');
$curroot = trim(
trim($StorageNode->get('webroot'), '/')
);
$webroot = sprintf(
'/%s',
(
strlen($curroot) > 1 ?
sprintf('%s/', $curroot) :
''
)
);
$memtest = $arguments['memtest'];
$memdisk = $arguments['memdisk'];
$bzImage = $arguments['bzImage'];
$initrd = $arguments['initrd'];
$arguments['webserver'] = $ip;
$arguments['webroot'] = $webroot;
$arguments['memdisk'] = "http://${ip}${webroot}service/ipxe/$memdisk";
$arguments['memtest'] = "http://${ip}${webroot}service/ipxe/$memtest";
$arguments['bzImage'] = "http://${ip}${webroot}service/ipxe/$bzImage";
$arguments['imagefile'] = "http://${ip}${webroot}service/ipxe/$initrd";
$arguments['memdisk'] = "http://${ip}/fog/service/ipxe/$memdisk";
$arguments['memtest'] = "http://${ip}/fog/service/ipxe/$memtest";
$arguments['bzImage'] = "http://${ip}/fog/service/ipxe/$bzImage";
$arguments['imagefile'] = "http://${ip}/fog/service/ipxe/$initrd";
unset($Location);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/web/management/languages/messages.pot
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-02 16:51-0500\n"
"POT-Creation-Date: 2017-01-03 15:09-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion packages/web/service/inventory.php
Expand Up @@ -22,7 +22,7 @@
require '../commons/base.inc.php';
FOGCore::stripAndDecode($_REQUEST);
try {
$Host = self::getHostItem(false, false);
$Host = FOGCore::getHostItem(false, false);
$Inventory = $Host->get('inventory');
if (!$Inventory instanceof Inventory
|| !$Inventory->isValid()
Expand Down
2 changes: 1 addition & 1 deletion packages/web/service/progress.php
Expand Up @@ -21,7 +21,7 @@
*/
require '../commons/base.inc.php';
try {
$Host = self::getHostItem(false);
$Host = FOGCore::getHostItem(false);
$Task = $Host->get('task');
$TaskType = new TaskType($Task->get('typeID'));
if (!$Task->isValid()) {
Expand Down

0 comments on commit 2a2ccf1

Please sign in to comment.